Repository navigation
render-pipeline: the abstract's opening skip is \addvspace, and the two-column branch is a \section* (#258 rank 1) - #376
Merged
Conversation
…ion` `abstract` body was set at `\normalsize` and the full measure with no head at all, so everything below it sat 24.58 bp too high. The blocker the previous lane named (#292) was a missing capability, not a constant: `paragraph_block` hard-coded `body_size_pt`/`baselineskip_pt`, so nothing could be set at a size other than `\normalsize` *with that size's own leading*. `adapter::SizedPara` now carries what `\@setfontsize` changes for one paragraph — the size, that size's `\baselineskip`, a `\parindent` in the new size's own `em`, a trailing `\vspace` in `em` of the font its last word is set in, and the closing `\@endparenv` skip of a list opened while the size was in force. article.cls 377-387 / report.cls 452-462, transcribed against the vendored `document-style` (wiring `crates/title-layout` in was the alternative: it depends on the *sibling* `document-style`, so its `Skip`/`Pt`/`Stylesheet` are different types from the vendor mirror this crate builds against, and adding it would break the `git archive` property the Cargo.toml documents. It also models `gap_before_heading` as `\topsep + \parskip` with no `\partopsep`, and its article.cls quote predates the `\vspace{-.5em}`): * the head is `\begin{center}{\bfseries \abstractname\vspace{-.5em} \vspace{\z@}}\end{center}` at `\small`, centred at the FULL measure (`center` is a `\trivlist`, `\leftmargin` 0); * the body is `\quotation`: `\leftmargini` both sides, `\listparindent 1.5em` resolved in `\small`'s own `\fontdimen6` (13.87161 pt, not the `\normalsize` quad), `\small`'s 11 pt leading throughout; * the opening glue is `\normalsize`'s `\topsep + \partopsep + \parskip` (10 pt plus 4 minus 5): `\small` only `\def`s `\@listi`, it never executes it; * the closing glue is 6 pt plus 3 minus 3 — `\small`'s own `\@listi` `\topsep` of 4 pt plus `\partopsep`, not `\normalsize`'s 8 pt; * the `quotation`'s own opening `\addvspace\@topsep` is absorbed whole by the `\end{center}` skip already on the list at every class size. Every number above is read off pdfTeX's own vertical list for `fixtures/divergence-probes/min-abstract` (`\showoutput`, TeX Live 2025), quoted in `abstractenv.rs`. The compiler has no model for the environment (it reports it and sets the body as plain text), so the pipeline reads it from the source bytes, the way it already reads `tikzpicture`, a list's `\begin` keys and a paragraph's `\newpage`; its now-superseded diagnostic is dropped the way `toc::superseded_commands` drops the contents-list ones. No compiler change and no vendor re-pin, so the fix is live rather than feature-gated. Not set here, reported as limitations instead of approximated: the `\if@twocolumn` branch (`\section*{\abstractname}`) and the `titlepage` branch (a page of its own between `\null\vfil`s). `book.cls` defines no `abstract`, so it keeps the compiler's warning. Measured, `tools/visual-oracle/rank.py` against the pinned TeX Live 2025 reference, geometry only (no rasterizer on this host): min-abstract p1 median dy -24.584 -> -0.000, max |dy| 35.54 -> 0.00, words aligned 92/93 -> 93/93, reflowed 1 -> 0. The residual max |dx| 1.30 is the probe's `\verb` on substituted `ec` metrics (the bundle has no `ectt*.tfm`), the same caveat #292 recorded. Corpus gates are still running; this is committed early so the work is not held locally. Implementation-Agent: linux-abstract lane (Claude Opus 5) 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
…lready reports
The two-column (`\section*{\abstractname}`) and `titlepage` branches are not
set here, and the compiler's own "environment 'abstract' is not implemented;
its body is typeset as plain text" is already exactly true of both. Emitting
a second message changed the rendering-v2 diagnostics of every two-column
document whose layout this leaves untouched — `article-twocolumn` (a
pre-existing fixture that must stay byte-identical) and `conf-paper`. Their
layout was identical either way; now the display list is too.
With this, all 10 pre-existing `fixtures/real-world` documents and 16 of the
20 in the corpus are byte-identical to a control built from `origin/main` in
this same working directory; the four that change are the one-column
`abstract` documents.
Implementation-Agent: linux-abstract lane (Claude Opus 5)
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
… two-column branch is a `\section*` Finishes #258's rank-1 divergence. #302 set the one-column `abstract` and left three documents ~10-12 bp too low; this is what that residual was. **Not one `\small` line too many.** The abstract's own line count is right in every document: in `lab-report` the head itself is already 12.021 bp low and every body line follows it by the same amount. The gap that is wrong is the one *before* the head, date baseline to `Abstract` baseline: | | pdfTeX | #302 | delta | |---|---|---|---| | `plain-article` (10pt) | 36.0005pt | 45.9999pt | **+9.9994** | | `lab-report` (11pt) | 40.4250pt | 52.4249pt | **+11.9998** | 10pt and 12pt are exactly `\topsep + \partopsep` at those class sizes. The environment opens with `\addvspace{\@topsep}` (`\@item`), not `\vskip`, and `\@maketitle` ends `\par \vskip 1.5em` — 15pt at a 10pt base, 16.425pt at 11pt (1.5em of cmr10 at 10.95pt). `\@xaddvskip` keeps the larger of the two, so after `\maketitle` the environment contributes nothing and the distance is `\@topsepadd` + `1.5em` + `\small`'s own `\baselineskip`: 10+15+11 = 36 and 12+16.425+12 = 40.425, the two reference numbers exactly. `\@item`'s other branch came out of the same reading: under `\if@nobreak` (right after a heading) `\@nbitem` runs instead, and its `\addvspace{\@outerparskip - \parskip}` plus the list's `\parskip` leaves exactly `\lastskip`. pdfTeX's list for a 12pt `quote` after `\subsection` is `\glue 7.74811 / \glue -7.74811 / \glue 2.74811 / \glue(\parskip) 5.0` — net 7.74811, the heading's own after-skip, with no `\@topsep` anywhere. `twelvept-plain` has that shape and is 13pt too low on main. **`natbib-review` was never right.** #302 measured it at median dy -0.001, but that was two errors cancelling: its head was 11.955 bp low *and* its abstract is one line short because `\citep` is unresolved. With the skip fixed its head is within 1.005 bp — page shrink from the natbib limitation — and the document is honestly -14.123 instead of a coincidental zero. **Two-column.** article.cls 378-379 is `\section*{\abstractname}`: an unnumbered `\Large\bfseries` head at the column measure, the body as ordinary `\normalsize` paragraphs. pdfLaTeX's `conf-paper` reference sets it in `SFBX1440` at x=54.00, the column's left edge, and the body in `SFRM1000`. It is now set as that. This changes `article-twocolumn`, one of the ten pre-existing byte-identical fixtures, deliberately: its current bytes are wrong independently of the abstract — the candidate's abstract body sits at y=124.6/136.6/148.5 inside the full-width title block it draws at y=95.8-152.6, and the head the class produces is absent altogether. The overlap is the already-reported `\twocolumn[\@maketitle]`-with-floats limitation, not this. With the head the page is measurably closer: median dy -89.923 -> -68.102 and reflowed words 36 -> 3. Measured with `tools/visual-oracle/rank.py`, geometry only (no rasterizer on this host), candidate against the pinned references, control built from `origin/main` in the same working directory, serial runs. | document | page | main | this | |---|---|---|---| | `min-abstract` | 1 | -24.584, 26 within 0.5bp | **-0.000**, 78, 93/93 aligned | | `plain-article` | 1 | -12.562, 14 | **+0.065**, 160 | | `lab-report` | 1 | -11.801, 23 | **+0.005**, 164 | | `hyperref-toc` | 1 | -10.209, 12 | **+0.004**, 490 | | `natbib-review` | 1 | -22.167, 15 | **-14.123**, 15 | | `conf-paper` | 1 | -140.517 | **-118.696** | | `article-twocolumn` | 1 | -89.923, 36 reflowed | **-68.102**, 3 reflowed | | `twelvept-plain` | 2 | -7.382, 25 | **-3.566**, 52 | Nine of the ten pre-existing real-world fixtures are byte-identical (`article-twocolumn` as above); the other newer fixtures that change are exactly the abstract documents plus `twelvept-plain`. Of the 41 divergence probes only `min-abstract` moves at all. amsmath 59/59, tabular 106/106, HW1/HW2 3 pages each via `flashtex-render` with 0 errors and 0 overfull, the `crates/render-pipeline` suite green (49 binaries, 0 failed). pdflatex is an oracle only and never runs in the product path. No reference or sidecar was regenerated. Implementation-Agent: Claude Opus 5 (lane linux-abstract, 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
This was referenced Sep 14, 2026
GoKubar
marked this pull request as ready for review
September 14, 2026 10:37
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.
Finishes #258's rank-1 divergence. Supersedes #302 (same lane; #302's two commits are rebased onto current
mainhere, becausemainrefactoredBlock::ParagraphintoContext::build_paragraphand typesetfloatbodies in the meantime). #302 is left open and unforced; close it in favour of this.#302 set the one-column
abstractand stopped, deliberately, with three documents ~10–12 bp too low. This is what that residual was, plus the two-column branch it flagged for the Commander.The residual was not a line count
#302's live hypothesis was that +11.96 bp ≈
\small's\baselineskipat 11pt meant the abstract body was one\smallline taller than pdfLaTeX's. It is not. The abstract's line count is right in every document: inlab-reportthe head itself is already 12.021 bp low and every body line follows it by exactly the same amount. The gap that is wrong is the one before the head — date baseline toAbstractbaseline:plain-article(10 pt)lab-report(11 pt)10 pt and 12 pt are exactly
\topsep + \partopsepat those class sizes (size10.clo 8+2, size11.clo 9+3) — one whole\@topseptoo many, not a line.Why:
\@itemopens with\addvspace, not\vskip\@maketitleends\par \vskip 1.5em— 15 pt at a 10 pt base, 16.425 pt at 11 pt (1.5 em of cmr10 at 10.95 pt). The environment opens with\addvspace{\@topsep}, and\@xaddvskipkeeps whichever of it and\lastskipis larger. 15 > 10 and 16.425 > 12, so after\maketitlethe environment contributes no skip of its own at all, and the distance is= 10 + 15 + 11 = 36 pt and 12 + 16.425 + 12 = 40.425 pt — the two reference numbers exactly. The pipeline was adding
env_skipunconditionally.\@item's other branch fell out of the same reading and is fixed here too: under\if@nobreak— right after a heading, where\@afterheadingset it —\@nbitemruns instead of\addvspace{\@topsep}, and its\addvspace{\@outerparskip - \parskip}followed by the list's own\parskipleaves exactly\lastskip. pdfTeX's own list for a 12 ptquoteafter\subsection:net 7.74811 pt — the heading's own after-skip, with
\@topsep(13 pt at 12 pt) nowhere.twelvept-plainhas that shape and is 13 pt too low onmain; its scratch reproducer goes from +12.960 bp to +0.009.natbib-reviewwas never right#302 measured it at median dy −0.001 on all three pages and treated that as the proof the abstract landed exactly. It was two errors cancelling: its head was 11.955 bp low and its abstract is one
\smallline short because\citepis unresolved (natbib is not implemented; 38 compiler errors). Line-for-line, reference1 Introductionat y=334.068 and candidate at y=334.068 — with six reference body lines against five candidate ones. With the skip fixed the head is within 1.005 bp (page shrink, because the candidate's page 1 overflows for the same natbib reason) and the document reads an honest −14.123 rather than a coincidental zero.The two-column decision
conf-paperandarticle-twocolumnare both10pt,twocolumn, so the\if@twocolumnbranch cannot be set for one without the other. What pdflatex actually does, read off the pinned MacTeX references:conf-paperp1SFBX1440(14.35 bp) at x = 54.00, the column's left edge, y = 177.724SFRM1000(9.96 bp), column measurearticle-twocolumnp1SFBX1440at x = 54.00, y = 191.672SFRM1000from y = 213.606That is
\section*{\abstractname}exactly as article.cls 379 says: an unnumbered\Large\bfserieshead at the column measure, the body as ordinary\normalsizeparagraphs — no\small, noquotation, no centring. It is set as that here, and the first body paragraph is unindented because\section*'s before-skip is negative (\@afterindentfalse).article-twocolumnis one of the ten pre-existing byte-identical fixtures and its bytes change here, deliberately, because they are wrong independently of the abstract. Onmainthe candidate draws the full-width title block at y = 95.838–152.622 and then sets the abstract body inside it, at y = 124.622 / 136.578 / 148.533 in column 1, with the class'sAbstracthead absent altogether. The overlap is the limitation the pipeline already reports —\twocolumn[\@maketitle]with floats does not shorten the first page's columns by the title box (typeset.rs:let shift = if floats.is_empty() { height } else { 0.0 }) — and both fixtures have floats. Adding the head does not fix that, and I have not attempted it here; it belongs with the float paginator. It does move both pages measurably closer:article-twocolumnp1conf-paperp1conf-papergains oneoverfull_vbox(page 1, 2.25 pt): the extra head line in a column the float path will not shorten. That is the same limitation surfacing, and it is reported rather than hidden.Measured
tools/visual-oracle/rank.py, candidate vs the pinned references, geometry only (nopdftoppm, no Ghostscript on this host). Control built fromorigin/mainin the same working directory as the branch build, serial runs, zero font-failure diagnostics.min-abstractplain-article(10 pt)lab-report(11 pt)hyperref-toc(11 pt)natbib-review(11 pt)conf-paper(two-column)article-twocolumntwelvept-plainEvery other page of every other fixture is unchanged to the digit. Of the 41 divergence probes, only
min-abstractmoves at all, and it moves to exact.Gates
fixtures/real-worldbyte-identicalarticle-twocolumnchanged deliberately, measured abovemin-abstract24.58 bp → ~0flashtex-render(v1 and v2 payloads agree), 0 errors, 0 overfull.flashtex-compilerwas not built or run in this lane, so the assignment's note that it reports 4 for HW2 is carried forward unverified, not measured here.crates/render-pipelinesuitemin-abstractchangesmath_resource_profileandmissing_glyphwarnings are unchanged frommaintests/abstract_env.rspins all four facts — the two\@itembranches, the\small/quotationshape, and the two-column\section*— against the\showoutputglue quoted in the test.Still open, named
plain-article'soverfull_vboxon page 2 (11.83 pt) is unchanged: the abstract fix neither resolved nor moved it, and page 2's median dy is +3.929 before and after. It is not an abstract problem.\twocolumn[\@maketitle]with floats (above) — the dominant remaining error in both two-column documents.natbib-review's residual 1.005 bp is page shrink caused by the unimplemented natbib, not by this environment.titlepagebranch is still not set; the compiler's own limitation stands for it, andbook.clsdefines noabstractat all.pdflatex is an oracle only and never runs in the product path. No committed reference or sidecar was regenerated; the scratch probes are TeX Live 2025 (
pdfTeX 3.141592653-2.6-1.40.27), labelled, and not committed.