Route route-D page breaking through the paged builder

This commit is contained in:
gloamxun committed 2026-10-23 15:02:52 +08:00
1 parent 08a312be82
commit 6b3145fd09
6 files changed
+113 -26

No files matched your search

+8 -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`). 449 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 450 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
@@ -67,11 +67,13 @@ source-level `\hyphenation{...}` exceptions and `\parshape` measures,
`\raggedright` (infinite `\rightskip` fil), explicit
`\hfil`/`\hfill` glue orders, and `\prevgraf` visibility in the output
routine;
2. the default builder is still the scrolling builder with fraction
policies, now with line-level paragraph splits; `page::PageBuilder`
implements the candidate-breakpoint cost model (badness + penalty, glue
setting, `\topskip`, `\maxdepth`) and `Engine::layout_paged` runs it for
documents made of box/glue/penalty/mark units, insertion classes
2. the scrolling builder remains the non-paged fallback with fraction float
policies; `page::PageBuilder` implements the candidate-breakpoint cost
model (badness + penalty, glue setting, `\topskip`, `\maxdepth`) and
`Engine::layout_paged` runs it for documents made of
box/glue/penalty/mark/float/insertion units, with paragraphs expanded to
one node per line so pages break inside them; route-D previews and PDFs
use the paged builder when the document is expressible, insertion classes
(per-class limits with held-over material) and top and bottom floats
(`\textfloatsep` above the body, `\floatsep` between stacked bottom
floats, `\bottomfraction` cap); in-text floats flow inline, so every