Skip to content

Update AGU article format to the 2019 template - #615

Open
cderv wants to merge 4 commits into
mainfrom
update-agu
Open

cderv wants to merge 4 commits into
mainfrom
update-agu

Conversation

@cderv

@cderv cderv commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

This updates agu_article() to AGU's September 2025 distribution of agujournal2019.cls and current submission guidance.

It also:

  • keeps project-local agujournal2018.cls drafts working through an explicit legacy path;
  • selects the class in R and passes the result to the Pandoc template, so retained .tex contains exactly one deterministic \documentclass branch;
  • uses Pandoc citeproc with the American Geophysical Union CSL style for new 2019 drafts;
  • retains natbib only for legacy 2018 drafts and warns once for incompatible class/backend combinations;
  • updates TrackChanges setup, manuscript guidance, tables, sideways content, appendices, and required statements; and
  • adds focused unit tests and real LaTeX integration renders for both class generations.

Closes #606.

Source and scope

The class and current manuscript guidance come from AGU's September 2025 download and the January 2023 LaTeX submission guidelines referenced in #606. The downloaded inputs were verified before import.

The citation architecture is a separate design choice based on the approach used by quarto-journals/agu: Markdown citations are processed by Pandoc citeproc with the American Geophysical Union CSL style. That project is an architectural precedent, not the source of the current manuscript guidance; its bundled style guide predates the September 2025 AGU download.

This intentionally updates to agujournal2019.cls, which remains the primary submission-oriented class in that distribution. The separate agujournal2025.cls should be evaluated independently rather than treated as a drop-in replacement.

Generated archive artifacts such as PDFs, AUX files, logs, and SyncTeX files are not included.

Design choices

Deterministic class compatibility

New drafts include agujournal2019.cls. Existing drafts containing only a local agujournal2018.cls select the legacy class; when both are present, 2019 wins.

The check is performed by the output format's pre_processor, which sets a private Pandoc variable. This is preferable to leaving \IfFileExists logic in the generated LaTeX: the retained .tex records the class selected at render time and contains none of the unused class-specific setup.

The former 2018 class is preserved unchanged as an integration-test fixture. Legacy projects now need to select citation_package: natbib explicitly.

Citation backend

The 2019 class deliberately moved from the 2018 class's apacite[natbibapa] compatibility interface to plain apacite and documents \cite/\citeA rather than \citep/\citet. Pandoc has no native apacite writer: its supported choices are citeproc, natbib, and biblatex.

Rather than introducing a custom natbib bridge into the upstream class behavior, new AGU drafts now follow the approach used by quarto-journals/agu:

  • citation_package = "default";
  • Markdown citations processed by Pandoc citeproc; and
  • the bundled american-geophysical-union.csl style.

A user-supplied csl metadata value takes precedence over the bundled fallback. The skeleton uses Markdown citations only because citeproc does not process raw LaTeX citation commands.

For backward compatibility, the genuine 2018 route still uses natbib, matching that class's natbibapa setup. The format warns once when 2018 is paired with a non-natbib backend or 2019 is paired with a non-citeproc backend.

Changing the default citation backend is called out under BREAKING CHANGES in NEWS.md.

LaTeX 2026 table compatibility

The official 2019 class retains an older copied \@array implementation that uses math-only \vcenter. The vendored class differs substantively only by a narrow guard that uses the current kernel's \vcenter@text helper when available and falls back to \vcenter on older kernels.

TrackChanges

The 2019 distribution expects revision packages to be loaded outside the class, so the current branch loads the bundled trackchanges package in inline mode plus soul. The 2018 branch does not reload them because its class already supplies the legacy setup.

Validation

  • 35 focused agu_article() assertions
  • 624 package unit-test assertions, with 0 failures, errors, warnings, or skips
  • current 2019 citeproc smoke render
  • validated 2019 citeproc render, including retained-TeX class selection, Markdown citations, TrackChanges, ordinary tables, and appendix numbering
  • citeproc render with multiple bibliography files
  • genuine 2018 class render with explicit natbib and retained-TeX validation
  • R CMD check: 0 errors, 0 warnings, 1 pre-existing note for .private-journal
  • git diff --check

The legacy integration render continues to emit the 2018 class's existing TrackChanges/ulem compatibility warning; this is not introduced by the update.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the AGU article format to the official 2019 template

1 participant