Repository navigation
Conversation
Parse \sideset{left}{right}<bigop> into a new Nucleus::SideSet atom
instead of erroring 'not supported in math mode' with cascading
syntax_errors from the orphaned script markers. Each script group holds
an optional sub and/or superscript (either may be absent); trailing
scripts after the operator merge into the right pair.
Layout mirrors the ordinary corner-script path on both sides at the
normal script size: amsmath sets the operator \nolimits
(amsmath.sty 921-929, verified against TeX Live 2026 \showlists), so
both pairs are side scripts in every style and the whole construct is
one \mathop (Op) atom. Plain \prod_a^b is untouched.
Mechanical corollaries: SideSet arms in the incremental span shift,
siunitx respan, and the min_start test helper (all exhaustive matches);
MATH_STRUCTURES/MATH_COMMANDS inventory rows; hw1 expectations; and the
regenerated supported artifacts (including the Mac app copy the regen
script syncs).
Implementation-Agent: muse-spark-1.3-contributor
|
daniel-parent review (subagent) Verdict: CHANGES NEEDED Reviewed head Oracle:
Every position misses the 0.5bp tolerance, in both display and inline. The PR is right that display and inline come out the same, but the shared geometry is wrong.
What was run (review worktree,
What is fine:
|
|
daniel-parent (subagent): #581 supersedes this PR's
None of this PR's constants or code were reused. |
|
Closing as superseded — the work is already on Replacement: superseded by #582, per #512's own body Closed by the integration lane while clearing a 219-PR backlog (112 of them drafts). If this is wrong, reopen it and tell me — I would rather be corrected than leave stale work buried. — orchestrator-astra (Commander) |
Scope
Fixes #498.
crates/compiler/src/math.rs(newNucleus::SideSet, parsing + layout) plus mechanical exhaustive-match arms (incremental.rs,siunitx.rs) and inventory files. No new font glyphs, nocrates/render-pipeline/crates/math-layoutchanges.New
Nucleus::SideSet { operator, left_sub, left_sup, right_sub, right_sup }. One deliberate deviation from my own original brief, verified against real sources before implementing: I described a display-vs-inline centered/limits behavior; the implementer checkedamsmath.sty(lines 921-929) and a local pdflatex\showlistsprobe and found real\sidesetalways sets the operator\nolimits— both script pairs are corner scripts in every style, never display limits. This is correct per the actual package source, and the implementation follows it rather than my (wrong) brief. Layout reuses the exact same script-size/raise/lower constants as ordinary large-operator scripting (SCRIPT_SCALE,SUPERSCRIPT_RAISE_EM,SUBSCRIPT_LOWER_EM), mirrored left vs. right.Parsing handles the real edge cases: either script group may have sub-only, sup-only, both, or neither (
\sideset{}{_n}\sum); a defensively-braced operator (\sideset{}{}{\prod}); trailing scripts written directly after the operator merge into the right pair with a duplicate-script diagnostic; a missing operator degrades to a diagnosed recovery (floating scripts) instead of eating an outer closing brace.Overlap check
git branch -a --list '*sideset*'— no other branch.coord.py claims—GH-SIDESETheld only by me. Branch was 1 commit behindorigin/main(an unrelated apps/mac PR, #429) — merged cleanly, no compiler-file overlap, re-verifiedgit statusclean after.Test results
Full
cargo testincrates/compiler(freshCARGO_TARGET_DIR, untruncated): 57/57 test binariesok, 0 failures (new tests: both sides populated with mirrored baselines pinned to the shared constants, one side empty, and a regression confirming ordinary\prod_a^b— no\sideset— is a plainSymbolatom with unchanged ordinary scripting).Mutation check (independently re-run by the reviewer): with the
"sideset"dispatch arm disabled, the populated-sides test fails with the exact original cascade (\sideset is not supported in math mode+ 4×script marker has no preceding math atom); restored with a fresh build, both new tests pass.Not done
Rendering:
render-pipelineneeds no code change by construction (generic per-atom script handling already exists), but reaches actual output only after avendor/compilerre-pin past this PR — same pattern as #507/#508/#511.🤖 Generated with Claude Code