Skip to content

revtex's abstract belongs after the title, not above it - #354

Merged
tannevaled merged 1 commit into
mainfrom
revtex-abstract
Sep 11, 2026
Merged

tannevaled merged 1 commit into
mainfrom
revtex-abstract

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

In revtex the abstract is written before \maketitle and emitted by it, after the authors. The generic \abstract (latex.go) sets it where it stands, so every rendered revtex paper carried its abstract above its own title.

On 2203.15077, page one:

opens with
before Abstract Growing a flat lamina such as a leaf is almost impossible without…
after How to grow a flat leaf Salem al-Mosleh, L. Mahadevan, John A. Paulson School…
reference How to grow a flat leaf Salem al-Mosleh¹ and L. Mahadevan^{1,2,∗} ¹ John A. Paulson School…

Σ cannot see this one

326 → 326 (+0), glyphs +0, no paper losing content — a misplaced abstract costs no page. It was found by looking at the deployed playground's rendered page, after #353 made that page worth looking at.

Two things the implementation turns on

  • The capture must be \global\setbox. A local one is restored by the \endgroup that \end{abstract} runs and the abstract vanishes — checked both ways, and tectonic loses it too when the box is local.
  • An abstract written after \maketitle (some papers do) is emitted as soon as it closes, so the order is right either way and nothing is ever captured into a box no one empties. It has its own test.

A test helper was reporting the wrong order

pageChars and treeText walked the main vertical list and then the region spans, so a revtex title block came out after the body it heads — the first version of the order test failed on the helper, not on the engine. They walk in page order now: a region's span, then that region's material, which is also what a figure*/table* band needs.

Both tests fail without the fix.

🤖 Generated with Claude Code

In revtex the abstract is written BEFORE \maketitle and emitted BY it, after the
authors. The generic \abstract sets it where it stands, so every rendered revtex
paper carried its abstract ABOVE its own title. On 2203.15077 page one opened with

    Abstract Growing a flat lamina such as a leaf is almost impossible without…

where the reference opens with "How to grow a flat leaf".

It costs no page, so Sigma cannot see it: 326 -> 326 (+0), glyphs +0. It was found
by LOOKING at the deployed playground's rendered page.

The abstract is collected into a box with \global\setbox — local would be restored
by the \endgroup that \end{abstract} runs, and the abstract would vanish (checked
both ways, and tectonic loses it too when the box is local) — and \maketitle places
it after the affiliations. An abstract written AFTER \maketitle, which some papers
do, is emitted as soon as it closes, so the order is right either way and nothing
is ever captured into a box no one empties.

pageChars and treeText walked the main vertical list and THEN the region spans, so
a revtex title block came out AFTER the body it heads. They walk in page order now:
a region's span, then that region's material.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant