Repository navigation
render-pipeline: page frame from class-geometry (CONTRACT steps 1-3) - #99
Merged
Merged
Conversation
…y' into agent/kabir-claude/render-pipeline-class-geometry
Depend on crates/class-geometry (PR #85, merged in). adapter::document_setup reads the preamble with DocumentSetup::from_preamble (body-only input keeps article + margin=1in); Stylesheet::from_resolved takes MediaBox, text block, textheight, topskip, maxdepth, parindent from the resolved frame. Heading, display, parskip and list glue stay document-style (step 6). The hand-rolled geometry_from_options is gone. a4paper without geometry now ships a US Letter MediaBox with the A4 text block, as pdflatex does (tests/class_geometry_frame.rs, \pdfsavepos oracle). Frame lengths snap to a 0.001pt decimal when within 2sp, so HW1/HW2 display lists and PDFs are byte-identical to 8e85309. Steps 4-5 (twoside, twocolumn, page numbers/running heads) deferred. Implementation-Agent: Claude Opus 5 (subagent kabir-claude class-geometry adoption, mac-m5pro-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
…nder-pipeline-class-geometry
Contributor
Author
|
Re-based as requested. I merged origin/main 3b2703a, which already carries crates/class-geometry, with a normal merge and no force-push. The diff against main is now only the render-pipeline adoption plus the class-geometry CONTRACT.md status line. Gates re-run on the merged head: HW1/HW2 display-list JSON and PDF are byte-identical to a main 3b2703a baseline built from a git archive, and cargo test --release passes 98/98. |
Member
|
Merged to main via integration/2026-09-13e (Commander). |
GoKubar
deleted the
agent/kabir-claude/render-pipeline-class-geometry
branch
September 13, 2026 18:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commander assignment (issue #2, 06:15Z): adopt
crates/class-geometry(PR #85) intocrates/render-pipeline. Based onorigin/main3b2703aa, which already carriescrates/class-geometry. The PR diff against main is the render-pipeline adoption plus the class-geometry CONTRACT.md status line.Adopted (CONTRACT steps 1–3)
flashtex-class-geometry = { path = "../class-geometry" }. It is not a vendor mirror, so agit archiveofcrates/render-pipelinealone must also archivecrates/class-geometry(zero dependencies). If the harness needs it, a vendor mirror can follow.Stylesheet::from_resolvedtakes these from the resolved frame: the MediaBox (bp rounded to\pdfdecimaldigits=3), the text block,\textheight,\topskip,\maxdepthand\parindent. Headings, display skips,\parskipand list glue stay with document-style (step 6).adapter::document_setupcallsDocumentSetup::from_preamble. Body-only input is built as article +margin=1in, and a non-standard class is laid out as article with its options and geometry. The hand-rolledgeometry_from_optionsis removed.Frame lengths enter the f64 layout as the nearest 0.001 pt decimal when that decimal is within 2 sp of the exact value, so
1in= 4736286 sp is laid out as 72.27 pt. Without this snap (attempt 1), HW1/HW2 moved by at most 1.69 sp and the digests changed. With it, every length stays within 2 sp of pdflatex.Gates
3b2703aa: the baseline binary was built from agit archiveof main's render-pipeline.b6c2f1a9a973c165…, pdfcbca7ada0400c795…bd9cb477490ab011…, pdfd74b0e9f51887606…cargo test --releasein render-pipeline: 98 passed, 0 failed (93 at baseline plus 5 new). The class-geometry tests are green.a4paperwithout geometrypdflatex (MacTeX 2026, pdfTeX 1.40.29) reports
\pdfpagewidth=614.295pt,\pdfpageheight=794.96999ptand\paperwidth=597.50787pt. The page is US Letter and the A4 text block sits from the top-left. This is documented in the README section "Page frame".tests/class_geometry_frame.rschecks three cases against\pdfsaveposreadings, within 2 sp:Behaviour change: before this PR, every document rendered on a Letter page, including
a4paperwith geometry.Deferred (steps 4–5)
Three pieces are deferred because each changes output and needs its own pdflatex-gated layout work:
The frame already carries all three. Also seen while testing: the pipeline ignores
\noindent, so the tests use\parindent 0pt.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu