Honour per-class insertion page limits

This commit is contained in:
gloamxun committed 2026-10-20 23:02:30 +08:00
1 parent ff3fff343d
commit a8e7499ce3
3 files changed
+69 -7

No files matched your search

+4 -1
View File
@@ -167,6 +167,9 @@ a single cost function.
- `Unit::vertical` and `Unit::insertion` build arbitrary vertical material and
reserved-height page insertions; insertion height is deducted from the
usable page goal and the material is attached to `Page::insertions`.
`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.
Insertions taller than a page are split at item boundaries across pages.
- Page breaking handles vertical boxes/glue, `Document::top_skip` and forced
vertical penalties (`penalty <= -10000`); positive penalties are recorded
@@ -264,7 +267,7 @@ M3 (partial): `Unit::halign` normalizes column widths, intercolumn gaps, row hei
Math coverage includes fractions/roots, scripts, `\left...\right` with body-scaled delimiters, `\middle`, `\big`/`\Big`/`\bigg`/`\Bigg` and their `l`/`r` forms, control-sequence delimiters, accents (dot/check/breve/acute/grave/ring), `\text`/`\mathrm`, `\overbrace`/`\underbrace`, `\overset`/`\underset`, `\binom`, `\cancel`/`\bcancel`/`\xcancel`, `\bmod`/`\pmod`, fence symbols, `\operatorname*` and `\mathop` limits.
The crate currently has 141 unit tests plus one route-D integration test. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 236 tests (141 route-D unit, 1 route-D integration, 71 v1 integration, 18 server, 4 v1 unit, 1 doctest). v1 remains the live server path.
The crate currently has 142 unit tests plus one route-D integration test. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 237 tests (142 route-D unit, 1 route-D integration, 71 v1 integration, 18 server, 4 v1 unit, 1 doctest). v1 remains the live server path.
### M0 incremental demo