Repository navigation
tabular: \noalign contributes its vertical material (tex.web §785) - #598
Conversation
Two parsers read alignments here, and only one of them honoured \noalign.
halign.go has implemented it since TikZ needed it; the tabular parser, which
collects the whole body as tokens before building any of it, dropped both the
command and its group. The census of skipped commands put it at 64 uses over
8 papers of the fidelity corpus, almost all of them one idiom:
\hline\noalign{\vskip .5mm}
so those tables sat tighter than the reference's by a skip per use.
tex.web §785 makes the group VERTICAL material contributed to the list
between the rows, and that is where it now goes. The group is a real group,
as §785 opens one, so a \vskip or a font change inside it stops at it.
Measured against the reference on a witness with \vskip 10pt after an \hline,
first row's baseline:
without with shift
tectonic 133.57 143.53 9.96bp
gotex 133.55 143.51 9.96bp
9.96bp is 10pt read in big points, and the absolute positions agree to
0.02bp.
Two tests, each proved to fail without the fix (mutate): the table grows by
exactly the skip, and an empty \noalign — or one with no group — leaves the
table and the rest of the document standing, which is the failure mode a
missing \noalign produced in a TikZ node.
Co-Authored-By: Claude Opus 5 <[email protected]>
Correction: the fix removes 19 of those 64 uses, not all of themI quoted the census figure — 64 uses over 8 papers — where a reader takes it for So this covers 2 papers and 19 uses: the ones that write Those are The rest of this PR stands as measured: the witness shifts by 9.96bp on both sides, This is my own rule caught late — a frequency rank is a rank of candidates, and 🤖 Generated with Claude Code (Localised further in #602.) |
Two parsers read alignments in this engine, and only one of them honoured
\noalign.halign.gohas implemented it since a TikZ node needed it; thetabularparser — which collects the whole body as tokens before building any ofit — dropped both the command and its group.
The census of skipped commands puts it at 64 uses over 8 papers of the
fidelity corpus, almost all of them one idiom:
so those tables sat tighter than the reference's by a skip per use.
tex.web§785 makes the group vertical material contributed to the listbetween the rows, and that is where it now goes. The group is a real group, as
§785 opens one, so a
\vskipor a font change inside it stops at it.Measured against the reference
A witness with
\vskip 10ptafter an\hline, first row's baseline:9.96bp is 10pt read in big points, and the absolute positions agree to 0.02bp.
The expectation written into the test is that measurement, not a number I chose.
Tests
Two, each checked with
mutateagainst the half it covers:\noalignand never emits itThe second test is the one that matters beyond the skip: an empty
\noalign, orone with no group, must leave the table and the rest of the document standing.
A parser that mistakes either for a data row builds a row of no cells — which is
exactly how a missing
\noalignonce took the remainder of a document with it(see
scanNoalign's own note).🤖 Generated with Claude Code