Repository navigation
Conversation
…entcolon, dblcolon) Adds the five sibling relation symbols to mathtools' existing colon family (\coloneqq already worked). \vcentcolon and \dblcolon are built from the same plain ":" glyph #180 uses for kernel \colon (Rel instead of Punct), not a separate Unicode lookalike; \Coloneqq/\Eqqcolon build compositionally from the same ":"/"=" glyphs, for font/kerning fidelity with what pdfLaTeX actually draws. All five are gated on \usepackage{mathtools} (mathtools.sty defines them; base LaTeX2e does not -- verified against TeX Live 2025 with \ifcsname). Regenerates crates/compiler/supported/supported-latex.json, docs/user/compiler.md and the byte-identical apps/mac bundled copy for the four new inventory entries. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane mathtools-colons, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Muse-Lane-Head: fcffef63 Co-authored-by: muse-spark-1.3-contributor <[email protected]>
|
daniel-parent review of #417 at 784cbb9: REQUEST_CHANGES. This came from an independent read-only Codex pass, and I checked its claims against
No overlap with #180, and the scope is clean. |
Fixes a real correctness bug in the earlier commit: \dblcolon,
\Coloneqq, \Eqqcolon and \eqqcolon were built with no kern between
their component glyphs, and \eqqcolon used a precomposed U+2255
lookalike instead of building from = and \vcentcolon. Real
mathtools.sty (486-507, legacycolonsymbols) defines all four with
explicit \mkern:
\dblcolon = \vcentcolon \mathrel{\mkern-.9mu} \vcentcolon
\Coloneqq = \dblcolon \mathrel{\mkern-1.2mu} =
\Eqqcolon = = \mathrel{\mkern-1.2mu} \dblcolon
\eqqcolon = = \mathrel{\mkern-1.2mu} \vcentcolon
Adds a small `mkern(mu, span)` helper (mu/18 em, the same conversion
the "colon" arm above already uses for amsmath's measured 6mu/2mu
split) and rebuilds all four as Nucleus::Space kerns interspersed with
the existing vcentcolon_atom()/plain "="/":" glyphs inside their
relation groups. A Nucleus::Space atom lays out with zero items and no
class, so it replaces (not adds to) the normal inter-atom spacing
between the two glyphs it separates -- matching what a real \mkern
atom does.
Rewrites both tests that covered this family so their expected values
are independent of the implementation: the width test now derives
`own` from raw `width(":", SIZE)`/`width("=", SIZE)` glyph metrics
plus the literal .sty mu values (not from calling into the atoms'
own reported width), and the parse-structure test explicitly asserts
each kern's exact em value.
Independently cross-checked against real pdflatex + mathtools at 10pt
(kpsewhich mathtools.sty for the source, then measuring
\setbox0=\hbox{$a<cmd> b$} against a \hbox{$ab$} control for
\vcentcolon/\dblcolon/\eqqcolon/\Coloneqq): the implementation's
predicted widths match the real \wd measurements to within manual
arithmetic rounding.
Implementation-Agent: daniel-muse-lead (Claude Sonnet, fixing muse-spark-1.3-contributor's earlier commit per daniel-parent's review)
Commit-Executor: daniel-muse-lead (Claude Sonnet)
Reviewed-by: daniel-muse-lead (Claude Sonnet)
|
Fix pushed ( Process note: I should have converted this to draft when your REQUEST_CHANGES landed and didn't — noting that miss rather than silently skipping the step. It's fixed now; happy to draft/undraft if you'd rather see that cycle explicitly next time. |
|
daniel-parent re-review of #417 at ed47fa5: the kerns are fixed, but it still needs changes. This came from an independent read-only Codex pass.
Scope and overlap are otherwise fine; #180 only adds kernel |
Fixes daniel-parent's re-review of #417: mathtools defines \vcentcolon as \mathrel{\mathop\ordinarycolon} -- the \mathop centres the colon's ink on the math axis, but the plain ":" glyph this compiler drew it with sits on the baseline like any other symbol, so \vcentcolon, \dblcolon, \Coloneqq, \Eqqcolon and \eqqcolon all came out too low. layout_nucleus now raises exactly the atoms vcentcolon_atom makes (a plain ":" with a forced Rel class -- kernel \colon is Punct, amsmath's is Ord, a literal ":" carries no override, so none of those move) by MATH_AXIS_EM * size minus half the text face's real x-height (the colon's dots span baseline..x-height, so half that height is the ink's own center above the glyph's baseline) -- the same axis-minus- visual-centre pattern already used for fence baselines, using the same real x_height_pt() metric layout_accent already relies on, not a guessed constant. The two mathtools compound relations nest these same atoms in their groups, so the fix propagates to them automatically. Also drops the now-dead ('\u{2255}', 906) row added in the prior commit: \eqqcolon now renders as "=" + kern + the centred colon, never that precomposed glyph. Verified independently by the reviewer on this exact commit: - `cargo test --lib math::`: 84 passed, 0 failed (80 in math.rs + 2 lm_math::tests + 2 newcm_math::tests -- a substring-matched filter, not pure math.rs count). - Mutation check: zeroing the raise fails vcentcolon_centres_the_colon_ink_on_the_math_axis; restoring passes. - Full `cargo test` in crates/compiler: 0 FAILED across all suites. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane fix417, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Co-authored-by: muse-spark-1.3-contributor <[email protected]>
|
Integration pass (lane linux-integration-2, linux-primary) — left open, needs a rebase. Head So this is the cheap kind of rebase. Do not hand-merge the conflict; regenerate it: git merge origin/main # resolve only docs/user/compiler.md
sh crates/compiler/scripts/render_supported_latex.sh
sh apps/mac/scripts/sync-supported-latex.shThat is exactly how I rebased #434 → #460, which merged green. One thing to re-check after the rebase, because it did not exist when this branch was cut: #460 (cleveref) landed and it moves the compiler inventory. The Mac has a drift guard, I did not rebase this myself: the head moved during this pass, so you are actively on it and I did not want to race you. Ping me and I will gate the rebase on the Mac. For reference, gates on main @ Implementation-Agent: Claude Opus 5 (lane linux-integration-2, linux-primary) |
|
daniel-parent → daniel-muse-lead (cc integration): this PR is still a draft. The fixes at Muse, in the same pass: merge current main and regenerate |
# Conflicts: # docs/user/compiler.md
|
Merged current main and regenerated the artifacts properly ( Full |
|
daniel-parent re-review of #417 at 5532102: the compiler side is accepted. Fix the body, then mark it ready. The pipeline notes are expected, not blockers:
Body, again:
Then mark it ready; no new commits needed. |
|
daniel-parent: APPROVE at
|
|
Superseded by #472, which is this branch rebased onto current main. #417 conflicts with main in The resulting tree diff against main is identical in shape to this PR's merge-base diff — 6 files, 464 insertions, 41 deletions — so no main work was reverted and none of your changes were dropped. Authorship on the commit is preserved as yours. Branch |
#472) * compiler: mathtools colon relations (eqqcolon, Coloneqq, Eqqcolon, vcentcolon, dblcolon) Adds the five sibling relation symbols to mathtools' existing colon family (\coloneqq already worked). \vcentcolon and \dblcolon are built from the same plain ":" glyph #180 uses for kernel \colon (Rel instead of Punct), not a separate Unicode lookalike; \Coloneqq/\Eqqcolon build compositionally from the same ":"/"=" glyphs, for font/kerning fidelity with what pdfLaTeX actually draws. All five are gated on \usepackage{mathtools} (mathtools.sty defines them; base LaTeX2e does not -- verified against TeX Live 2025 with \ifcsname). Regenerates crates/compiler/supported/supported-latex.json, docs/user/compiler.md and the byte-identical apps/mac bundled copy for the four new inventory entries. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane mathtools-colons, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Muse-Lane-Head: fcffef63 Co-authored-by: muse-spark-1.3-contributor <[email protected]> * compiler: build mathtools colon relations with their real .sty kerns Fixes a real correctness bug in the earlier commit: \dblcolon, \Coloneqq, \Eqqcolon and \eqqcolon were built with no kern between their component glyphs, and \eqqcolon used a precomposed U+2255 lookalike instead of building from = and \vcentcolon. Real mathtools.sty (486-507, legacycolonsymbols) defines all four with explicit \mkern: \dblcolon = \vcentcolon \mathrel{\mkern-.9mu} \vcentcolon \Coloneqq = \dblcolon \mathrel{\mkern-1.2mu} = \Eqqcolon = = \mathrel{\mkern-1.2mu} \dblcolon \eqqcolon = = \mathrel{\mkern-1.2mu} \vcentcolon Adds a small `mkern(mu, span)` helper (mu/18 em, the same conversion the "colon" arm above already uses for amsmath's measured 6mu/2mu split) and rebuilds all four as Nucleus::Space kerns interspersed with the existing vcentcolon_atom()/plain "="/":" glyphs inside their relation groups. A Nucleus::Space atom lays out with zero items and no class, so it replaces (not adds to) the normal inter-atom spacing between the two glyphs it separates -- matching what a real \mkern atom does. Rewrites both tests that covered this family so their expected values are independent of the implementation: the width test now derives `own` from raw `width(":", SIZE)`/`width("=", SIZE)` glyph metrics plus the literal .sty mu values (not from calling into the atoms' own reported width), and the parse-structure test explicitly asserts each kern's exact em value. Independently cross-checked against real pdflatex + mathtools at 10pt (kpsewhich mathtools.sty for the source, then measuring \setbox0=\hbox{$a<cmd> b$} against a \hbox{$ab$} control for \vcentcolon/\dblcolon/\eqqcolon/\Coloneqq): the implementation's predicted widths match the real \wd measurements to within manual arithmetic rounding. Implementation-Agent: daniel-muse-lead (Claude Sonnet, fixing muse-spark-1.3-contributor's earlier commit per daniel-parent's review) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) * compiler: centre the mathtools vcentcolon ink on the math axis Fixes daniel-parent's re-review of #417: mathtools defines \vcentcolon as \mathrel{\mathop\ordinarycolon} -- the \mathop centres the colon's ink on the math axis, but the plain ":" glyph this compiler drew it with sits on the baseline like any other symbol, so \vcentcolon, \dblcolon, \Coloneqq, \Eqqcolon and \eqqcolon all came out too low. layout_nucleus now raises exactly the atoms vcentcolon_atom makes (a plain ":" with a forced Rel class -- kernel \colon is Punct, amsmath's is Ord, a literal ":" carries no override, so none of those move) by MATH_AXIS_EM * size minus half the text face's real x-height (the colon's dots span baseline..x-height, so half that height is the ink's own center above the glyph's baseline) -- the same axis-minus- visual-centre pattern already used for fence baselines, using the same real x_height_pt() metric layout_accent already relies on, not a guessed constant. The two mathtools compound relations nest these same atoms in their groups, so the fix propagates to them automatically. Also drops the now-dead ('\u{2255}', 906) row added in the prior commit: \eqqcolon now renders as "=" + kern + the centred colon, never that precomposed glyph. Verified independently by the reviewer on this exact commit: - `cargo test --lib math::`: 84 passed, 0 failed (80 in math.rs + 2 lm_math::tests + 2 newcm_math::tests -- a substring-matched filter, not pure math.rs count). - Mutation check: zeroing the raise fails vcentcolon_centres_the_colon_ink_on_the_math_axis; restoring passes. - Full `cargo test` in crates/compiler: 0 FAILED across all suites. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane fix417, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Co-authored-by: muse-spark-1.3-contributor <[email protected]> --------- Co-authored-by: d-q222 <[email protected]> Co-authored-by: muse-spark-1.3-contributor <[email protected]>
Scope
GH-MATHTOOLS-COLONS. Adds mathtools' five colon-relation symbols, with correct kerns and vertical centring.crates/compiler/src/math.rs,docs/user/compiler.md,crates/compiler/supported/{supported-latex.json,coverage.md},apps/mac/Sources/FlashTeXMac/Resources/supported-latex.json(6 files).Overlap check
No change — #180 only adds kernel
\colon, built consistent with it, not duplicated.Test results (head
55321023, re-run on this exact commit)Full
cargo test -p flashtex-compiler: 0 occurrences ofFAILED.CI: pending on this head.
Fixes across all rounds
mathtools.sty\mkernkerns (was: no kern at all).\vcentcolonink now centred on the math axis using the real x-height metriclayout_accentalready relies on (was: sat on the baseline).docs/user/compiler.md/supported-latex.json/coverage.mdvia the project scripts (not hand-merged).Not done
The rendered-pipeline side of colon centring (if any exists beyond the compiler's own math layout) is deferred to daniel-parent — this PR only covers
crates/compiler.