Model TeX interline glue and parskip

This commit is contained in:
gloamxun committed 2026-10-23 01:36:26 +08:00
1 parent 8cb09ea5a8
commit 49bd9b63e6
8 files changed
+200 -32

No files matched your search

+15 -6
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`). 305 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 301 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
@@ -57,9 +57,10 @@ Known gaps, in dependency order:
`\adjdemerits`, `\doublehyphendemerits`, `\finalhyphendemerits`,
`\hyphenpenalty`, `\exhyphenpenalty`, `\hyphenation` exceptions,
`\hangindent`/`\hangafter`/`\parshape` line geometry, `\parfillskip`
with or without `fil`, default `\sfcode` sentence spacing and
`\looseness`), but not yet custom `\sfcode` overrides or generic
`fil`/`fill` glue orders;
with or without `fil`, default `\sfcode` sentence spacing,
`\looseness`, and `\baselineskip`/`\lineskip`/`\parskip` interline
glue), but not yet custom `\sfcode` overrides, generic `fil`/`fill` glue
orders or `\prevgraf`;
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
@@ -200,9 +201,17 @@ oracle fixture matches pdfLaTeX's line breaks and word positions.
reverted when no feasible layout exists; 120pt and 200pt fixtures require one
extra line and match pdfLaTeX exactly.
Interline spacing follows TeX: the first baseline sits at the paragraph's
ascent, each later baseline advances by `\baselineskip` when the resulting gap
clears `\lineskiplimit`, otherwise by `\lineskip`, and `\parskip` (default
`0pt`) separates paragraph units in the vertical list. Page-level `\topskip`
placement remains part of P2, and a paragraph still reserves a whole number of
line boxes for pagination.
Still open: generic `fil`/`fill` glue orders, custom `\sfcode` overrides,
vertical-list skips (`\baselineskip`, `\lineskip`, `\parskip`), double/final
hyphen demerit oracle fixtures, and more width fixtures.
`\prevgraf`, explicit `\vskip` classes (`\smallskip` and friends), page-level
`\topskip` placement, double/final hyphen demerit oracle fixtures, and more
width fixtures.
### P2 — Vertical list, page builder, `\output` (L2)