Expose route-D pages through a preview endpoint

This commit is contained in:
gloamxun committed 2026-10-20 21:15:35 +08:00
1 parent 12288b51ee
commit 875f8a7600
8 files changed
+151 -5

No files matched your search

+6 -5
View File
@@ -232,7 +232,7 @@ for a later overlaid slash.
| M4 math | partial | atoms, scripts, fractions, roots, delimiters, accents, operators, classes, braces, boxed, negated; no math painter/shrink wrapping |
| M5 NFSS/TFM | partial | runtime `cmr10.tfm` widths/heights/depths/kern pairs and ff/fi/fl/ffi/ffl ligatures; all five text faces embed Liberation Serif/Mono as Type0 CID fonts with Identity-H, ToUnicode and `/W` glyph widths; no Base-14 dependency; SVG carries family/weight/style |
| M6 specials/XObject | partial | raw specials, RGB image XObjects, URI link annotations; class/package execution absent |
| M7 incremental integration | partial | edit replay + page hashes, not wired into v1 preview |
| M7 incremental integration | partial | route-D plain-text preview endpoint with page hashes; editor integration pending |
v1 remains the production renderer; the route-D core is additive and tested independently.
@@ -262,7 +262,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 121 unit tests plus one route-D integration test. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 203 tests (122 route-D unit, 1 route-D integration, 71 v1 integration, 4 server, 4 v1 unit, 1 doctest). v1 remains the live server path.
The crate currently has 131 unit tests plus one route-D integration test. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 213 tests (131 route-D unit, 1 route-D integration, 71 v1 integration, 5 server, 4 v1 unit, 1 doctest). v1 remains the live server path.
### M0 incremental demo
@@ -292,8 +292,9 @@ deliberately open rather than approximated:
- **M5**: `cmr10.tfm` is parsed at runtime with widths, glyph heights/depths and kern pairs. all five text faces embed Liberation Serif/Mono as Type0/Identity-H with `/W` widths; ff/fi/fl/ffi/ffl ligatures come from TFM, but full NFSS family switching and italic correction are not implemented.
- **M6**: `\output`, `\insert`, mark/float output policies, class-file execution and
math limit policies are only partially modeled.
- **M7**: the route-D engine is not yet wired into the v1 live preview. The server
still uses the v1 semantic pipeline, and page-level checkpoints are exercised by
the route-D integration test only.
- **M7**: first service step is `POST /api/route-d/preview`, which lays out
blank-line-separated plain text and returns route-D pages with SVG and page
hashes. It is not yet the editor preview: LaTeX-to-route-D semantic mapping and
edit-diff reuse inside the project preview remain open.
- `\middle` does not scale with its enclosing delimiter; math delimiters are
scaled glyphs rather than TeX delimiter variants.