Defer bottom floats like TeX page building

This commit is contained in:
gloamxun committed 2026-10-23 23:48:28 +08:00
1 parent 17638996a1
commit 4dd28b3aa7
6 files changed
+66 -34

No files matched your search

+1 -1
View File
@@ -471,7 +471,7 @@ Route-D integration can also be checked against a real TeX page: `cargo test -p
Route-D float placement mirrors TeX fractions:
- `Document::top_fraction_percent` defaults to 70 (`\topfraction`); a taller top float keeps body text off its page.
- `Document::bottom_fraction_percent` defaults to 30 (`\bottomfraction`); a taller bottom float moves to the next page.
- `Document::bottom_fraction_percent` defaults to 30 (`\bottomfraction`); a bottom float that cannot fit is carried to the next page's bottom while the current page keeps filling, matching TeX's page builder.
- `Document::top_number`, `bottom_number` and `total_number` default to TeX's 2, 1 and 12; they cap top floats, bottom floats and all floats on one page.
- `Document::float_sep` defaults to 12pt (`\floatsep`); stacked top floats or stacked bottom floats reserve that gap between each other, in full layout and after `Engine::edit`.
- `Document::text_float_sep` defaults to 20pt (`\textfloatsep`); a page that carries both floats and body text reserves one such gap between them. `Page::display_list_with_layout(page_goal, text_float_sep)` mirrors that in rendered output, while `display_list_with_goal` keeps the historic no-gap behaviour for callers without document settings.