Repository navigation
math-layout: TeX stretch/shrink on math glue and hpack-exact pack_to (display-math blocker 1 of #146) - #148
Merged
Conversation
…:pack_to Inter-atom spacing now carries plain.tex's muskips in full (plain.tex 373-375, kept by LaTeX): \thinmuskip 3mu, \medmuskip 4mu plus 2mu minus 4mu, \thickmuskip 5mu plus 5mu, scaled by the style's math unit like tex.web 716 math_glue. Explicit glue atoms gain plus/minus components (Atom::glue_flex with MathFlex in mu, pt or fil/fill/filll units; Atom::hfill/hfil). BoxKind::Glue carries the resolved Flex stretch and shrink. MathBox::glue_totals exposes an hlist's natural width and total stretch and shrink per order (tex.web 656); MathBox::pack_to(width) sets the glue like hpack(p, w, exactly) (649-667): highest order wins, finite shrink is capped at its total (glue set 1.0) with the excess reported as overfull, and later children move by the accumulated glue change. Displays wider than \displaywidth can now be squeezed as in tex.web 1199-1201. Oracle: tests/glue_set/glue-set.log, pdfTeX 1.40.29 \showbox of eight hboxes (natural, shrink, stretch, overfull, fill, pt glue, text and script styles); tests/glue_set.rs reads it and checks glue components, totals, glue set ratio (in sp) and glyph positions. math-layout: 43 tests pass. Existing Atom::glue/MathBox::glue keep their signatures (rigid glue). Implementation-Agent: Claude Opus 5 (subagent kabir-claude math glue + numbering, 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
This was referenced Sep 13, 2026
Merged
GoKubar
added a commit
that referenced
this pull request
Sep 13, 2026
…ession handoff) Stage 1 partly done: #131, #137, #153 (incl. #142), #144, #147, #149, #150, #155, #159, #163, #164 merged with conflicts and post-expansion fixes recorded in docs/evidence/integration-2026-09-13b/merge-log.md. Remaining: #166, #169, #148, #161, then the inventory regeneration and stages 2-4. The helper scripts under tools/ hard-code the original worktree path. Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, 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
GoKubar
added a commit
that referenced
this pull request
Sep 13, 2026
Clean merge. math-layout 43 tests pass; compiler unchanged. Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, nixos-pc-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar
added a commit
that referenced
this pull request
Sep 13, 2026
Conflicts against #148: MathBox::glue_flex (SourceTag plus stretch/shrink) and the mathlist.rs imports. math-layout 54 tests pass. Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, nixos-pc-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar
added a commit
that referenced
this pull request
Sep 13, 2026
No conflicts: #168 is an oracle and its fixtures, with no pipeline source changes. The compiler side it needs (siunitx) came in with #159 in stage 1, so the vendored compiler already satisfies it. One change was needed. #168 carries a `PENDING` list of fixtures that must *still* differ from pdfLaTeX, each naming the work it waits on, so the entry is removed when that work lands. `39-heading.tex` waited on heading math -- "the pipeline sets a `$...$` formula in \section at the heading size but an Inline::Math whose span starts at a command at the body size". That landed on this branch with #151, so the fixture now matches and the test failed with "39-heading.tex now matches: remove it from PENDING", exactly as designed. Removed; the oracle passes. siunitx is now 36/39 exact against the committed MacTeX references, up from the 35/39 the PR reports. The three still pending are unrelated to siunitx and name their own dependencies: 34-paragraph (math glue stretch in line justification, PR #148), 37-ang-minutes (`\prime` drawn from Latin Modern Math at 2.169pt where pdfLaTeX's cmsy7 prime is 2.306pt), 38-power-on-letter (no upright fam0 Latin math character, so a power on a one-letter unit sits 0.78 bp high). `cargo test --release` in render-pipeline: the same 11 known failures, no more. Zero font diagnostics on every gate. Implementation-Agent: Claude Opus 5 (subagent kabir-claude integration, nixos-pc-kabir) Commit-Executor: Claude Code direct Git Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
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.
Part A of the two blockers left by #146 (too-wide displays, fixtures 09/10/33).
What
plain.tex373-375, kept by LaTeX):\thinmuskip3mu,\medmuskip4mu plus 2mu minus 4mu,\thickmuskip5mu plus 5mu, scaled by the style's math unit (tex.web §716).BoxKind::Glue { mu, stretch: Flex, shrink: Flex }; newGlueOrder(normal/fil/fill/filll),Flex,GlueTotals,GlueSet/GlueSign,Packed.Nucleus::Glue { mu, pt, stretch: MathFlex, shrink: MathFlex },Atom::glue_flex,Atom::hfill/hfil.Atom::glueandMathBox::gluekeep their signatures (rigid).MathBox::glue_totals()(natural width plus total stretch/shrink per order of an hlist, §656) andMathBox::pack_to(width): TeXhpack(p, w, exactly)(§649-667). The highest order wins, finite shrink is capped at its total (glue set 1.0, excess inoverfull), and later children move by the accumulated glue change.Evidence
tests/glue_set/glue-set.log: pdfTeX 1.40.29\showboxof 8 hboxes (natural, shrink-0.65746, stretch0.51007, overfull-1.0,plus 1fill53.66805fill, pt glue, text and script styles).tests/glue_set.rsreads the log and checks glue components, totals, glue set ratio (compared in sp, as TeX prints it) and glyph positions.cargo test --release(math-layout): 43 passed, 0 failed.BoxKind::Glue { .. }only, and font-engine does not match glue at all. Pipeline output is unchanged until C usespack_to.Re-pin order
A (this PR) and B (compiler equation numbering) are independent. C (render-pipeline wiring) needs both re-pinned in
vendor/.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu