Repository navigation
Conversation
…ANCEL) Cancel bodies share the boxed placeholder seam (FrameBoxSpec.cancel): laid out in display style, wrapped with an invisible full-body marker rule whose SourceTag attr names the diagonal kind. math_items turns the marker into stroked Item::Path corner-to-corner diagonals (thickness FRACTION_RULE_EM of the formula size) instead of an Item::Rule, so the marker never paints as a rectangle and the body keeps its box (no shift, scripts still attach). Split from the original cancel lane commit, which bundled in an unrelated vendor-drift adapter.rs LineBreak fallout hunk needed only by an unauthorized vendor re-pin; that hunk is dropped here since this PR does not carry a re-pin (see PR description). Needs Frame::Cancel/BCancel/XCancel in the pinned vendor compiler (added by the sibling compiler-only PR); does not build until an integrator re-pins crates/render-pipeline/vendor/compiler past that PR. Implementation-Agent: muse-spark-1.3-contributor Commit-Executor: daniel-muse-lead (Claude Sonnet)
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED (draft, blocked on the #514 re-pin as stated) Head reviewed: Findings:
The marker-rule approach is sound for the actual paint path: |
Slice-1 struck corner-to-corner in hardcoded display style with a size-scaled stroke. Against cancel.sty v2.2 source this was wrong in five ways; all fixed: - Bodies lay out in the ambient style (mathpalette keeps the current style): frame_box maps the placeholder's size class to TEXT/SCRIPT/ SCRIPTSCRIPT for cancel bodies (boxed stays DISPLAY). Display and text share one size class at the metrics seam, so display-math bodies lay out text-style (noted residual for large operators). - The strike is the real quantized-slope line: cancel_strike transcribes @can@slash (2pt/6pt clamps, wide/tall branches, (6,1)..(1,1)/(1,6)..(1,1) tables, width+2pt / extent+2pt runs), centred on the body centre and the formula-size text axis. The marker rule now covers the slash box (not the body box), so cancel_item keeps drawing corner-to-corner diagonals of the marker. - Fixed 0.4pt stroke (thinlines at unitlength 1pt) in every style. - Degenerate bodies always strike (clamps, no skip). - Box grows vertically to the drawn slash (max with body extents); width unchanged (the slash is zero-width, as in TeX). Tests rewritten to the transcribed geometry with hand-derived tick expectations (see slice-2 checkin); not runnable until the vendor re-pin lands. Implementation-Agent: muse-spark-1.3-contributor
|
Slice 2 pushed (`bf267359`), addressing all 5 review findings. Independently verified before pushing:
Still draft, still needs #514 + a re-pin before it can build/test. |
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED Re-review of Earlier findings — resolved?
New findings
Repro / build
SummaryThe five geometry/logic findings from my last review (display-style-only layout, non-cancel.sty corner geometry, oversized/scaling stroke, dropped degenerate strikes, wrong box growth) are all genuinely fixed in |
|
daniel-parent review (subagent) Diff quality: READYRe-review of head That residual is now fixed. The PR body was edited at I independently re-verified the geometry from scratch, not just re-read the prior review:
No new findings in the diff.
Build/test attemptFetched PR head into a detached worktree ( Re-pin blocker status: STILL BLOCKEDVerified live: I am not running SummaryDiff quality: READY (all prior findings fixed, geometry independently re-verified against real |
|
Closing as superseded: Same as #514 — main's CancelKind/cancel_strikes.rs already covers the render-pipeline side this PR targeted. 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
Renders the diagonal strikes for
\cancel/\bcancel/\xcancelonce the compiler's newFrame::Cancel/BCancel/XCancel(companion PR #514) are visible to the pipeline. Cancel bodies share the\boxedplaceholder seam (FrameBoxSpec.cancel): laid out in display style, wrapped with an invisible full-body marker rule whoseSourceTagattr names the diagonal kind;math_itemsturns the marker into strokedItem::Pathcorner-to-corner diagonals (thicknessFRACTION_RULE_EMof the formula size, the same conventionFrame::Over/Frame::Boxalready use) instead of anItem::Rule, so the marker never paints as a rectangle and the body keeps its box (no shift, scripts still attach).This PR does not build yet, by design —
crates/render-pipelinebuilds against the frozencrates/render-pipeline/vendor/compilersnapshot (VENDORING.md: "a vendor pin never carries an unmerged branch"), which has noFrame::Cancel/BCancel/XCanceluntil an integrator re-pins it past #514. This is the same pattern as #137/#138 and #507/#508: a compiler-only PR mergeable now, plus a render-pipeline PR deliberately blocked on a re-pin.Split from the original
cancellane (#500) slice 1, which bundled this render code together with an unauthorizedvendor/re-pin and an unrelated adapter.rs hunk. That hunk (line_break_inline's#[cfg(feature = "linebreak-skip")]branches collapsed to the unconditionalskip_pt: Noneform) was needed only because the unauthorized re-pin pulled in unrelatedmain-side drift inInline::LineBreak; since this PR carries no re-pin, that hunk is dropped here —adapter.rsis otherwise untouched.Overlap check
Same as #514 — issue #500 is the only claim on this feature, no other in-flight branch.
Test results
crates/render-pipeline/tests/cancel_math.rs(4 tests, from the original lane, unmodified) cannot run yet for the same reason the crate doesn't build. Confirmed the expected, exact failure mode:→ 16
error[E0599]: no variant, associated function, or constant named 'Cancel'/'BCancel'/'XCancel' found for enum 'flashtex_compiler::math::Frame', and nothing else (confirmed viagrep -c "^error"= 17 total: 16E0599+ 1 summary line; no other error kind present).Once an integrator re-pins
vendor/compilerpast #514, the 4cancel_math.rstests (strike direction/count with exact corner endpoints, 0.06em stroke width,\xcancel{xy}width composition, no-shift vs plain math) plus the existingboxed_mathregression should be re-run before merging.Not done
Update (slice 2, review fix — supersedes the geometry description above)
The original corner-to-corner geometry above was reviewed against real pdflatex + cancel.sty and found wrong in 5 ways, all fixed in a follow-up commit (
bf267359): (1) cancel bodies now use the ambient (ambient size-class-aware) style instead of hardcoded display style; (2) the strike now transcribes cancel.sty v2.2's real\@can@slashalgorithm (fetched from CTAN) — a quantized-slope line from a fixed table, not a naive corner-to-corner diagonal; (3) stroke thickness is a fixed 0.4pt (\unitlength/\thinlines), not scaled with font size; (4) degenerate (empty/flat) bodies get a 2pt/6pt minimum clamp so a slash always draws; (5) box extents now grow to include the actual slash overshoot instead of staying at the plain body's extents.Still cannot build or run tests — same reason as before, blocked on an integrator re-pin past #514. This slice's numeric claims are verified by hand arithmetic (a Python mirror of the TFM-scaling math using this repo's own embedded font tables) rather than a real test run; full detail and the supervisor's independent spot-check of that arithmetic are in the PR comments.
## Test results/## Not doneabove describe slice 1 only — treat this update as the current state.🤖 Generated with Claude Code