Make the pdfTeX raster comparison actually run

pdftoppm --version exits non-zero, so the raster test silently skipped on every host. Probe pdftoppm with -v instead, lay out the route-D paragraph at the same scaled-point geometry the server uses, and compile the pdfTeX control page as Letter (612x792bp). The ink line count and left/right/bottom edges now match exactly.
This commit is contained in:
gloamxun committed 2026-10-21 08:10:29 +08:00
1 parent 5b4eadb88f
commit aeacf53518
3 files changed
+25 -7

No files matched your search

+2 -2
View File
@@ -267,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 153 unit tests plus two route-D integration tests. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 251 tests (153 route-D unit, 2 route-D integration, 71 v1 integration, 19 server, 4 v1 unit, 1 core unit, 1 doctest). v1 remains the live server path.
The crate currently has 153 unit tests plus two route-D integration tests. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 250 tests (153 route-D unit, 2 route-D integration, 71 v1 integration, 19 server, 4 v1 unit, 1 core unit, 1 doctest). v1 remains the live server path.
### M0 incremental demo
@@ -309,6 +309,6 @@ deliberately open rather than approximated:
through `Engine::edit` and reports the changed/recomputed pages, while
structural edits fall back to a full layout. The v1 semantic pipeline remains
the default fallback. LaTeX-to-route-D semantic mapping is still a subset, and
`route_d_page_matches_pdftex_raster_geometry` rasterizes the route-D PDF at 72 dpi and compares its ink line/left/bottom geometry against a pdfTeX page compiled with the same page geometry. The test skips on hosts without `pdflatex`/`pdftoppm`; exact glyph-outline pixel equality is still open because the two paths use different font outlines.
`route_d_page_matches_pdftex_raster_geometry` lays out a 480pt CMR10 paragraph at the same scaled-point geometry the server uses, rasterizes the route-D PDF and a pdfTeX Letter page at 72 dpi, and asserts matching ink line count plus left/right/bottom edges. It skips on hosts without `pdflatex`/`pdftoppm`. Exact glyph-outline pixel equality is still open because the two paths use different font outlines.
- `\middle` does not scale with its enclosing delimiter; math delimiters are
scaled glyphs rather than TeX delimiter variants.