Honour TeX looseness when an alternative line count exists

This commit is contained in:
gloamxun committed 2026-10-23 13:46:32 +08:00
1 parent 96cd98f833
commit a6397fcfef
6 files changed
+219 -99

No files matched your search

+5 -3
View File
@@ -48,7 +48,7 @@ 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`). 424 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 426 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
@@ -219,8 +219,10 @@ is added from 2000, and `\frenchspacing` switches it off; a 150pt punctuated
oracle fixture matches pdfLaTeX's line breaks and word positions.
`\looseness` adjusts the final line count inside TeX's `[1,9]` window and is
reverted when no feasible layout exists; 120pt and 200pt fixtures require one
extra line and match pdfLaTeX exactly.
reverted when no feasible layout exists; a 120pt fixture requires one extra
line and matches pdfLaTeX exactly. When the requested count is infeasible
TeX's own output picks an alternative optimum that route-D does not
reproduce; the infeasible case is covered by unit tests.
Interline spacing follows TeX: the first baseline sits at the paragraph's
ascent, each later baseline advances by `\baselineskip` when the resulting gap