Skip to content

render-pipeline: \maketitle sets the author tabular even with no author (stacked on #483) - #484

Merged
GoKubar merged 2 commits into
mainfrom
agent/nixos-cv-lecture/maketitle-empty-author
Sep 15, 2026
Merged

GoKubar merged 2 commits into
mainfrom
agent/nixos-cv-lecture/maketitle-empty-author

Conversation

@GoKubar

@GoKubar GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

render-pipeline: \maketitle sets the author tabular even with no author

\@maketitle is

\newpage \null \vskip 2em
\begin{center}%
  {\LARGE \@title \par}%
  \vskip 1.5em%
  {\large \lineskip .5em%
    \begin{tabular}[t]{c}\@author\end{tabular}\par}%
  \vskip 1em%
  {\large \@date}%
\end{center}\par \vskip 1.5em

The tabular is unconditional. \author{} — and no \author at all, which
only adds a warning — gives a tabular with no rows: no ink, no height, no
depth, but still a line of the centred paragraph, and so still its own
interline glue. title_blocks_set dropped an author whose tabular had no
cells, and with it that glue.

Oracle

pdfTeX 3.141592653-2.6-1.40.27 (TeX Live 2025), \showoutput, an 11pt
article titled as fixtures/real-world/math-sheet is, with \author{} and
\date{}:

...\hbox(11.89987+3.36028)x469.75502     % {\LARGE \@title}
...\glue 16.33182                        % \vskip 1.5em
...\glue(\parskip) 0.0 plus 1.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 10.63972         % 14.0 - 3.36028 - 0.0
...\hbox(0.0+0.0)x469.75502, glue set 234.87752fil   % the empty tabular
...\glue 10.88788                        % \vskip 1em
...\glue -10.88788
...\glue 10.88788
...\glue -10.88788
...\penalty -51
...\glue 10.88788
...\glue -10.88788
...\glue 12.0 plus 4.0 minus 6.0         % center's \@topsepadd
...\glue 16.33182                        % \@maketitle's closing \vskip 1.5em
...\glue -16.33182
...\penalty -300
...\glue 16.33182
...\glue -16.33182
...\glue 16.49693 plus 4.71341 minus 0.94266   % \section*'s before-skip
...\glue(\parskip) 0.0 plus 1.0
...\glue(\parskip) 0.0
...\glue(\baselineskip) 8.06242
...\hbox(9.93758+0.0)x469.75502          % "Series and sums"

so title baseline to heading baseline is 76.82875 pt = 76.5411 bp. Without
the empty line it is 30.328 pt short — 13.996 pt of it the line itself, the
rest the \vskip 1.5em that then has nothing to sit against.

Effect

math-sheet is the corpus's only \author{}. Measured on top of the
alignment fix in the first commit of this branch, against the committed
reference PDFs:

math-sheet  page 1 max |dy|  29.773 bp -> 2.552 bp
            dy 25.00%, dx 52.11%, aligned 332/512, pages 2/2 — all unchanged
corpus      dx 89.89%, dy 84.91%, aligned 15275/16496, pages 22/22 —
            every fixture's numbers identical to main

The within-0.5 bp percentage does not move because page 1 of that fixture is
packed with glue set -0.74042: what is left after both fixes is a shrink
gradient (0.074 per unit of glue shrink — 0.444 bp on each \abovedisplayskip
and 0.066 bp on each \section* skip), which crosses 0.5 bp about a third of
the way down the page. Page 2 is untouched by either fix and still has a
pmatrix row-height error of 19.103 bp (math-layout).

Stacked deliberately. The two errors on that page have opposite signs, so
either one alone leaves the page worse by some measure: the alignment fix
alone reads math-sheet median-relative dy 42.17% -> 24.40%, and this fix
alone (measured on main) is worse still — 41 words stop aligning at all and
dy falls to 2.41%, because the page is then 30 pt too tall instead of 30 pt
too short. Together they are neutral on every corpus percentage and 27 bp
better on the worst word. Merging this branch takes both; the first commit is
reviewable on its own as #482.

Test: crates/render-pipeline/tests/maketitle_empty_author.rs, all four
combinations of empty/non-empty \author and \date. On main:

\author{} \date{August 2025}: title to heading 86.9943 bp, pdflatex
100.9380 bp (off by -13.9437 bp). The empty author tabular is a line of
no height whose interline glue is 10.600 bp here, and dropping it takes
that glue with it.

The two non-empty-author cases pass on main and must keep passing.

Gates: cargo test --release --no-fail-fast on crates/render-pipeline, 367
passed 0 failed; amsmath 59/59 within 0.5 bp; tabular 106/106; HW1 and HW2 3/3
pages, 0 errors, 0 overfull; corpus page counts 22/22 read from the reference
PDFs; zero font-FAILURE diagnostics. pdflatex is an oracle only and never runs
in the product path.

Implementation-Agent: Claude Opus 5 (lane nixos-cv-lecture, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-Authored-By: Claude Opus 5 [email protected]
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu

GoKubar and others added 2 commits September 14, 2026 20:17
TeX §1145: a display whose paragraph's horizontal list is still empty
contributes no line. After a heading LaTeX's `\@afterheading` has installed
`\everypar{{\setbox\z@\lastbox}...}`, which takes the `\parindent` box
straight back off, so the list really is empty and only `\parskip` precedes
the display. After ordinary text there *is* a line — the indent box on its
own — and it carries its own interline glue.

`build_paragraph`'s `ParaPart::Display` arm already models this. Its
`ParaPart::Rows` arm — every amsmath alignment — did not, and pushed the
opener line unconditionally, so an `align` right after a `\section` sat one
phantom empty line too low: `\baselineskip` less the heading's depth, 13.6 pt
under a heading with no descender and 10.8007 pt under one with.

## Oracle

pdfTeX 3.141592653-2.6-1.40.27 (TeX Live 2025), `\showoutput`, the same
`align*` after ordinary text and after `\section*{A heading}`. After text:

    ...\hbox(7.54149+2.12863)x469.75502     % "Lead paragraph, ..."
    ...\glue(\parskip) 0.0 plus 1.0
    ...\glue(\parskip) 0.0
    ...\glue(\baselineskip) 11.47137
    ...\hbox(0.0+0.0)x469.75502, glue set 452.75502fil   % the indent box alone
    ...\penalty 10000
    ...\glue(\abovedisplayskip) 11.0 plus 3.0 minus 6.0
    ...\glue -3.0
    ...\glue 0.0
    ...\glue(\lineskip) 4.0
    ...\hbox(18.22697+14.49814)x279.67776, display

after the heading:

    ...\hbox(9.93758+2.7993)x469.75502      % the heading
    ...\penalty 10000
    ...\glue 10.84085 plus 0.94266
    ...\glue(\parskip) 0.0 plus 1.0
    ...\glue(\parskip) 0.0
    ...\penalty 10000
    ...\glue(\abovedisplayskip) 11.0 plus 3.0 minus 6.0
    ...\glue -3.0
    ...\glue 0.0
    ...\glue(\lineskip) 4.0
    ...\hbox(18.22697+14.49814)x279.67776, display

— no `\hbox(0.0+0.0)` and no `\glue(\baselineskip)` at all.

## Effect

`fixtures/real-world/math-sheet` is the only corpus fixture that puts an
alignment straight after a heading; both of its page-1 `\section*` +
`align`/`align*` pairs were affected.

    math-sheet  page 1 max |dy|  29.773 bp -> 25.826 bp
                dy 25.00% unchanged, dx 52.11% unchanged, pages 2/2
    corpus      dy 84.91% and dx 89.89% unchanged, pages 22/22

**The within-0.5 bp percentage does not move, and `math-sheet`'s
median-relative `dy` reads worse (42.17% -> 24.40%) until #481 lands too.**
That is not this change misfiring: page 1 of that fixture is packed with
`glue set -0.74042`, so its residual is a *shrink gradient* rather than one
rigid offset, and removing one of the two errors on the page changes how the
rest is distributed without yet bringing the total to zero. The other error is
the empty `\author{}` line (#481, `\maketitle`, worth 30.328 pt on that same
page). With both, page 1's max |dy| is 2.552 bp and the median-relative figure
is back at 41.27%; what is then left is the shrink ratio itself (a residual of
0.074 per unit of glue shrink) plus a `pmatrix` row height on page 2
(max |dy| 19.103 bp, math-layout).

Test: `crates/render-pipeline/tests/align_after_heading.rs`, both placements,
every expected number from the trace above. On main:

  heading to first alignment row: 54.4661 bp, pdflatex 43.7032 bp (off by
  +10.7629 bp). A whole phantom line is 10.760 bp here (\baselineskip 13.6
  less the heading's 2.7993 pt of depth), so a miss of that size means the
  alignment still gets an opener line that `\@afterheading` had already
  emptied.

The after-ordinary-text control passes on main and must keep passing: this
change must not take that line away.

Gates: `cargo test --release --no-fail-fast` on `crates/render-pipeline`, 366
passed 0 failed; amsmath 59/59 within 0.5 bp; tabular 106/106; HW1 and HW2 3/3
pages, 0 errors, 0 overfull; corpus page counts 22/22 read from the reference
PDFs; zero font-FAILURE diagnostics. pdflatex is an oracle only and never runs
in the product path.

Implementation-Agent: Claude Opus 5 (lane nixos-cv-lecture, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
`\@maketitle` is

    \newpage \null \vskip 2em
    \begin{center}%
      {\LARGE \@title \par}%
      \vskip 1.5em%
      {\large \lineskip .5em%
        \begin{tabular}[t]{c}\@author\end{tabular}\par}%
      \vskip 1em%
      {\large \@Date}%
    \end{center}\par \vskip 1.5em

The `tabular` is unconditional. `\author{}` — and no `\author` at all, which
only adds a warning — gives a `tabular` with no rows: no ink, no height, no
depth, but still a *line* of the centred paragraph, and so still its own
interline glue. `title_blocks_set` dropped an author whose `tabular` had no
cells, and with it that glue.

## Oracle

pdfTeX 3.141592653-2.6-1.40.27 (TeX Live 2025), `\showoutput`, an 11pt
article titled as `fixtures/real-world/math-sheet` is, with `\author{}` and
`\date{}`:

    ...\hbox(11.89987+3.36028)x469.75502     % {\LARGE \@title}
    ...\glue 16.33182                        % \vskip 1.5em
    ...\glue(\parskip) 0.0 plus 1.0
    ...\glue(\parskip) 0.0
    ...\glue(\baselineskip) 10.63972         % 14.0 - 3.36028 - 0.0
    ...\hbox(0.0+0.0)x469.75502, glue set 234.87752fil   % the empty tabular
    ...\glue 10.88788                        % \vskip 1em
    ...\glue -10.88788
    ...\glue 10.88788
    ...\glue -10.88788
    ...\penalty -51
    ...\glue 10.88788
    ...\glue -10.88788
    ...\glue 12.0 plus 4.0 minus 6.0         % center's \@topsepadd
    ...\glue 16.33182                        % \@maketitle's closing \vskip 1.5em
    ...\glue -16.33182
    ...\penalty -300
    ...\glue 16.33182
    ...\glue -16.33182
    ...\glue 16.49693 plus 4.71341 minus 0.94266   % \section*'s before-skip
    ...\glue(\parskip) 0.0 plus 1.0
    ...\glue(\parskip) 0.0
    ...\glue(\baselineskip) 8.06242
    ...\hbox(9.93758+0.0)x469.75502          % "Series and sums"

so title baseline to heading baseline is 76.82875 pt = 76.5411 bp. Without
the empty line it is 30.328 pt short — 13.996 pt of it the line itself, the
rest the `\vskip 1.5em` that then has nothing to sit against.

## Effect

`math-sheet` is the corpus's only `\author{}`. Measured on top of the
alignment fix in the first commit of this branch, against the committed
reference PDFs:

    math-sheet  page 1 max |dy|  29.773 bp -> 2.552 bp
                dy 25.00%, dx 52.11%, aligned 332/512, pages 2/2 — all unchanged
    corpus      dx 89.89%, dy 84.91%, aligned 15275/16496, pages 22/22 —
                every fixture's numbers identical to main

The within-0.5 bp percentage does not move because page 1 of that fixture is
packed with `glue set -0.74042`: what is left after both fixes is a shrink
*gradient* (0.074 per unit of glue shrink — 0.444 bp on each `\abovedisplayskip`
and 0.066 bp on each `\section*` skip), which crosses 0.5 bp about a third of
the way down the page. Page 2 is untouched by either fix and still has a
`pmatrix` row-height error of 19.103 bp (math-layout).

**Stacked deliberately.** The two errors on that page have opposite signs, so
either one alone leaves the page worse by some measure: the alignment fix
alone reads `math-sheet` median-relative `dy` 42.17% -> 24.40%, and *this* fix
alone (measured on main) is worse still — 41 words stop aligning at all and
`dy` falls to 2.41%, because the page is then 30 pt too tall instead of 30 pt
too short. Together they are neutral on every corpus percentage and 27 bp
better on the worst word. Merging this branch takes both; the first commit is
reviewable on its own as #482.

Test: `crates/render-pipeline/tests/maketitle_empty_author.rs`, all four
combinations of empty/non-empty `\author` and `\date`. On main:

  \author{} \date{August 2025}: title to heading 86.9943 bp, pdflatex
  100.9380 bp (off by -13.9437 bp). The empty author `tabular` is a line of
  no height whose interline glue is 10.600 bp here, and dropping it takes
  that glue with it.

The two non-empty-author cases pass on main and must keep passing.

Gates: `cargo test --release --no-fail-fast` on `crates/render-pipeline`, 367
passed 0 failed; amsmath 59/59 within 0.5 bp; tabular 106/106; HW1 and HW2 3/3
pages, 0 errors, 0 overfull; corpus page counts 22/22 read from the reference
PDFs; zero font-FAILURE diagnostics. pdflatex is an oracle only and never runs
in the product path.

Implementation-Agent: Claude Opus 5 (lane nixos-cv-lecture, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
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