Repository navigation
math: \shoveleft / \shoveright in multline are unsupported (#522) - #552
Merged
Merged
Conversation
A top-level \shoveleft/\shoveright in a multline row's first cell is lifted before math parsing (its braced content still typesets as an ordinary group) and recorded as MathRow.shove; layout sets that one row flush left/right while other rows keep the centred default. Other displays still diagnose the commands as unknown. Implementation-Agent: muse-spark-1.3-contributor Commit-Executor: muse-spark-1.3-contributor
This was referenced Sep 15, 2026
d-q222
added a commit
that referenced
this pull request
Sep 16, 2026
…ag-placement-pipeline What changed: - #470's compiler `Nucleus::TextRun`/`TextPiece` and math-layout `TextRun` have landed on main, so most conflicted hunks were this branch's copy of main's material and took main's side: - crates/compiler/src/math.rs: 2 of 3 (the `\mathbf` `split_hyphen_runs` rewrite and its `-` mathcode comment). The third, `INTERIM_TAG_GAP_EM`'s doc comment, is this PR's own commit 1b6f03f and was kept. - crates/compiler/src/parser.rs: the `comment_environment` hunk took main. - crates/math-layout/src/lib.rs and src/layout.rs: main (`LeftScripts` in the import lists; main's removal of `make_text_styled`). - crates/compiler/tests/text_runs.rs (add/add): kept this PR's two tag tests, which main's side does not have. - Two hunks needed a real merge rather than a side: - crates/compiler/src/parser.rs `multirow_environment`. Main gained #552's `\shoveleft`/`\shoveright`, which lifts shove tokens out of each row's cells before they are parsed, inside the row loop; this PR pre-parses every row up front so it can find each row's `\tag` before numbering. The shove lifting now runs as its own `rows.iter_mut()` pass ahead of the pre-parse and is zipped into the row loop, so both behaviours survive. - crates/render-pipeline/Cargo.toml: union of the feature blocks — `compiler-text-run` (this PR) alongside main's `math-font-kerns` and `tikz-patterns`. - crates/render-pipeline/tests/display_placement.rs module comment: main's current statement of what passes (17, 18, nested list 20) plus this PR's `compiler-text-run` paragraph; only 15 is still listed as not passing. - Two silent auto-merge duplications had to be removed by hand; both made the tree fail to compile and neither is a behaviour change: - crates/math-layout/src/cm.rs: a second copy of `fn text_space(&self, size: SizeClass)` (E0201). - crates/compiler/src/math.rs: a second copy of the whole 376-line text-run reference-text block (16 items, E0428). main's copy is a strict superset (it carries the `Nucleus::Lap` and `Nucleus::SideSet` arms), so the branch's copy was deleted. - #736 (`adapter::strip_tag`'s silent-drop fix) is NOT on origin/main yet, so this merge did not touch it and nothing of it was undone. This branch's `strip_tag` is unchanged: the `Text`/`Symbol` arm, the `#[cfg(feature = "compiler-text-run")]` `TextRun` arm and the `_ => {}` fallback. The one-directional resolution #736 describes is still owed whichever of the two lands second. - `sh crates/compiler/scripts/render_supported_latex.sh` was re-run; the generated artefacts come back identical to main. - `git diff origin/main` is now exactly this PR's own payload: the compiler tag-numbering commit (math.rs, parser.rs, tests/text_runs.rs) and the render-pipeline half (Cargo.toml, adapter.rs, incremental.rs, mathtext.rs, typeset.rs, tests/display_placement.rs, fixtures 37-48 and their refs). What was run: crates/compiler: cargo test --lib test result: ok. 412 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test --test text_runs test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test 77 "test result: ok." lines, 0 failed crates/render-pipeline (pinned vendor, default features): cargo build --lib --tests -> Finished cargo test --lib test result: ok. 164 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out cargo test --test display_placement test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out cargo test --no-fail-fast binaries=105 passed=469 failed=13 ignored=4 All 13 failures panic at crates/render-pipeline/src/adapter.rs:1311 (main's 1308, shifted by this branch), the known stale vendor/compiler pin. Same 13 as on main today. Next step: - Still blocked on the vendor/compiler + vendor/math-layout re-pin (#711); until it moves, `compiler-text-run` cannot go default and fixtures 37-48 cannot show their end-to-end behaviour. - Whichever of #585 and #736 lands second still owes the one-directional strip_tag resolution #736's body sets out. Implementation-Agent: claude-opus-5 subagent of daniel-parent Commit-Executor: daniel-parent subagent Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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.
Fixes #522.
What changed
multline/multline*rows now honour\shoveleft{...}/\shoveright{...}: the first top-level occurrence in a row's first cell is lifted before math parsing (its braced content stays an ordinary group, so it still typesets) and recorded as newMathRow.shove;layout::display_rowssets that one row flush left/right, other rows keep the centred default.multline's own default placement (currently centred likegather, not first-left/last-right) is deliberately unchanged — kept the diff narrow and existing baselines green; flagged as a follow-up.crates/render-pipelinefiles touched — compiler-only change, no vendor-pin dependency for merging.Tests
crates/compiler: full suite independently re-verified fresh, 100% green (incl. newtests/multline_shove.rs, 4/4, andtests/hw1_preamble.rsupdated for the no-longer-an-error case).cargo check -p compiler: clean.Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: muse-spark-1.3-contributor
🤖 Generated with Claude Code