Skip to content

\maketitle runs the class's own \@maketitle (#629) - #643

Merged
tannevaled merged 1 commit into
mainfrom
classmaketitle
Oct 22, 2026
Merged

tannevaled merged 1 commit into
mainfrom
classmaketitle

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

\maketitle never called \@maketitle. For every paper that ships a class of its own
— the engine installs no \maketitle for a class it does not know — the class's whole
title layout therefore never ran, and the generic fallback set \@author inside a
\centerline: an \hbox that nothing line-breaks.

The source

article.cls, and texmf/article.cls:203-219 here:

\if@twocolumn
  \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]\fi
\else \newpage \global\@topnum\z@ \@maketitle \fi

Measured

2310.11517 (paper.cls, PNAS), page 1:

author line pages
before 1787.88pt — one author and four affiliations run together 11
after 131.98pt, each affiliation on its own line 10

on a 612pt sheet. It was the widest line left in the corpus.

Population, counted before coding: 5104 papers of the arXiv pool define their own
\@maketitle, 58 of the 154 measured.

Page-count A/B: 0 of 154 moved — a real zero on a population of 58, not an empty
one. The channel that sees this is geometry, as #629 says throughout:

papers off the page widest line in the corpus
before 22 1788pt
after 22 1281pt

2310.11517 stays in the list, and that is worth saying plainly: its widest line
drops 1788 → 797pt and what is left there is a different leak —
pnassigstylelinewidth=0.7pt,backgroundcolor=pnasblue…, a key list from
researchpaper.sty's sigstatement float. One cause closed, the next one underneath
it exposed.

⚠ The \centerline fallback is kept, for a document whose class defines no
\@maketitle at all — which is most of this test suite.

⛔ Three halves written, two dropped after mutating each one

  • \if@twocolumn following the engine's column state (latex.ltx:15035, set
    \global at :15081/:15115). The flag is genuinely unmaintained here — a
    two-column document answers FALSE — but adding it makes this worse:
    \twocolumn[\@maketitle] then opens a region of its own, the title block lands on
    page 2 and the document goes to 11 pages against 10. Left alone, with its own
    measurement to do.
  • \twocolumn[span] pushing its material instead of discarding it when
    two-column mode is not live. Reachable only if \if@twocolumn is true while
    \twocolumn is inert, and no witness produces that today. Speculative; dropped.

I first concluded the flag was the fix and latex.go redundant, then the reverse.
Both readings came from having mutated only one half.

⛔ The test must use a class the engine has NO definitions for

With \documentclass{article} the embedded texmf/article.cls installs its own
\maketitle, which already calls \@maketitle — so the test passes before the fix as
well as after, and asserts nothing. That is how it first "passed". Run against the
unfixed file, only the \documentclass{gotexnosuchclass} spelling fails, and it
prints what the fallback produced: "GOTEXTITREGOTEXAUTEUR".

🤖 Generated with Claude Code

article.cls, and texmf/article.cls:203-219 here:

	\if@twocolumn
	  \ifnum \col@number=\@ne \@maketitle \else \twocolumn[\@maketitle]\fi
	\else \newpage \global\@topnum\z@ \@maketitle \fi

The generic \maketitle of latex.go never called \@maketitle at all. For every paper
that ships a class of its own — the engine installs no \maketitle for a class it does
not know — the class's whole title layout therefore NEVER RAN, and the fallback set
\@author inside a \centerline: an \hbox that nothing line-breaks.

On 2310.11517 (paper.cls, PNAS) that hbox came out 1787.88pt wide on a 612pt sheet,
carrying one author and four affiliations run together. It was the widest line left in
the 154-paper corpus. After: the title block is laid out by paper.cls's own
\@maketitle, the author line is 131.98pt, each affiliation on its own line, and the
document goes from 11 pages to 10.

5104 papers of the arXiv pool define their own \@maketitle, 58 of the 154 measured.

⚠ The \centerline fallback is KEPT, for a document whose class defines no \@maketitle
at all — which is most of this test suite.

⛔ THREE halves were written for this and TWO were dropped after being mutated
separately:

- \if@twocolumn following the engine's column state (latex.ltx:15035, and \global at
  :15081/:15115). It is genuinely unmaintained here — a two-column document answers
  FALSE — but adding it makes THIS worse: \twocolumn[\@maketitle] then starts a region
  of its own and the title block lands on page 2, 11 pages against 10. Left alone,
  with its own measurement to do.
- \twocolumn[span] pushing its material instead of discarding it when two-column mode
  is not live. Reachable only if \if@twocolumn is true while \twocolumn is inert, and
  no witness produces that today. Speculative; dropped.

⛔ The test must use a class the engine has NO definitions for. With
\documentclass{article} the embedded texmf/article.cls installs its own \maketitle,
which already calls \@maketitle — so the test passes before the fix as well as after,
and asserts nothing. That is how it first "passed". Run against the unfixed file, only
the \documentclass{gotexnosuchclass} spelling fails.

Co-Authored-By: Claude Opus 5 <[email protected]>
@tannevaled
tannevaled merged commit aac806e into main Oct 22, 2026
18 checks passed
@tannevaled
tannevaled deleted the classmaketitle branch October 22, 2026 17:05
tannevaled added a commit that referenced this pull request Oct 22, 2026
) (#644)

mdframed.sty:

	\newrobustcmd*\mdfdefinestyle[2]{\csdef{mdf@definestyle@#1}{#2}}          % :564
	\newrobustcmd*\mdfapptodefinestyle[2]{…\csappto{mdf@definestyle@#1}{,#2}} % :567
	\newrobustcmd*{\mdfsetup}{\kvsetkeys{mdf}}                                % :386

All three STORE a key list and typeset nothing. Undefined, all three left their
arguments behind. researchpaper.sty (PNAS) writes

	\mdfdefinestyle{pnassigstyle}{linewidth=0.7pt,backgroundcolor=pnasblueback,…}

at :23, and page 1 of 2310.11517 carried that as a 797pt line on a 612pt sheet — the
leak that #643 uncovered underneath the one it fixed. 144 papers of the arXiv pool
write one of the three.

The environment is defined too, as \newenvironment{mdframed}[1][]{}{}: its BODY is
document content and must be set — the PNAS significance statement lives in one — so
only the optional key list is consumed and the frame itself is not drawn. Undefined,
"[style=pnassigstyle]" stood on the page as ordinary text.

⛔ A gobbler that ate the body would pass a leak test and silently delete a paragraph,
which is the worse defect of the two, so the test asserts the body IS there as well as
that the keys are not. Measured on 2310.11517, pages 1-2: 1154 words before, 1386
after, against the reference's 2080 — the change ADDS content, it does not remove any.

Run against the unfixed file all four cases fail, printing what leaked:
"gotexstylinewidth=0.7pt,backgroundcolor=gotexcolourAPRES" and
"[style=gotexsty]GOTEXCORPS".

⚠ \newmdenv / \renewmdenv / \newmdtheoremenv (mdframed.sty:578, :586, :591) are NOT
done here: no witness in the corpus produces a leak from them, and a definition
written without one is a guess.

Co-authored-by: Claude Opus 5 <[email protected]>
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