\newtheorem* defines an unnumbered theorem instead of leaking - #222
Merged
Conversation
amsthm's starred form was unhandled. The star stopped readBraceName dead: no name was read, the environment stayed undefined, and the star and the heading were left in the input to be TYPESET. One paper opened on a spurious page of its own carrying *theoremTheorem *namedconjectureConjecture and then set the three bodies of its theorem environment as plain paragraphs. The star is now read, and a starred \newtheorem defines the same environment with no counter, no \the<env>, and a heading with no number: \@beginthmnonum, a sibling of \@BeginTheorem without its "\ #2", so the head reads "Theorem." rather than "Theorem ." — the optional note ("Theorem (Smith).") goes through the same continuation as a numbered one. 39 uses across 17 of the 200 arXiv papers. Measured over the 157 with a tectonic reference: page error 574 → 535, exact 23 → 24, within 1 page 61 → 66, within 2 pages 96 → 103; the signed bias crosses from +36 to −19. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
amsthm's starred form was unhandled. The star stopped
readBraceNamedead: no namewas read, the environment stayed undefined, and the star and the heading were
left in the input to be typeset. One paper opened on a spurious page of its own
carrying
and then set the three bodies of its
theoremenvironment as plain paragraphs.The fix
The star is read, and a starred
\newtheoremdefines the same environment with nocounter, no
\the<env>, and a heading with no number —\@beginthmnonum, a siblingof
\@begintheoremwithout its\ #2, so the head readsTheorem.rather thanTheorem .. The optional note (Theorem (Smith).) goes through the samecontinuation as a numbered theorem.
Measured
39 uses across 17 of the 200 arXiv papers. Over the 157 with a tectonic
reference:
The largest single move of the current campaign, and it comes from three lines of
argument parsing: the papers were not merely mis-set, they were carrying macro
arguments as body text and losing every theorem statement's structure.
Two tests, both failing on
main: the star must not be typeset, the starredenvironment must carry no number while its numbered sibling still counts, and the
optional note must survive.
🤖 Generated with Claude Code