Verify narrow-measure pretolerance against pdfLaTeX

This commit is contained in:
gloamxun committed 2026-10-24 00:07:26 +08:00
1 parent 01ed1b7c21
commit c3bb8af8a9
3 files changed
+27 -9

No files matched your search

+5 -4
View File
@@ -94,9 +94,10 @@ final line held at its declared shrink limit), 130-160pt the final-pass
overfull box, and 180-240pt ordinary tolerance solutions. Two further fixtures pin register behaviour at 120pt:
`\pretolerance=10000` stops before hyphenation and `\hyphenpenalty=10000`
inhibits it, leaving the overfull first-fit lines TeX produces. A
`\tolerance=10000` fixture matches pdfLaTeX at 100-240pt; at very narrow
measures (70/85pt) the demerits optimum still picks different hyphenated
breaks, which stays documented as a known approximation. Hyphenated paragraphs are compared at 80, 100 and 120pt, and a
`\tolerance=10000` fixture matches pdfLaTeX at 100-240pt, and a 70/85pt
fixture with `\pretolerance=10000 \tolerance=200` confirms that the
pretolerance pass keeps loose one-word lines before hyphenation is
considered. Hyphenated paragraphs are compared at 80, 100 and 120pt, and a
70/85pt fixture runs with `\doublehyphendemerits` and `\finalhyphendemerits`
at 0 and 10000 so the reference breaks change with the demerits. A 120pt
fixture with `\hangindent=20pt \hangafter=1` checks every line origin
@@ -366,7 +367,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 310 unit tests plus seven route-D integration tests and thirty-four oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 466 tests (310 route-D unit, 7 route-D integration, 34 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 310 unit tests plus seven route-D integration tests and thirty-five oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 467 tests (310 route-D unit, 7 route-D integration, 35 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