Repository navigation
v0.260.0 — shorthands that hid an \end, and a class's own options
Two gaps in how a document's own shorthands and a class's own options reach the
engine — and the truncation census re-measured behind them.
An \end shorthand built on another shorthand (#517, #626)
A raw-token scanner must expand a parameterless macro whose body begins with
\end, or the terminator never surfaces and it swallows the rest of the document.
The rule looked exactly one hop, and shorthands are routinely built on other
shorthands:
\def\ba{\begin{array}} \def\ea{\end{array}}
\def\bda{\begin{displaymath}\ba} \def\eda{\ea\end{displaymath}}\eda reaches \end through \ea, so it went into the maths source as a literal
and the \end{displaymath} behind it was never seen. expandsToCloseCS now walks
the chain, bounded at four hops and as narrow at every hop as it was at one.
arXiv 2603.13142: 2 pages of a 46 KB source → 17, and its "1 group still open at
end of document" warning is gone.
\DeclareOption defines \ds@<option>, \@options runs them (#625, #627)
A class may apply one of its own options by calling the macro the declaration
left behind — base/ltclass.dtx stores it as \csname ds@#1\endcsname, and
\ProcessOptions reaches that same macro through \@use@ption. We recorded the
code on the load frame and defined nothing, so aas.cls's \ds@letterpaper was an
undefined command.
\@options, the LaTeX 2.09 spelling, is now \ProcessOptions* as the kernel
defines it. For a class written to that spelling it is the only option
processing there is, so skipping it meant no option ran at all.
The truncation census, re-measured
measure trunc over the same 1000 arXiv sources:
at eb223a4 |
at this release | |
|---|---|---|
| runaway guard tripped | 23 | 6 |
| groups still open | 75 | 62 |
| either | 77 | 64 |
| rendered as a SINGLE page | 12 | 1 |
The README now carries that breakdown rather than the total, because the two alarms
do not say the same thing: an aborted loop has lost content, while groups left
open may be only a leak — seven papers measured the same day carry that alarm and
render 14 to 42 pages. The one remaining single-page source is 2607.05497
(aas.cls), tracked in #625.
Controls
Both changes: 154-paper arXiv corpus, font-controlled — 0 moved, Σ|·| = 0. The
first also over 198 beamer talks, the corpus endMacroLeadsToEnd's "last resort"
warning was measured on — 0 moved. govulncheck clean.
Neither zero is read as "no effect": the populations were counted first — 1108
papers use \ds@ and 453 use \@options, 9 and 3 of them inside the measured 154.
🤖 Generated with Claude Code