Start float pages at the top margin

This commit is contained in:
gloamxun committed 2026-10-21 12:57:51 +08:00
1 parent d2df1907be
commit 93330a85ef
3 files changed
+61 -5

No files matched your search

+1
View File
@@ -475,6 +475,7 @@ Route-D float placement mirrors TeX fractions:
- `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.
- Floats that start a page sit at the top margin: float material does not consume `\topskip`; only body text does.
- `FloatPlacement::Here` keeps an `[h]` float in the body flow: `Document::in_text_sep` (TeX `\intextsep`, default 12pt) separates it from the surrounding text, the float moves to the next page when it does not fit, and it counts against `\totalnumber`. `Page::display_list_with_layout` paints the float at the same flow position the page builder reserved.
- `Engine::edit` applies the float fractions, number limits and separations, so incremental layout matches full layout.