Repository navigation
class-geometry: exact standard-class + geometry page frame (KC-103) - #85
Merged
Merged
Conversation
Why: every glyph's position depends on the class/geometry page frame; render-pipeline only models article + margin= in floating point. Behavior: - New standalone crate crates/class-geometry (zero deps). TeX integer arithmetic (round_decimals, xn_over_d, \divide, \@settopoint, print_scaled) so lengths match pdflatex to the scaled point. - article/report/book x 10/11/12pt x a4/a5/b5/letter/legal/executive, landscape, oneside/twoside, onecolumn/twocolumn, titlepage, openright/ openany, fleqn/leqno, draft (size1x.clo + bk1x.clo, cited by line). - geometry v6.0 macro-by-macro: keys, \Gm@detall cases 0-7, adjustbody/ adjustmp, includehead/foot/mp, ratios, scale, lines, heightrounded, bindingoffset, landscape/paper keys, sequential \geometry calls. - PageFrame: odd/even text left, head/foot/first baselines, columns, marginpar side, PDF MediaBox (engine default letter without geometry). - \@startsection specs, \chapter/\chapter*/\part, secnumdepth/tocdepth, page styles (empty/plain/headings/myheadings) and mark rules. - DocumentSetup::from_preamble scanner; CONTRACT.md proposes the render-pipeline integration (render-pipeline not edited). Oracle: oracle/generate.py (pdflatex 1.40.29, TeX Live 2026, oracle only) -> tests/data/oracle.txt, 96 fixtures; cargo test: 96/96 fixtures, 2881/2881 lengths exact, 2112/2112 \pdfsavepos positions exact (0sp). Validation: cargo test, cargo clippy --all-targets (0 warnings), cargo fmt. Excluded (other branches): \maketitle/title layout, page-control commands, list spacing. Implementation-Agent: Claude Opus 5 (subagent kabir-claude KC-103, 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
Member
|
Merged to main via integration/2026-09-13c (Commander orchestrator-jaysen-claude); hermetic library, tests green. |
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.
KC-103 (kabir-claude, mac-m5pro-kabir): document class + page geometry fidelity.
What
New standalone crate
crates/class-geometry(zero deps). Nothing outside it is touched.size1x.clo/bk1x.clousing TeX integer arithmetic, with each constant cited by file and line.\geometry{}calls.PageFrame: odd/even text left edge, header/footer/first-line baselines, columns, marginpar side, and the PDF MediaBox.\@startsectionspecs,\chapter/\chapter*/\part, secnumdepth/tocdepth, the empty/plain/headings/myheadings styles and their mark rules.DocumentSetup::from_preamble.CONTRACT.md: proposed render-pipeline integration. render-pipeline itself is not edited.Oracle
oracle/generate.pyruns pdflatex (TeX Live 2026, used as an oracle only) and writestests/data/oracle.txt.cargo testnever runs TeX.96/96 fixtures pass. 2881/2881 lengths match exactly and 2112/2112
\pdfsavepospositions match exactly (worst error 0sp).Positions are measured with
\pdfsaveposbecausepdftotextis not installed, and it is exact rather than 0.01bp.Findings
a4paper.Excluded
These are on other branches:
\maketitle/title layout (daniel-parent/maketitle, daniel-title/title-layout), page-control commands (daniel-parent/page-control), list spacing (daniel-parent-b/setlist-spacing).Validation:
cargo test,cargo clippy --all-targets(0 warnings),cargo fmt --check.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu