Split insertions at the page break and hold over the tail

This commit is contained in:
gloamxun committed 2026-10-23 02:26:56 +08:00
1 parent b7b75fbff1
commit b5ec36ae2a
4 files changed
+202 -144

No files matched your search

+5 -1
View File
@@ -207,6 +207,9 @@ oracle fixture is ignored.
`Document::insertion_classes` sets a per-class page fraction; an insertion
that would exceed the class limit ships the page and continues on the next
one, splitting at item boundaries when the insertion itself is too tall.
When only part of an insertion fits on the page where its anchor text ends,
that part stays there and the remainder is held over to the next page, so
later body text follows the held-over tail.
`Document::insertion_skip` models TeX's `\skip\footins` and is reserved once
before the first insertion class on a page; it defaults to zero, and
`InsertionClass::skip` overrides it for a single insertion class.
@@ -215,7 +218,8 @@ oracle fixture is ignored.
insertion cost 60pt of page height. `max_height` is the `\dimen<number>`
absolute cap. Full layout, incremental replay and the item-boundary splitter
all use the same reserved height.
Insertions taller than a page are split at item boundaries across pages.
Overflowing insertions are split at item boundaries: the fitting head stays
on the anchor page and the tail is held over to the following page.
- Page breaking handles vertical boxes/glue, `Document::top_skip` and forced
vertical penalties (`penalty <= -10000`); positive penalties are recorded
but not yet part of page badness. `VerticalItem::Insertion` material is