Repository navigation
FT-061: amsmath inline constructs (genfrac/binom, \big, phantoms, operators, substack, smallmatrix, dcases) — corpus 20/42 -> 40/42 - #103
Merged
Conversation
…, smallmatrix, dcases
Compiler (math parsing only): \dfrac/\tfrac/\binom/\dbinom/\tbinom/\genfrac
become Nucleus::GenFraction (amsmath.sty 237-312), \phantom/\hphantom/
\vphantom Nucleus::Phantom (latex.ltx \ph@nt), \operatorname(*) and
\DeclareMathOperator(*) Nucleus::Operator (amsopn.sty 43-54), \substack
Nucleus::SubArray (amsmath.sty 1030-1059), dcases a grid environment
(mathtools.sty \newcases).
math-layout: Rule 15e delimiters on Fraction, BigDelimiter (amsmath
\bBigg@ with \big@size = 1.2 x the text '(' box), Phantom, SubArray
(\scriptstyle rows at fontdimen10+12 of scriptfont2, vcenter), Glue atoms
that do not reset r_type, PositionedGlyph.width.
render-pipeline: conversions behind the new `amsmath-inline` feature (off
until vendor/compiler and vendor/math-layout are re-pinned); smallmatrix
pitch from amsgen \ex@, \null\, spacing and no strut; dcases spec;
\openup also advances \lineskip/\lineskiplimit.
Oracle: OMS glyph text for pdftext's '?' symbols, extension-font glyphs
compared as x columns (origin convention differs between cmex Type 1 and
the Latin Modern Math OpenType variants), UTF-8 cluster slicing; fixture
14 loads mathtools (dcases); refs regenerated with the same pdfTeX 1.40.29.
amsmath corpus: 20/42 -> 40/42 (render-pipeline built against this
branch's compiler + math-layout with --features amsmath-inline).
Implementation-Agent: Claude Opus 5 (subagent kabir-claude FT-061, 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
var_delimiter (math-layout) and mathgrid::delimiter (render-pipeline) widened the glyph box by the italic correction; the same total width is now a glyph box at its TFM width followed by a kern, so PositionedGlyph.width (and the display list's math advance_x under `amsmath-inline`) is the width pdfTeX writes to /Widths. Implementation-Agent: Claude Opus 5 (subagent kabir-claude FT-061, 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
With `amsmath-inline` glue inside \left...\right or a sub-formula is a math-layout Glue atom, so math_spacers asserts it is set (a quad inside the fences, no math_limitation); without the feature the old typed-limitation test still runs. rustfmt on this branch's hunks only. Implementation-Agent: Claude Opus 5 (subagent kabir-claude FT-061, 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
Conflict: crates/compiler/src/incremental.rs. Took main's in-place shift_math_list (compiler-perf-r2) and added the GenFraction, Phantom, Operator and SubArray arms in that style. FT-067's supported-LaTeX inventory gains \genfrac, \phantom/\hphantom/\vphantom, \substack, \operatornamewithlimits and \DeclareMathOperator; \dfrac/\tfrac/\binom descriptions updated; artefacts regenerated with render_supported_latex.sh. Verified after the merge: compiler, math-layout and render-pipeline cargo test --release green (pipeline with the feature off against main's re-pinned vendor, and with --features amsmath-inline against this branch's crates); amsmath corpus 40/42. Implementation-Agent: Claude Opus 5 (subagent kabir-claude FT-061, 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
Contributor
Author
|
FT-061: amsmath inline constructs. Head amsmath oracle (0.5 bp): 40/42, up from 27/42 on current main under the fixed oracle (20/42 under the old one).
Changes
Gates:
Re-pin needed. The pipeline integration sits behind a new Known gap: math 🤖 Generated with Claude Code |
Member
|
Merged to main via integration/2026-09-13f (Commander). |
This was referenced Sep 13, 2026
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.
FT-061 (kabir-claude). Base
3b2703aa, head22a72093.Oracle (crates/compiler/tests/amsmath_corpus)
--features amsmath-inline)Still failing: 25-intertext (42 bp,
\intertextunsupported), 28-xrightarrow (11.7 bp,\xrightarrowunsupported), both outside this lane's list.Changes
GenFraction(\dfrac\tfrac\binom\dbinom\tbinom\genfrac, amsmath.sty 237-312),Phantom(latex.ltx\ph@nt),Operator(\operatorname(*),\DeclareMathOperator(*), amsopn.sty 43-54;arg\,maxbody keeps its glue),SubArray(\substack, amsmath.sty 1030-1059);dcasesgrid env (mathtools\newcases).Fraction;BigDelimiter(amsmath\bBigg@,\big@size= 1.2 x the text(box);Phantom;SubArray(scriptstyle rows at fontdimen10+12 of scriptfont2, vcenter);Glueatoms that don't reset r_type;PositionedGlyph.width;char_boxitalic correction as a kern.amsmath-inline(off by default, so it still builds against the pinned vendor). Ungated: smallmatrix pitch from amsgen\ex@with\null\,, no strut; dcases spec;\openupalso advances\lineskip/\lineskiplimit.?for cmsy glyphs gets OMS text; cmex/lmex glyphs are compared as x columns (a Type 1 cmex origin sits at the box top, the LM Math OTF variant's doesn't, and piece counts differ); cluster ranges sliced as UTF-8 bytes. Fixture 14 now loads mathtools (without it the ref was pdflatex error recovery). Refs regenerated with the same pdfTeX 1.40.29; only intended text/column changes.Re-pin needed
To show this in render-pipeline: re-pin
vendor/compilerandvendor/math-layoutfrom this branch, then turn onamsmath-inline(or make it default). Vendored math-layoutdb90047hascorpus.rs/json.rsthatcrates/math-layoutdoesn't; the pipeline doesn't use them.Verification
cargo test --release: compiler, math-layout, render-pipeline (feature off, vendor) all green; render-pipeline with the feature against this branch's crates also green (local mirror, not committed).advance_xis now the TFM width, which equals pdfTeX's/Widths; reference-side unaligned went down.\quadin math uses the family-2 quad instead of the text font's, about 0.25 bp per quad (37 and 38 still pass at 0.38 bp).🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu