Repository navigation
render-pipeline: mathtools' \vcentcolon family sits on the math axis (#468) - #530
Merged
Merged
Conversation
What changed: Carry the compiler's exact forced-Rel colon marker through math conversion as an outer Rel atom containing math-layout's existing Op axis-centering path. The Op path uses the real glyph bounds and axis_height; vendor files remain untouched. What was run: cargo check --manifest-path crates/render-pipeline/Cargo.toml --lib: passed git diff --check: passed Next step: Add the pdflatex oracle and horizontal-spacing regression coverage. Implementation-Agent: codex gpt-5.6-luna (max) Commit-Executor: codex (this session) Lane-Owner: daniel-parent (mac-m5pro-dq222)
What changed: Add the pdflatex vertical-position probe and pin current-main horizontal advances for vcentcolon, coloneqq, dblcolon, and literal colon. Cover kernel and amsmath colon controls and verify the existing precomposed coloneqq glyph remains axis-balanced. What was run: cargo test --manifest-path crates/render-pipeline/Cargo.toml --test math_symbols mathtools_colons_match_pdflatex_vertical_oracle_without_spacing_changes: 1 passed cargo test --manifest-path crates/render-pipeline/Cargo.toml --test math_symbols --test math_operator_limits --test math_ellipsis --test math_spacers --test math_text_italic_correction --test amsmath_inline: 43 passed git diff --check: passed Next step: Run the full required gates, review the commits, and push the branch. Implementation-Agent: codex gpt-5.6-luna (max) Commit-Executor: codex (this session) Lane-Owner: daniel-parent (mac-m5pro-dq222)
…q test waits for #529 What changed: - math_symbols.rs: the `\coloneqq` assertion that accepted the precomposed baseline U+2254 as correct is gone. `coloneqq_decomposes_like_mathtools` pins pdflatex's values instead (`:` x=9.466 dy=-0.415, `=` x=11.921, `b` x=24.3544 bp) and is `#[ignore = "needs re-pin past #529"]`. - New `mathtools_composed_colons_match_pdflatex`: `\vcentcolon`, `\dblcolon`, `\Coloneqq`, `\eqqcolon`, `\Eqqcolon` glyph x (0.02bp) and dy (0.01bp) against pdflatex 12pt lmodern mathtools. - New `unraised_colons_match_pdflatex`: literal `:`, `\mathrel{:}` (a `Nucleus::Group`) and `\colon` stay on the baseline, under mathtools. - Oracle comment now gives the .tex source and the PyMuPDF rawdict measurement; the unused font_id/gid/font_size probe fields are dropped. What was run (FLASHTEX_FONT_DIRS/TFM_DIRS=apps/mac/Fonts, CARGO_TARGET_DIR=target-vcent): - --test math_symbols: test result: ok. 15 passed; 0 failed; 1 ignored - Mutation (vcentcolon detection off): mathtools_composed_colons_match_pdflatex and ..._without_spacing_changes FAILED ("vcentcolon glyph 1 `:`: dy=0.0000bp, pdflatex -0.415"). - Scratch copy with only vendor/compiler/src/math.rs swapped for #529's (repo vendor untouched): coloneqq_decomposes_like_mathtools ... ok. - amsmath corpus: TOTAL 59/59 within 0.5 bp - --lib: test result: ok. 137 passed; 0 failed; 2 ignored - math-layout: all targets ok (12+4+5+28+4+2+11 passed, 0 failed) Next step: open the pipeline PR; un-ignore the \coloneqq test at the re-pin past #529. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
This was referenced Sep 15, 2026
Closed
This was referenced Sep 16, 2026
ItsAkilesh
pushed a commit
to ItsAkilesh/flashtex
that referenced
this pull request
Sep 18, 2026
…tex#769) Split out from PR flash-tex#247 (closed as superseded); the fix itself never landed when flash-tex#247 was superseded by flash-tex#230/flash-tex#529/flash-tex#530. main still carried \mod as an unconditional plain text atom, with a comment saying the gap was deliberate. - \mod is undefined in base LaTeX2e (amsmath.sty 910-911); gated the same way \sideset already is: `"mod" if !self.packages.amsmath => self.missing_package(...)`. - Under amsmath, \mod opens with \mkern12mu (inline; this compiler has no display flag, so the inline number is the one that applies, matching how \pmod already handles the same distinction), sets its argument as an ordinary (not Bin) upright "mod" via required_group + class_override, and puts 6mu before the argument. Two new constants, AMSMATH_MOD_OPENING_MU and AMSMATH_MOD_TRAILING_MU, mirror the existing AMSMATH_POD_MU/BMOD_EXTRA_MU pattern. Verified against TeX Live 2025 pdflatex at 10pt (see the code comment for the measured equivalences); added mod_needs_amsmath (mirrors sideset_needs_amsmath) and a width test mirroring the existing pmod/bmod style. cargo test --lib: 414 passed, 0 failed. Commit-Executor: daniel-muse-lead (Claude Sonnet)
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.
What
The rendered pipeline now centres mathtools'
\vcentcoloncolon on the math axis, as in pdfLaTeX (\vcentcolonis\mathrel{\mathop\ordinarycolon}). The same applies to every relation the compiler builds from it:\dblcolon,\Coloneqq,\eqqcolonand\Eqqcolon.typeset::convert_math_classed: aSymbol(":")carrying the compiler's forcedRelclass, exactly whatvcentcolon_atomproduces, keeps its Rel outer atom for spacing. Its nucleus becomes a one-atom Op list, so math-layout's existing real-glyph-bounds axis centring places it. No new offsets are hard-coded, and math-layout itself is unchanged.:,\mathrel{:}(aNucleus::Group, not a forced-Rel Symbol), kernel\colon(Punct) and amsmath\colon(Ord).tests/math_symbols.rs): a pdfLaTeX glyph-position oracle for the whole family plus the negative controls, and a horizontal no-change control againstmain.\coloneqqneeds a compiler change first: #529. The pinned compiler still maps\coloneqqto the precomposed U+2254≔even under mathtools, so the pipeline never sees a colon atom. #529 decomposes it as mathtools does,\vcentcolon\mathrel{\mkern-1.2mu}=. Herecoloneqq_decomposes_like_mathtoolspins pdfLaTeX's values under#[ignore = "needs re-pin past #529"], and nothing asserts the≔behaviour as correct.Why
Issue #468. #472 centred these colons in the compiler's own layout, and #477 re-pinned it here. The pipeline, however, laid them out as ordinary baseline relations.
Oracle
/Library/TeX/texbin/pdflatex, TeX Live 2026, 12pt article,lmodern,mathtools. Glyph origins were read from the PDF with PyMuPDFget_text("rawdict"). x is relative toa; dy is relative toa's baseline, negative = raised. All values are in bp.a\vcentcolon b:ba\dblcolon b::a\Coloneqq b::=ba\eqqcolon b=:ba\Eqqcolon b=::ba\coloneqq b:9.466 (-0.415),=11.921,b24.3544≔6.1449 (dy 0),b16.9763math.rs: 9.4658 (-0.4151), 11.9206, 24.3463a:b:ba\mathrel{:}b:ba\colon b:b\sboxwidths: 21.0943pt (\vcentcolon,:,\mathrel{:}), 23.75832pt (\dblcolon), 29.43333pt (\coloneqq,\eqqcolon), 32.09735pt (\Coloneqq,\Eqqcolon) and 19.76099pt (\colon). pdfTeX writes positions to three decimals, so the tests compare x within 0.02bp and dy within 0.01bp. Horizontal advances and positions are unchanged against main to 0.001bp.The "with #529" row was checked in a scratch copy of this branch. Only
vendor/compiler/src/math.rswas replaced there by #529's file; this repository's vendor/ is untouched.Overlap check
gh pr list --state open --search vcentcolon: none.--search coloneqq: none.--search mathtools: compiler: an amsmath-provided math construct needs its package loaded #247 (draft, amsmath construct gating in the compiler) and compiler + math-layout: \tag and \text can contain math — a TextRun nucleus with nested $…$ (#441, PR 1 of 2) #470 (TextRun nucleus). Neither touches this conversion.\colon's Punct class in the compiler's atom-class code. This PR does not touch\colon, and its detector keys on a forcedRelclass, which\colonnever carries. They are adjacent but do not conflict.coord.py claims: math-layout/render-pipeline: \vcentcolon (and mathtools colon relations) sit on the math axis, not the baseline #468-VCENTCOLON is held by daniel-parent (this lane). GH-MATH-ACCENTS (daniel-muse-lead) is a different construct.Test results
With
FLASHTEX_FONT_DIRS/FLASHTEX_TFM_DIRS=apps/mac/FontsandCARGO_TARGET_DIR=target-vcent:oracle.py check --render target-vcent/release/flashtex-render --fonts apps/mac/Fonts, as in render-pipeline: re-pin vendor/compiler to main (6a47ed49), implement CleverReference, default math-class-override #477):TOTAL 59/59 within 0.5 bpcargo test -p render-pipeline --lib:test result: ok. 137 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out--test math_symbols:test result: ok. 15 passed; 0 failed; 1 ignored(the ignored test is\coloneqq, pending compiler: \coloneqq is \vcentcolon\mkern-1.2mu= under mathtools (#468; needs render-pipeline re-pin) #529)0 failed: amsmath_inline 11, amsmath_openup_jot 1, boxed_math 1, display_math 1, inline_math_breaks 2, math_ellipsis 5, math_grids 3, math_operator_limits 6, math_operator_thin_space 3, math_spacers 4, math_text 7, math_text_italic_correction 4, v2_and_math 6.cargo test --manifest-path crates/math-layout/Cargo.toml: every target isok(lib 12, big_delimiters 4, glue_set 5, golden 28, kernel_symbols 4, size_oracle 2, source_spans 11; 0 failed).mathtools_composed_colons_match_pdflatexandmathtools_colons_match_pdflatex_vertical_oracle_without_spacing_changesFAIL withvcentcolon glyph 1 ':': dy=0.0000bp, pdflatex -0.415.Not done
\coloneqqin the rendered output stays≔untilvendor/compileris re-pinned past compiler: \coloneqq is \vcentcolon\mkern-1.2mu= under mathtools (#468; needs render-pipeline re-pin) #529. At that re-pin, un-ignorecoloneqq_decomposes_like_mathtools.\coloneq,\eqcolon,\colonapprox,\colonsimand similar are not supported by the compiler (out of scope; see compiler: \coloneqq is \vcentcolon\mkern-1.2mu= under mathtools (#468; needs render-pipeline re-pin) #529's Not done).🤖 Generated with Claude Code
https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz