Place the page body below geometry's top margin
The geometry package's top/bottom margins were only used to derive a text height; the laid-out body still started at the very top of the sheet, so the arXiv template's 1in top margin was ignored and text sat on the paper edge. Record top/bottom margins on PageGeometry and add the top margin to the page body's vertical offset, which both the SVG preview and the PDF writer honour; the page number and footer baseline move with the body. An explicit textheight still wins over the margin-derived one. The arXiv template's first baseline now sits at 1in + 12pt, still with zero warnings in two pages. Unit tests cover the margin parse/derive and a preview whose first baseline shifts by exactly one inch.
This commit is contained in:
1 parent
21d48866de
commit
7a615a8639
3 files changed
+50
-4
No files matched your search
@@ -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`). 975 workspace tests are green and no oracle
|
||||
PDF opt-in with `?engine=route-d`). 977 workspace tests are green and no oracle
|
||||
fixture is ignored. Preview JSON also carries a `warnings` array naming
|
||||
environments route-D cannot lay out and control words that survived layout, so
|
||||
unsupported source is reported instead of being silently typeset.
|
||||
@@ -387,7 +387,9 @@ commands are kept for the native section parser instead of expanding their class
|
||||
redefinitions, `\keywords` becomes a plain paragraph, `\lipsum[n]` expands to
|
||||
filler text, comments and external `\bibliography` commands are dropped, and a
|
||||
`center`/`flushleft`/`flushright` environment that follows text starts its own
|
||||
block. Class files are still mapped semantically rather than executed by a VM.
|
||||
block, and `geometry`'s `top`/`bottom` margins offset the page body (the arXiv
|
||||
first baseline is at 1in + 12pt) while an explicit `textheight` wins over the
|
||||
margins. Class files are still mapped semantically rather than executed by a VM.
|
||||
|
||||
### P7 — Service and incrementality
|
||||
|
||||
|
||||
+4
-1
@@ -370,7 +370,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`, `cmssbx10`, `cmssi10`, `cmcsc10`) supplies advances, kerns, ligatures, and italic correction for layout, the display list selects the matching face, and the PDF writes Computer Modern Type1 outlines for each built-in face (`cmr10`/`cmbx10`/`cmti10`/`cmbxti10`/`cmtt10`/`cmss10`/`cmssbx10`/`cmssi10`/`cmcsc10`, plus `cmmi10` for mathematical italic letters, `cmsy10` for math symbols and `cmex10` for big operators), falling back to Liberation subsets only for characters the Type1 encodings cannot address; those fallback glyphs keep their Unicode text under PDF extraction, so accented and Greek words round-trip; Type1 faces carry a ToUnicode CMap built from the requested characters, so glyphs whose names are ambiguous in the Adobe Glyph List (capital Omega, which would otherwise extract as U+2126) keep their intended code points. `Engine::edit` preserves the face when reflowing an edited paragraph.
|
||||
|
||||
The crate currently has 434 unit tests plus ten route-D integration tests and forty-two oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 975 tests (434 route-D unit, 353 engine binary unit, 10 route-D integration, 42 oracle, 71 v1 integration, 60 server, 4 engine unit, 1 core unit), with none ignored. v1 remains the live server path.
|
||||
The crate currently has 434 unit tests plus ten route-D integration tests and forty-two oracle fixtures. Workspace verification: `cargo fmt --all -- --check`; `cargo test --workspace --offline` runs 977 tests (434 route-D unit, 355 engine binary unit, 10 route-D integration, 42 oracle, 71 v1 integration, 60 server, 4 engine unit, 1 core unit), with none ignored. v1 remains the live server path.
|
||||
|
||||
### M0 incremental demo
|
||||
|
||||
@@ -491,6 +491,9 @@ deliberately open rather than approximated:
|
||||
`\keywords` becomes a plain paragraph, `\lipsum[n]` expands to filler text,
|
||||
comments and external `\bibliography` commands are dropped, and
|
||||
`center`/flush environments that follow text start their own block.
|
||||
`geometry`'s `top`/`bottom` options shift the page body below the sheet edge
|
||||
(the arXiv template's first baseline now sits at 1in + 12pt instead of the
|
||||
page edge), while an explicit `textheight` still wins over margins.
|
||||
- Page hashes cover rendered items/insertions/marks/floats, not source-dependency
|
||||
metadata, so replaying an earlier page cannot change its hash merely by
|
||||
re-attaching source hashes.
|
||||
|
||||
Reference in new issue
Block a user