Repository navigation
\footnoterule is a macro the page builder executes, not three nodes built in Go (#677) - #679
Merged
Merged
Conversation
…built in Go FROM THE PARITY ROADMAP (#677), now its head: \\footnoterule is named by 62 of the 154 measured papers, and 60 of them REDEFINE it -- counted on their own sources, with the usual positive and negative controls on the pattern. THE DEFECT. assemblePage emitted three hard-coded nodes: kernNode{width: -ptToSP(3)}, ruleNode{width: e.hsize * 2 / 5, height: defaultRule}, kernNode{width: ptToSP(2.6)}, so no class and no document could change the rule. What this drew happens to be article.cls:605-608, \\renewcommand\\footnoterule{\\kern-3\\p@ \\hrule\\@width.4\\columnwidth \\kern2.6\\p@} which is why nothing ever looked wrong: the engine agreed with the commonest class by coincidence and with nobody else. The KERNEL s own rule is a fixed 2in (latex.ltx:13162-13163) -- a different number -- so even the default was only right for article and its relatives. MEASURED. A document asking for \\hrule width 3in height 2pt, read off the SVG: avant width="138" height="0.4" <- notre filet, le document ignoré apres width="216.81" height="2" <- 3in = 3 x 72.27 CONTROL, and it is the one that matters: a document that redefines NOTHING renders BYTE-IDENTICALLY before and after. 154 of 154 corpus papers can carry footnotes, so a macro path that shifted the default would have moved everything. The one internal difference is 138 sp -- 0.002 pt -- because TeX reads ".4" and multiplies in scaled points where the Go code did an integer `* 2 / 5`. It is the reference s arithmetic that wins, and it rounds away at any output precision, which is why the SVG is identical. The test states the tolerance and why it exists. ⛔ \\let\\footnoterule\\relax DRAWS NOTHING. article.cls:172 does exactly that in the \\if@titlepage branch, so a title page s notes carry no rule. A name that exists but is not a macro therefore yields an EMPTY list: reading "not a macro" as "use the built-in rule" would put a rule on the one page the class took trouble to clear. The precedent for executing a macro at page-assembly time is latexHead (fancyhdr.go:176), which reads \\@oddhead s body the same way. Verified by mutation: forcing the fallback fails the redefinition test and the \\relax test, and leaves the default-geometry control passing. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
The head of the parity roadmap (#677) now that
\thefootnoteis closed:\footnoteruleis named by 62 of the 154 measured papers — and 60 of themredefine it, counted on their own sources with the usual positive and negative
controls on the pattern. The name's frequency is not the defect's size; the
redefinitions are.
The defect
assemblePageemitted three hard-coded nodes:so no class and no document could change the rule. What this drew happens to be
article.cls:605-608:which is why nothing ever looked wrong — the engine agreed with the commonest class
by coincidence and with nobody else. The kernel's own rule is a fixed
2in(
latex.ltx:13162-13163), a different number, so even the default was right only forarticleand its relatives.Measured
A document asking for
\hrule width 3in height 2pt, read off the SVG:1380.4216.812216.81is 3 × 72.27. The redefinition takes effect exactly; before, the document wasignored.
The control that matters
A document redefining nothing renders byte-identically before and after. All 154
corpus papers can carry footnotes, so a macro path that shifted the default would have
moved everything.
The one internal difference is 138 sp — 0.002 pt — because TeX reads
.4andmultiplies in scaled points where the Go code did an integer
* 2 / 5. The reference'sarithmetic wins, and it rounds away before any output precision, which is why that SVG
is identical. The test states the tolerance and why it exists.
\let\footnoterule\relaxdraws nothingarticle.cls:172does exactly that in the\if@titlepagebranch, so a title page'snotes carry no rule. A name that exists but is not a macro therefore yields an empty
list: reading "not a macro" as "use the built-in rule" would put a rule on the one
page the class took trouble to clear.
The precedent for executing a macro at page-assembly time is
latexHead(
fancyhdr.go:176), which reads\@oddhead's body the same way.Verified by mutation: forcing the fallback fails the redefinition test and the
\relaxtest, and leaves the default-geometry control passing.
Corpus A/B
Control
40ee57f(main), treatmentd0c7ec6:40 of 154 render differently, none of them visible to a page count. The headline
bias is unchanged — a no-regression result.
The figure sits under its bound: 60 papers redefine
\footnoterule, 40 moved. The restpresumably redefine it to something equivalent to
.4\columnwidth, or do it in a filethis engine does not execute, or carry no footnote on a rendered page.
⚠ What I have not separated out: the 138 sp arithmetic difference could in principle
tip a borderline rounding on some document, so I cannot claim all 40 moved because a
redefinition took effect. The plain-document control says it does not happen there; it
does not prove it happens nowhere.
🤖 Generated with Claude Code