Skip to content

CI: oup_v1 render fails with '! Undefined control sequence \authormark' after upstream CTAN update #603

Description

@cderv

Symptom

R-CMD-check is failing across nearly the entire matrix (16/18 jobs) on a fresh
install of TinyTeX. The failure is the same on every OS and pandoc combination
that exercises the oup_v1 test:

Rendering the oup_v1 format...
[1/1] install: oup-authoring-template [27k]
...
! Undefined control sequence.
l.241 \authormark
                 {Alice Anonymous et al.}

Error: LaTeX failed to compile oup_v1_article.tex.

The two jobs that pass (ubuntu-latest (release) [Pandoc 2.5] and [Pandoc 2.7.3]) only pass because test_format("oup_v1", skip = !rmarkdown::pandoc_available("2.10")) in tests/testit/test-formats.R:70
skips OUP v1 on those older pandoc versions.

Example failing run: https://github.com/rstudio/rticles/actions/runs/25806163370

Cause

Independent of any rticles change. The upstream
oup-authoring-template class
on CTAN has been updated and no longer defines \authormark. TinyTeX
auto-installs the latest version from CTAN at test time, so every CI run
freshly downloads the broken-for-our-use version.

Our template still emits \authormark{...} from
inst/rmarkdown/templates/oup_v1/resources/template.tex:384-388.

R-CMD-check on main was green as recently as #599 (Update to JSS 3.6), so
the regression entered via an upstream CTAN release, not via an rticles
commit. PR #601 (Copernicus 7.14) is the first PR to hit it; its Copernicus
changes are unrelated and the Copernicus rendering itself passes in every
job before oup_v1 fails.

Suggested fixes

Three options, roughly in increasing effort:

  1. Pin the class file: vendor oup-authoring-template.cls (and any
    companions) into inst/rmarkdown/templates/oup_v1/skeleton/ at the last
    working version so it shadows CTAN — same pattern we already use for
    copernicus.cls, agujournal2018.cls, etc.
  2. Patch the template: replace \authormark with whatever the new
    upstream class expects (need to read the new .dtx to know). If only the
    command name changed, this is a one-line fix in
    inst/rmarkdown/templates/oup_v1/resources/template.tex:384-388.
  3. Defensive macro: wrap with
    \providecommand{\authormark}[1]{} or
    \@ifundefined{authormark}{\let\authormark\@gobble}{} so missing macros
    degrade silently. Cheapest, but loses the running-head behavior.

Tracking #409 is also relevant — it already notes the OUP template needs an
update; this is now blocking CI.

Workaround for incoming PRs

Until this lands, contributors can ignore the red R-CMD-check if the only
failing test is test-formats.R -> oup_v1. The rest of the test suite is
unaffected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions