Skip to content

\unvbox inside a paragraph ends it: a vbox's lines are not horizontal material (#629) - #641

Merged
tannevaled merged 2 commits into
mainfrom
unvbox-ends-the-paragraph
Oct 22, 2026
Merged

tannevaled merged 2 commits into
mainfrom
unvbox-ends-the-paragraph

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

A VBOX's contents are finished lines, and lines cannot join a horizontal list.
place() routes to the paragraph list while a paragraph is open, so \unvbox inside
one handed the lines to the line breaker, which glued them end to end and re-broke the
whole thing as a single paragraph.

acmart writes exactly that, twice, in its title machinery:

\noindent\unvbox\@tempboxa                       % acmart.cls:2303
\vbox{\noindent\unvbox\mktitle@bx\par\medskip…}  % acmart.cls:2652

\noindent opens a paragraph, so both took that path.

⚠ The oracle settles this, not the rulebook

tex.web §1110 calls \unvbox in horizontal mode an illegal case, which would mean
ignoring it. That cannot be right here: the reference PDFs carry the material. A
fifteen-line witness through tectonic keeps every line broken at its own measure —
so the paragraph is ended and the lines go to the vertical list.

Same witness, our engine:

widest line
before 1679.70pt
after 255.09pt

(the box was built at \hsize=120pt)

The paper that found it

2405.20319, acmart acmtog, page 1:

before title and five author blocks on ONE line, ending at x=3356.68pt
after title broken at 298.44pt, each author on its own line at 266–296pt

on a 612pt sheet.

⛔ The trigger is the teaser figure — it is what makes \mktitle@bx tall enough
for \@printtopmatter's \vsplit loop (acmart.cls:2299-2308) to run, which is where
the first \noindent\unvbox lives. #618 had looked at teaserfigure and written it
off as a correlate; it was a correlate of the word count, which was a different
question. Commenting out the one \input{figures/banner} line takes that same title
line from 3356.68pt to 298.44pt — a direct witness, not a correlation.

Corpus

Papers drawing past their own page edge in their first two pages, control c4e1cfc
(the parent):

papers widest line
before 23 / 154 3357pt
after 22 / 154 1788pt

One paper leaves the list and the corpus's widest line is nearly halved. The page
count A/B is 0 of 154 — which is the point of #629: the page count cannot see
where the ink lands, and neither can the ink count or the text layer. Only the
geometry can.

Tests

⛔ Three assertions before one of them measured anything, and the two that failed are
in the comment so the next edit does not repeat them:

  • a walk over every box reports the vbox that holds the lines, packed to the
    enclosing measure;
  • a walk over every hbox reports the document's own AVANT line, packed to
    \hsize=345pt.

Both numbers are identical before and after the fix — a test that can neither fail for
the right reason nor pass for it. Only the boxes that carry the witness text
answer the question. Run against the unfixed file it fails at 345.00pt against 120pt.

\unhbox is untouched and has its own test: an hbox's contents are horizontal
material, so unboxing one inside a paragraph is the normal case.

🤖 Generated with Claude Code

tannevaled and others added 2 commits October 22, 2026 08:57
… material (#629)

A VBOX's contents are finished LINES, and they cannot join a horizontal list. place()
routes to e.parList while a paragraph is open, so \unvbox inside one handed the lines
to the line breaker, which glued them end to end and re-broke the whole thing as a
single paragraph.

acmart writes exactly that, twice, in its title machinery:

	\noindent\unvbox\@tempboxa                       % acmart.cls:2303
	\vbox{\noindent\unvbox\mktitle@bx\par\medskip…}  % acmart.cls:2652

\noindent opens a paragraph, so both took that path.

⚠ The oracle, not the rulebook, settles what to do. tex.web §1110 calls \unvbox in
horizontal mode an illegal case, which would mean IGNORING it — and that cannot be
right, because the reference PDFs carry the material. A fifteen-line witness through
tectonic keeps every line broken at its own measure, so the paragraph is ENDED and the
lines go to the vertical list.

Measured, same witness, our engine:

	widest line   1679.70pt → 255.09pt   (the box was built at \hsize=120pt)

and on 2405.20319, the real paper that found this:

	title + five author blocks   ONE line to x=3356.68pt → title broken at 298.44pt,
	                             each author on its own line at 266-296pt

on a 612pt sheet. #629, where it was the widest line left in the corpus.

⛔ The test measures only the boxes that CARRY the witness text. Two near misses
first: a walk over every box reports the vbox that holds the lines, packed to the
enclosing measure; a walk over every hbox reports the document's own "AVANT" line,
packed to \hsize=345pt. Both numbers are identical before and after the fix — a test
that can neither fail for the right reason nor pass for it. It is run against the
unfixed file and fails there at 345.00pt against 120pt.

\unhbox is untouched and has its own test: an hbox's contents ARE horizontal material,
so unboxing one inside a paragraph is the normal case.

Co-Authored-By: Claude Opus 5 <[email protected]>
… figure

49 → 22 papers drawing past their own page edge, widest line 6619pt → 1788pt,
measured with `measure render` + the off-page counter on the first two pages of
each of the 154 corpus papers, against a floor of 2 on the reference PDFs.

Co-Authored-By: Claude Opus 5 <[email protected]>
@tannevaled
tannevaled merged commit bb310b8 into main Oct 22, 2026
18 checks passed
@tannevaled
tannevaled deleted the unvbox-ends-the-paragraph branch October 22, 2026 07:24
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