Cover bottom float page placement with pdfLaTeX

This commit is contained in:
gloamxun committed 2026-10-23 23:39:24 +08:00
1 parent a09b1d1d36
commit fd9790cf28
3 files changed
+82 -3

No files matched your search

+7 -1
View File
@@ -48,7 +48,7 @@ floats (`\floatsep`, `\textfloatsep`, `\intextsep`, `\topfraction`,
`\bottomnumber`, `\totalnumber`), insertion classes (`\skip`, fraction and
absolute limits, splitting), marks, Rust output hook, multi-page PDF, and the
route-D service endpoints (`/api/route-d/preview|pdf|edit`, project preview and
PDF opt-in with `?engine=route-d`). 458 workspace tests are green and no oracle
PDF opt-in with `?engine=route-d`). 459 workspace tests are green and no oracle
fixture is ignored.
Known gaps, in dependency order:
@@ -249,6 +249,12 @@ breaks; at `\tolerance=10000` the wide-measure fixture now matches pdfLaTeX at
breaks because the demerits optimum differs; that stays documented as a
known approximation.
Bottom floats now have their own page fixture: when the float fits, the
body break matches pdfLaTeX. When it does not fit the remaining body space,
the paged builder ends the current page and defers the float, while TeX
keeps filling the page before placing the float on the next one; that
deferral-fill case stays documented as a known approximation.
### P2 — Vertical list, page builder, `\output` (L2)
Scope:
+4 -2
View File
@@ -267,7 +267,9 @@ oracle fixture is ignored.
change page goals. The paged builder places top `Float` material at the top
of a page and bottom `Float` material at the page bottom: a late top float
starts the next page, a bottom float that cannot fit the remaining body
space is deferred, stacked bottom floats reserve `\floatsep`, and
space ends the current page and is deferred to the next page's bottom
(TeX instead keeps filling the current page before deferring the float,
which remains a documented approximation), stacked bottom floats reserve `\floatsep`, and
`\bottomfraction` caps the bottom float share, and a page whose top floats reach `\floatpagefraction` ships without body material. Route-D preview/PDF draw
pages through `display_list_with_layout` so the body clears
`\textfloatsep` / the bottom float area; the scrolling builder still
@@ -361,7 +363,7 @@ Math coverage includes fractions/roots, scripts, `\left...\right` with body-scal
Paragraph units carry a `ParagraphFont`; `Unit::paragraph_with_face` and `Unit::paragraph_with_style_and_face` select Roman, bold, italic, mono, or sans. The corresponding Computer Modern TFM (`cmr10`, `cmbx10`, `cmti10`, `cmbxti10`, `cmtt10`, `cmss10`) supplies advances, kerns, ligatures, and italic correction for layout, while the display list and PDF select the matching Liberation face. `Engine::edit` preserves the face when reflowing an edited paragraph.
The crate currently has 304 unit tests plus seven route-D integration tests and thirty-two oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 458 tests (304 route-D unit, 7 route-D integration, 32 oracle, 71 v1 integration, 26 server, 4 v1 unit, 1 core unit, 13 binary units), with none ignored. v1 remains the live server path.
The crate currently has 304 unit tests plus seven route-D integration tests and thirty-three oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 459 tests (304 route-D unit, 7 route-D integration, 33 oracle, 71 v1 integration, 26 server, 4 v1 unit, 1 core unit, 13 binary units), with none ignored. v1 remains the live server path.
### M0 incremental demo