Place top floats through the paged builder

This commit is contained in:
gloamxun committed 2026-10-23 03:30:15 +08:00
1 parent bc0d29ace4
commit aa081e3dc6
5 files changed
+136 -13

No files matched your search

+8 -6
View File
@@ -66,9 +66,10 @@ yet generic `fil`/`fill` glue
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 and insertion classes
(per-class limits with held-over material), but floats and incremental
checkpoint replay still use the scrolling builder, and the interpreted
documents made of box/glue/penalty/mark units, insertion classes
(per-class limits with held-over material) and top floats (with
`\textfloatsep` reserved above the body); bottom/in-text floats and
incremental checkpoint replay still use the scrolling builder, and the interpreted
`\output` subset handles `\shipout`, `\ifdim` and `\ifnum` over page
registers such as `\pageno`, `\outputpenalty` and `\deadcycles`;
3. `\insert` classes model `\count`/`\dimen`/`\skip` but are not TeX
@@ -270,9 +271,10 @@ goal, so overfull pages take the least overfull break. `Document::h_offset` and
body without moving the sheet; a route-D integration fixture checks the shift
with `pdftotext -bbox`, and the PDF endpoint reads leading `\hoffset`/`\voffset`
dimension assignments from the source. Insertion classes are placed by the
paged builder with their limits and held-over material; floats and checkpoint
replay still fall back to the scrolling builder, which stays the default until
it has a paged equivalent. Next: port those paths and paper margins, then extend the `\output`
paged builder with their limits and held-over material, and top floats are
placed at the head of a fragment with `\textfloatsep` reserved above the body;
bottom/in-text floats and checkpoint replay still fall back to the scrolling
builder, which stays the default until it has a paged equivalent. Next: port those paths and paper margins, then extend the `\output`
interpreter past the shipout/ifdim/ifnum/ifodd/ifcase subset.
Acceptance: 10 page fixtures (article text, footnotes, floats, forced breaks);