Cap page depth at Document max_depth

This commit is contained in:
gloamxun committed 2026-10-23 01:48:21 +08:00
1 parent 9599982b91
commit 169119a48d
5 files changed
+66 -10

No files matched your search

+6 -4
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`). 311 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 313 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
@@ -243,9 +243,11 @@ applying `\topskip` to the first box and `\maxdepth` to the page depth. Seven
unit tests cover overfull avoidance, exact glue filling, forced penalties,
penalty-driven earlier breaks, `\topskip`, `\maxdepth` and marks.
`Engine::layout_paged` now feeds it every document whose units are single
vertical items and materialises the chosen fragments as hashed pages; floats,
insertions and checkpoint replay still fall back to the scrolling builder, which
stays the default until it has a paged equivalent. Next: port those paths, then
vertical items (`Document::max_depth` supplies `\maxdepth`) and materialises the
chosen fragments as hashed pages; ties go to the breakpoint closest to the page
goal, so overfull pages take the least overfull break. Floats, insertions and
checkpoint replay still fall back to the scrolling builder, which stays the
default until it has a paged equivalent. Next: port those paths, then
`\voffset`, insertion registers and the interpreted `\output`.
Acceptance: 10 page fixtures (article text, footnotes, floats, forced breaks);