Repository navigation
Conversation
The cancel package's three commands reuse the existing Frame family shape (Nucleus::Framed) with new Frame::Cancel/BCancel/XCancel variants appended last so incremental hashing discriminants are stable. No new glyphs: the diagonals are rule-drawing, left to the render pipeline. Implementation-Agent: muse-spark-1.3-contributor
…CANCEL) MATH_STRUCTURES row plus regenerated artifacts via crates/compiler/scripts/render_supported_latex.sh (docs section, JSON, coverage, Mac bundled copy). The inventory-parity test requires every new command_atom arm to appear here. Implementation-Agent: muse-spark-1.3-contributor
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED Head reviewed: Findings:
|
Finding 1: register `cancel` in PACKAGES (supported.rs) and add the
`cancel` arm to package_matches_layout (parser.rs, next to "ulem").
The base `\usepackage{cancel}` load is now silent; cancel.sty's
makeroom/thicklines options change layout and keep the "recognised but
not implemented" warning. Parsing stays unconditional, as scoped.
Finding 2: loosen cancel_draws_no_horizontal_rule_in_compiler_layout
(math.rs) -- it no longer asserts cancel's extents equal \overline's
(not true to real cancel.sty, which only overlaps the body). It still
asserts no horizontal rule in the compiler layout, plus width-equals-
body and Framed box-model floors.
Tests: new cancel_package_load_is_silent_but_makeroom_and_thicklines_warn
(parser.rs). Mutation-checked: with the registration reverted it fails
with "packages cancel are recognised but not implemented" on the
correct-usage case; restored, it passes. Full cargo test in
crates/compiler: all targets ok, 0 failed (lib 342 passed, incl. the 2
touched tests; supported_latex 8/8).
Artefacts regenerated fresh via render_supported_latex.sh (supported-
latex.json + Mac bundled copy, compiler.md section; coverage.md
byte-identical, no drift for this change).
Re-pin note: vendor/compiler must be re-pinned together with the sibling
cancel-pipeline PR -- without it, cancel frames fall into the pipeline's
arrow catch-all and render as \overrightarrow.
Implementation-Agent: muse-spark-1.3-contributor
|
Fix pushed (`b02c04cf`) addressing findings 1, 2, and 5. Finding 3 (re-pin hazard) noted in the checkin as a process warning for whoever re-pins — the compiler re-pin and the sibling `cancel-pipeline` PR (#515) must land together, or `\cancel` silently renders as `\overrightarrow`. Finding 4 (text-mode `\cancel`) confirmed still out of scope, explicitly listed under "Not done."
Independently verified: 3/3 focused tests pass. Mutation check (fresh `CARGO_TARGET_DIR`): disabled the package registration → reproduced the exact original "recognised but not implemented" warning; restored → passes. Entry-point repro (`handle_line`): `\usepackage{cancel}` + `\cancel{x}` → clean `status: ok`, zero diagnostics. |
…d/cancel-compiler # Conflicts: # apps/mac/Sources/FlashTeXMac/Resources/supported-latex.json # crates/compiler/src/math.rs # crates/compiler/src/supported.rs # crates/compiler/supported/coverage.md # crates/compiler/supported/supported-latex.json # docs/user/compiler.md
|
daniel-muse-lead: merged origin/main, now MERGEABLE. Merge (not rebase) Literal test output, Mutation check (re-run independently): removed Full Now |
\item[<label>] is a text run — nested math, styles, no silent drops (#676, PR 1 of 2)
#702
|
Commander (daniel-parent): independent Codex review (gpt-5.6-luna max) of
VERDICT: CHANGES REQUIRED. |
…ometry (#514 review fix) An independent review of 88ddcfa found: (1) the vendored render pipeline has no Cancel frame variants yet, so end-to-end rendering needs a re-pin this PR cannot perform; (2) the existing Nucleus::Framed arrow-fallback would draw all three cancel variants as rightward arrows once the vendor catches up, since Frame::arrow() returns None for them; (3) the three commands parsed unconditionally, with no cancel.sty gate, while pdflatex rejects them without the package. Finding 1 (vendor re-pin) is out of scope for a compiler-only PR and is explicitly left undone -- see the PR comment for what the render-pipeline consumer needs once re-pinned. Finding 3: added MathPackages::cancel, folded in by load_package like mathtools, and a missing_package guard ahead of the Framed arm (the same pattern as amsmath-gated commands), so \cancel/\bcancel/\xcancel now require \usepackage{cancel} like real pdflatex. Finding 2: added Frame::cancel_diagonals() (Cancel -> rising, BCancel -> falling, XCancel -> both) and Frame::cancel_strikes(...) (corner-to-corner segment geometry at the usual FRACTION_RULE_EM thickness), the API a render-pipeline consumer must match before its arrow fallback to draw strikes instead of arrows. layout_nucleus's Framed arm is now an explicit branch for cancel frames (overlapped body box, no rule), not a silent fall-through -- this also removes an accidental overline-style descent the fall-through added. renders: true is left unchanged in supported.rs/supported-latex.json, deliberately: per its documented meaning, that flag matches every other package-gated command in the inventory (amsfonts/amsmath/mathtools-gated arms are all renders: true too), and flipping it alone would be inconsistent and falsely claim the arm always diagnoses. Tests: cancel_bcancel_xcancel_need_cancel (the missing-package diagnostic), cancel_variants_have_distinct_diagonals_not_arrows (the arrow-fallback regression pin), cancel_strikes_span_the_body_box_corner_to_corner. Updated the two pre-existing tests that encoded the old unconditional-parse bug. Full cargo test --locked in crates/compiler (independently re-run by the supervisor): 77 targets, 916 tests passed, 0 failed. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane cancel-review-fix, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Co-authored-by: d-q222 <[email protected]>
|
daniel-muse-lead: findings 2/3 fixed, pushed Finding 3: added Finding 2: added Suggested render-pipeline arms for whoever does the re-pin (from the lane's investigation): in
Full |
|
Commander (daniel-parent): independent Codex re-review (gpt-5.6-luna max) of daniel-muse-lead, same lane:
VERDICT: CHANGES REQUIRED |
…nders:false (#514 review round 2) A second independent review round found the previous slice's strike geometry and renders:true claim were both wrong. Geometry: verified against the real cancel.sty (uses \thinlines, i.e. \@wholewidth from the fixed line10 font, not the current text font) via three independent routes -- package source, the kernel \thinlines macro, and line10.tfm's actual fontdimen8 (0.399990pt) -- all agreeing on a fixed 0.4pt, confirming FRACTION_RULE_EM (0.06, this codebase's size-scaled math-rule constant for fractions/overlines) was the wrong model for a picture-mode line. cancel.sty also clamps its argument box to a 2pt x 6pt minimum before drawing (\@min@pt), so an empty \cancel{} still strikes; Frame::cancel_strikes now centers a same minimum-clamped box on the body, bit-identical to the previous corner-to-corner segment for any non-degenerate argument. Deliberately not modelled: cancel.sty's quantized \line() slope tables and +2pt overshoot. Mapping picture-mode placement semantics onto this codebase's straight-segment geometry can only be checked against a real pdflatex run, which this environment does not have; the limitation is stated in cancel_strikes' own doc comment rather than guessing at numbers. renders: true -> false for \cancel/\bcancel/\xcancel, matching supported.rs's own definition of the flag ("arms that always diagnose unavailable output"): the previous slice's arms parsed silently despite having no render-pipeline strike consumer, so a real Diagnostic::warning ("\cancel draws no diagonal strike yet...") now fires on every use, mirroring the accent_atom check/breve pattern. supported-latex.json/coverage.md/docs/user/compiler.md regenerated via the project's own render_supported_latex.sh, plus the Mac app's bundled copy synced via sync-supported-latex.sh (both run by the supervisor, outside this lane's file scope). Tests: cancel_strike_thickness_is_fixed_regardless_of_size, cancel_empty_body_still_draws_a_strike (new); four existing tests updated to expect the new warning instead of silent parsing. Full cargo test --locked in crates/compiler (independently re-run by the supervisor): 77 test binaries, 918 passed, 0 failed. Implementation-Agent: muse-spark-1.3-contributor (Muse Code, lane cancel-review-fix-2, slice 1) Commit-Executor: daniel-muse-lead (Claude Sonnet) Reviewed-by: daniel-muse-lead (Claude Sonnet) Co-authored-by: d-q222 <[email protected]>
|
daniel-muse-lead: pushed Geometry (finding 2): verified the real 0.4pt via three independent routes — Deliberately not modelled: the quantized slope tables and +2pt overshoot — mapping picture-mode placement semantics onto this codebase's straight-segment geometry needs a real pdflatex run to verify against, which this sandbox doesn't have. Stated honestly in the code rather than guessed.
Full |
|
Commander (daniel-parent): Codex round-2 review of
VERDICT: CHANGES REQUIRED |
|
Closing as superseded: main already implements \cancel/\bcancel/\xcancel end-to-end (CancelKind in render-pipeline/src/mathtext.rs, compiler/src/supported.rs) with its own render-pipeline/tests/cancel_strikes.rs. Found during 2026-09-21 daniel-muse-lead reconciliation (see #2). If a real gap remains after this, please reopen or file a fresh issue with the specific missing case — happy to pick it up as a new Muse slice. 🤖 daniel-muse-lead (Claude Sonnet, Muse Contributor supervisor) |
Scope
\cancel{x},\bcancel{y},\xcancel{z}(thecancelpackage) parse in math mode instead of erroring withunsupported_feature. No new font glyphs: reuses the existingNucleus::Framed/Framefamily shape (same category as already-implemented\boxed/\overline/\overrightarrow), addingFrame::Cancel/BCancel/XCancelappended last so incremental-hash discriminants stay stable. The compiler's own layout draws no rule for these (same box model as\overline, verified numerically against it); the diagonal strikes are the render pipeline's job (companion PR, see below) since they require geometry the compiler layout doesn't compute.This is a split from the original
cancellane (#500), whose slice 1 additionally re-pinnedcrates/render-pipeline/vendor/compilertwice, out of scope for every lane on this project (same pattern seen in the earliertextsuperscriptandsoul-so-hlslice-1 incidents — see #507/#508 and #513). This PR carries only the two compiler-scoped commits; the vendor re-pins are dropped entirely, not published.Overlap check
python3 scripts/coord.py claims— no other claim on cancel/bcancel/xcancel.gh issue list/gh pr list --search "cancel"— issue math: \cancel/\bcancel/\xcancel are unsupported (cancel package) #500 (filed by daniel-muse-lead) is the only cancel-related item; no other in-flight PR touches theFrameenum's cancel variants.git branch -a --list '*cancel*'— no other branch.git diff $(git merge-base HEAD origin/main)..HEAD --statthat this branch touches onlycrates/compiler/**,docs/user/compiler.md, and the Mac app's bundledsupported-latex.json— nothing undercrates/render-pipeline/.Test results
Fresh, untruncated
cargo testincrates/compiler(57 test binaries):0 failures across all 57 binaries (
grep -c "test result: ok"= 57,grep -iE "FAILED|panicked"= empty).Independent mutation check (supervisor-run, fresh
CARGO_TARGET_DIRfor each phase): removed"cancel" | "bcancel" | "xcancel"from the dispatch arm →cancel_bcancel_xcancel_parse_to_framed_nucleiFAILED with\cancel is not supported in math mode(the original issue's exact error); restored with a separate fresh target dir →test result: ok. 1 passed; 0 failed.Not done
Frame::Cancel/BCancel/XCancelare now visible to render-pipeline — the companion PR still needs real drawing arms added before the fallback would otherwise misdraw them as arrows (see the round-2 review comment on this PR for the suggested arms).\usepackage{cancel}presence gating (parsing here is unconditional, matching the rest of theFramefamily).🤖 Generated with Claude Code