Repository navigation
compiler: \coloneqq is \vcentcolon\mkern-1.2mu= under mathtools (#468; needs render-pipeline re-pin) - #529
Merged
Conversation
What changed: - math.rs: with mathtools loaded, `\coloneqq` parses to one Rel group `[vcentcolon_atom, mkern(-1.2), "="]` (mathtools.sty `\MATHT@coloneq`, lines 487/506/531), so its colon is raised onto the math axis like the rest of the family. Without mathtools the precomposed U+2254 glyph stays (base LaTeX has no `\coloneqq`; behaviour there is unchanged). - Tests: `\coloneqq` joins the width, axis-centring and parse tests; a new assertion keeps U+2254 for KERNEL and AMSSYMB packages. pdfLaTeX oracle (12pt lmodern mathtools, `$a\coloneqq b$`, glyph origins relative to `a`): `:` x=9.466bp dy=-0.415bp, `=` x=11.921bp, `b` x=24.3544bp, box width 29.43333pt (same as `\eqqcolon`). What was run: - cargo test --lib colon (CARGO_TARGET_DIR=target-coloneqq): test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 334 filtered out - Mutation (arm guarded off): 3 of those 5 FAILED. Next step: re-pin crates/render-pipeline/vendor/compiler past this commit and un-ignore render-pipeline's `coloneqq_decomposes_like_mathtools`. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
d-q222
added a commit
that referenced
this pull request
Sep 15, 2026
…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
GoKubar
pushed a commit
that referenced
this pull request
Sep 15, 2026
…468) (#530) * render-pipeline: center forced mathtools colons 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) * render-pipeline: pin mathtools colon oracle 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) * render-pipeline: pdflatex oracle for the whole colon family; \coloneqq 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
3 tasks done
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
With
\usepackage{mathtools}loaded,\coloneqqnow parses the way mathtools defines it, as\vcentcolon\mathrel{\mkern-1.2mu}=(\MATHT@coloneq, mathtools.sty lines 487/506/531). It becomes one Rel group,[vcentcolon_atom, mkern(-1.2), "="], the same shape as the existing\eqqcolon/\Coloneqqarms from #472. Its colon is therefore raised onto the math axis by the existingvcentcolon_raiselayout path.Without mathtools,
\coloneqqkeeps the precomposed U+2254≔glyph fromcommand_glyph, as before. Base LaTeX has no\coloneqq, so nothing there changes. This includes the amssymb Latin Modern Math binding test.This is a compiler-only change.
crates/render-pipeline/vendor/compilermust be re-pinned past this commit before the rendered pipeline sees it. The pipeline PR for #468 carries an ignored test,coloneqq_decomposes_like_mathtools, for that re-pin to un-ignore.Why
Review of the #468 pipeline lane found that
\coloneqqwas still one baseline≔glyph under mathtools. pdfLaTeX, measured locally with /Library/TeX/texbin/pdflatex (12pt, lmodern, mathtools), draws two glyphs. Positions are glyph origins relative toa, read with PyMuPDFget_text("rawdict"):$a\coloneqq b$a : = ba ≔ ba : = b:x / dyvcentcolon_raise=xbx\sboxwidth\eqqcolon)colon + equals - 1.2mu+ 2 thick spacesCross-check: I copied the #468 pipeline branch to a scratch directory and replaced only its
vendor/compiler/src/math.rswith this commit's file. The repo's vendor/ was not touched. In that copy the pipeline renders: x=9.4658 dy=-0.4151,= x=11.9206,b x=24.3463, matching pdflatex within 0.01bp.Overlap check
gh pr list --state open --search coloneqq: none.--search vcentcolon: none.--search mathtools: compiler: an amsmath-provided math construct needs its package loaded #247 (draft, amsmath construct gating, different arms) and compiler + math-layout: \tag and \text can contain math — a TextRun nucleus with nested $…$ (#441, PR 1 of 2) #470 (TextRun). No overlap.\colon's Punct class, not this arm.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). No other colon/mathtools claim.Test results
With
CARGO_TARGET_DIR=target-coloneqq:cargo test --lib colon:test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 334 filtered outtest result: FAILED. 2 passed; 3 failedcargo test --manifest-path crates/compiler/Cargo.toml --no-fail-fast: 57 test targets, 669 passed / 0 failed / 5 ignored; lib linetest result: ok. 339 passed; 0 failed; 0 ignored; 0 measured; 0 filtered outNot done
\coloneq,\Coloneq,\eqcolon,\Eqcolon,\colonapprox,\colonsim, etc. With default options,\coloneq/\Coloneqalias\coloneqq/\Coloneqqand\eqcolon/\Eqcolonalias\eqqcolon/\Eqqcolon.\colonapprox/\colonsimare\vcentcolon\mathrel{\mkern-1.2mu}\approx/\sim. The pdflatex widths are measured (29.43333pt; 29.62769pt for approx/sim) if someone picks them up.🤖 Generated with Claude Code
https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz