Honour finite parfillskip on the last line

This commit is contained in:
gloamxun committed 2026-10-23 01:22:16 +08:00
1 parent 8993186005
commit bd109d03c5
6 files changed
+146 -16

No files matched your search

+11 -5
View File
@@ -48,16 +48,17 @@ floats (`\floatsep`, `\textfloatsep`, `\intextsep`, `\topfraction`,
`\bottomnumber`, `\totalnumber`), insertion classes (`\skip`, fraction and
absolute limits, splitting), marks, Rust output hook, multi-page PDF, and the
route-D service endpoints (`/api/route-d/preview|pdf|edit`, project preview and
PDF opt-in with `?engine=route-d`). 293 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 296 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
1. paragraph breaking reproduces TeX's passes and demerits (including
`\adjdemerits`, `\doublehyphendemerits`, `\finalhyphendemerits`,
`\hyphenpenalty`, `\exhyphenpenalty`, `\hyphenation` exceptions and
`\hangindent`/`\hangafter`/`\parshape` line geometry), but not yet
`\looseness`, spacefactor or `\parfillskip`/fil glue orders;
`\hyphenpenalty`, `\exhyphenpenalty`, `\hyphenation` exceptions,
`\hangindent`/`\hangafter`/`\parshape` line geometry and `\parfillskip`
with or without `fil`), but not yet `\looseness`, spacefactor or generic
`fil`/`fill` glue orders;
2. the page builder is a scrolling builder with fraction policies, not a TeX
page builder with badness and an interpreted `\output`;
3. `\insert` classes are data structures, not TeX registers and an output
@@ -184,7 +185,12 @@ and left offset; the DP remembers a candidate's line number so the geometry can
vary per line, and a 120pt oracle fixture checks every line origin against
pdfLaTeX.
Still open: `\parfillskip`/fil glue orders, `\looseness`, spacefactor/
`\parfillskip` is modelled: with the default `0pt plus 1fil` the last line is
left short, and a finite/zero `\parfillskip` makes the final line justify like
any other; a 120pt `\parfillskip=0pt` oracle fixture confirms pdfLaTeX's
rebalancing of the preceding lines.
Still open: generic `fil`/`fill` glue orders, `\looseness`, spacefactor/
`\sfcode`, vertical-list skips (`\baselineskip`, `\lineskip`, `\parskip`),
double/final hyphen demerit oracle fixtures, and more width fixtures.