Skip to content

compiler + math-layout: amsmath \sideset with pdflatex geometry — a left-scripts slot (stacked on #470) - #581

Merged
GoKubar merged 11 commits into
mainfrom
agent/daniel-parent/sideset-geometry
Sep 15, 2026
Merged

GoKubar merged 11 commits into
mainfrom
agent/daniel-parent/sideset-geometry

Conversation

@d-q222

@d-q222 d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Stacked on #470: the branch starts from agent/daniel-parent/tag-textrun, which adds Nucleus::TextRun at the same match sites. Review or merge #470 first. Until it merges, this diff also shows #470's commits.

Supersedes the geometry in #512 (muse-lead). #512 was used only as a reference; none of its constants or code were reused.

What

amsmath \sideset{#1}{#2}{#3} (amsmath.sty 921-929), with pdflatex's geometry:

\@mathmeasure\z@\displaystyle{#3}
\global\setbox\@ne\vbox to\ht\z@{}\dp\@ne\dp\z@
\setbox\tw@\box\@ne
\@mathmeasure4\displaystyle{\copy\tw@#1}
\@mathmeasure6\displaystyle{#3\nolimits#2}
\dimen@-\wd6 \advance\dimen@\wd4 \advance\dimen@\wd\z@
\hbox to\dimen@{}\mathop{\kern-\dimen@\box4\box6}

math-layout: a left-scripts slot. Atom::left_scripts: Option<LeftScripts> (builder: Atom::with_left_scripts).

  • When the slot is set, the atom is #3, its own superscript/subscript are #2, and the slot is #1. It is laid out as \mathop{\box4\box6}:
    • Box 0 is #3 alone in \displaystyle: the display-size glyph, centred on the axis. Only its height and depth are used.
    • Box 4 is an empty vbox with box 0's height and depth. It carries #1 in \displaystyle: Rule 18a starts both shifts from the operator's height and depth, and both left scripts start at the box's left edge (left-aligned).
    • Box 6 is #3\nolimits#2 in \displaystyle.
  • This happens at any outer style, since every \@mathmeasure is a fresh display-style formula.
  • amsmath's \hbox to\dimen@{} and \kern-\dimen@ cancel, so the slot drops both. The list builder supplies an empty Ord atom in front instead. That gives the thin Ord-Op space and TeX's spacing against the neighbours: x\sideset gets no space before the box.
  • This is a field, not a new Nucleus variant, so no downstream exhaustive match on math_layout::Nucleus breaks. The unpacking, glue and accent patterns inside math-layout skip atoms that carry left scripts.

Compiler.

  • \sideset parses to amsmath's two atoms: an empty ordinary Group (\hbox to\dimen@{}), then Nucleus::SideSet { operator, left_superscript, left_subscript } of class Op.
    • #2 attaches to the last atom of #3.
    • Scripts after #3 are the \mathop's own.
  • Script groups take _, ^ and primes (\sideset{}{'}\sum). Other material and duplicate scripts are diagnosed.
  • The command is gated on amsmath. Without it, the compiler reports \sideset requires \usepackage{amsmath} (pdflatex: ! Undefined control sequence).
  • SideSet arms are added to every exhaustive match: reference text, span end, atom class, the approximate layout, shift_atom, the shift tests, incremental shift_math_list and siunitx respan_atom. prime_script is factored out of list parsing.
  • Inventory: \sideset moves from known-unimplemented to supported, and the hw1 preamble test now expects it to typeset silently. The generated artefacts were regenerated with render_supported_latex.sh.

Why

The #512 review found every position off by 1.7 to 10pt:

  • the operator was set at text size, not display size;
  • the script shifts were fixed em constants;
  • the left scripts were right-aligned;
  • the leading Ord and its thin space were missing.

Oracle

/Library/TeX/texbin/pdflatex, 10pt article + amsmath, \showbox of \hbox{$..$} and \hbox{$\displaystyle ..$}. Values are pt; y is positive downward from the baseline. Inline and display are identical.

formula piece pdflatex x / y math-layout
\sideset{_a^b}{_c^d}\sum left b / a 1.66663 / -8.02785, 6.00005 same (<0.001)
\sum (cmex10 "58, 14.44447 wide) 6.50428 / -9.50006 same
right d / c 20.94875 / -8.02785, 6.00005 same
box (12.88896+6.00005)x25.61162 same
\sideset{_{ab}^b}{}\sum b, ab 1.66663 (both) same
\sum 10.02094 same
width 24.46541 same
x\sideset{}{'}\sum x \sum / prime 7.38190 / 21.82637, -8.02786 same
width 32.01382 same

Overlap check

Test results

  • cargo test --test sideset (math-layout): test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
  • cargo test (flashtex-math-layout): every target test result: ok., 0 failed (golden 28, lib 12, size_oracle 2, source_spans 11, big_delimiters 4, kernel_symbols 4, glue_set 5, text_runs 2)
  • cargo test --lib sideset_tests (compiler): test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 339 filtered out
  • cargo test (flashtex-compiler): 56 test result: ok. lines, 0 failed, including hw1_preamble and supported_latex
  • In a scratch render-pipeline copy with vendor/compiler and vendor/math-layout patched to these commits (this repository's vendor/ is untouched):
    • pipeline --test amsmath_sideset: test result: ok. 3 passed; 0 failed
    • amsmath corpus oracle.py check: TOTAL 59/59 within 0.5 bp

Not done

  • The render-pipeline needs a vendor/ re-pin before it sets \sideset. The follow-up draft PR carries the conversion and tests behind amsmath-sideset.
  • The compiler's own approximate math::layout puts the pieces in amsmath's order but has no display operator size. math-layout is the exact engine.
  • Material other than scripts inside a \sideset group (amsmath would set it in box 4) is diagnosed and dropped.
  • When a trailing script follows #3 in display style, it becomes a \displaylimits limit centred on \box4\box6. In amsmath it is centred on the \mathop's wider nominal box (2\wd6-\wd0). That case was not measured.

🤖 Generated with Claude Code

https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

What changed:
- Added compiler regression tests for nested math in tags/text, text styles, unsupported commands, tag glue, and eqref labels.
- Added math-layout width/style-size regression tests.

What was run:
- test result: FAIL (expected): CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-tag cargo test --manifest-path crates/compiler/Cargo.toml --test text_runs
- test result: FAIL (expected): CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-tag cargo test --manifest-path crates/math-layout/Cargo.toml --test text_runs

Next step:
- Add the minimal text-run IR and parser/layout support.

Implementation-Agent: codex gpt-5.6-luna (max)

Commit-Executor: codex (this session)

Lane-Owner: daniel-parent (mac-m5pro-dq222)
What changed:
- Add compiler and math-layout TextRun/TextPiece IR while retaining plain Nucleus::Text output.
- Parse nested dollar and parenthesized math, text faces, tags, starred tags, and custom eqref labels.
- Lay out nested math in text-size hboxes and recurse through incremental/source-span paths.

What was run:
- test result: ok. 6 passed; 0 failed; compiler text_runs
- test result: ok. 8 passed; 0 failed; supported_latex inventory
- test result: ok. 12 passed; 0 failed; math-layout unit tests
- test result: ok. 28 passed; 0 failed; math-layout golden tests
- test result: ok. 2 passed; 0 failed; math-layout text_runs
- test result: ok. 327 passed; 0 failed; compiler unit tests
- test result: ok. 2 passed; 0 failed; corpus_gate
- test result: ok. 4 passed; 0 failed; hw1_preamble
- test result: ok. 1 passed; 0 failed; 1 ignored; hw2_gate
- test result: ok. render-pipeline vendored build
- test result: ok. pdflatex oracle widths 21.86809pt, 5.00002pt, 56.61810pt

Next step:
- Push this green PR1 step; leave render-pipeline rich display-list integration for PR2.

Implementation-Agent: codex gpt-5.6-luna (max)
Commit-Executor: codex (this session)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
This addresses the independent review of 25c63aa.
- Restores main's 2-quad tag gap as INTERIM_TAG_GAP_EM until PR 2 places tags
  flush right, so \\tag{1} is no longer glued to the formula.
- \\text inside math inside \\text shares MAX_MATH_DEPTH and is diagnosed at
  depth 40 instead of overflowing the stack.
- \\eqref to a rich \\tag{hi $x^2$} resolves to the flattened tag text (hi x²).
  References carry strings, which is documented as a limitation.
- End-to-end parser and layout tests: tag widths, \\textbf{$x$}, unbalanced $,
  an unsupported command inside $, \\tag* and \\eqref.
The automatic equation number with \\tag is unchanged; main shows it too.

What was run (full crates): cargo test --manifest-path crates/compiler/Cargo.toml
and crates/math-layout/Cargo.toml. Every test result is ok (compiler lib 327
passed).

Implementation-Agent: codex gpt-5.6-luna (max), session 01a0a148-e56e-7722-b0a8-0436a343ed75 (resumed)
Commit-Executor: daniel-parent (the resumed Codex session cannot write .git)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…ag-textrun

# Conflicts:
#	crates/compiler/src/parser.rs
…ls and fractions; \\cref on tagged equations

This is the final fix round from the second independent review.
- \\tag* no longer strips parentheses, so \\tag*{(custom)} + \\eqref gives ((custom)).
- Flattening for \\eqref uses rendered glyphs where one exists (alpha_1 gives the Greek
  letter with a subscript one) and falls back to source text for radicals and
  fractions, never dropping them.
- Regression test: \\cref on a \\tag{A} equation gives eq. (A).
- The 24.88pt width assertion is labelled a legacy Core14 compiler-route pin, not
  a pdflatex oracle (pdflatex 29.64589pt; the real comparison is PR 2).

What was run (full crates): cargo test for crates/compiler and crates/math-layout.
Every test result is ok (compiler lib 334 passed).

Implementation-Agent: codex gpt-5.6-luna (max), session 01a0a148-e56e-7722-b0a8-0436a343ed75 (resumed)
Commit-Executor: daniel-parent (the resumed Codex session cannot write .git)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…ag-textrun

# Conflicts:
#	crates/compiler/src/math.rs
…ipts)

What changed:
- `Atom::left_scripts: Option<LeftScripts>` (and `Atom::with_left_scripts`):
  when set, the atom is laid out as amsmath.sty 921-929's
  `\mathop{\box4\box6}`: box 0 is the operator alone in \displaystyle
  (measured for height/depth), box 4 an empty vbox of that height/depth
  carrying the left pair in \displaystyle (Rule 18a from the operator's
  height and depth, both scripts left-aligned), box 6 `#3\nolimits#2` in
  \displaystyle. The `\hbox to\dimen@{}` Ord and the `\kern-\dimen@` cancel;
  the list builder supplies an empty Ord atom for the thin space.
- No new Nucleus variant, so no downstream exhaustive match breaks; the
  unpacking, glue and accent patterns skip atoms that carry left scripts.
- tests/sideset.rs pins pdflatex \showbox numbers (inline and
  \displaystyle): `\sideset{_a^b}{_c^d}\sum`, `\sideset{_{ab}^b}{}\sum`,
  `x\sideset{}{'}\sum x`.

What was run:
- cargo test --test sideset: test result: ok. 3 passed; 0 failed
- cargo test (flashtex-math-layout): every binary `test result: ok.`, 0 failed

Next step: compiler \sideset parsing gated on amsmath; render-pipeline
conversion draft.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…ucleus::SideSet)

What changed:
- `\sideset{#1}{#2}{#3}` (amsmath.sty 921-929) parses to two atoms, as
  amsmath typesets it: an empty ordinary Group (`\hbox to\dimen@{}`) and a
  `Nucleus::SideSet { operator, left_superscript, left_subscript }` atom of
  class Op. `#2` attaches to the last atom of `#3` (`#3\nolimits#2`);
  scripts after `#3` are the \mathop's own. Script groups take `_`, `^`
  and primes (`\sideset{}{'}\sum`); other material and duplicate scripts
  are diagnosed.
- Gated on amsmath: without it, "\sideset requires \usepackage{amsmath}"
  (pdflatex: `! Undefined control sequence`).
- SideSet arms in every exhaustive match (reference text, span end,
  atom class, approximate layout, shift_atom, shift tests, incremental
  shift_math_list, siunitx respan_atom). `prime_script` factored out of
  list parsing.
- Inventory: \sideset moves from known-unimplemented to supported; the
  hw1 preamble test now expects it to typeset silently. Generated
  artefacts regenerated with render_supported_latex.sh.

What was run:
- cargo test --lib sideset_tests: test result: ok. 5 passed; 0 failed
- cargo test (flashtex-compiler): 56 `test result: ok.` lines, 0 failed

Next step: render-pipeline conversion (feature-gated) and scratch re-pin
check against pdflatex.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

daniel-parent independent review (subagent)

Verdict: CHANGES NEEDED (one real geometry bug, narrowly scoped; everything else checks out)

Method: detached worktree at #581's head (dffe82f5, diffed against its stated base #470 976ce70c), CARGO_BUILD_JOBS=4, CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-review-58y.

  1. pdflatex geometry, independently re-derived from a fresh \showbox run (not the PR's own numbers): \sideset{_a^b}{_c^d}\sum inline and display, \sideset{}{'}\sum, and \sideset{^*}{}\prod. Wrote my own .tex with \showboxbreadth/\showboxdepth maxed out and ran /Library/TeX/texbin/pdflatex -interaction=nonstopmode ... </dev/null, then hand-derived every glyph's x/y from the raw box dump (leading \hbox to\dimen@{} width, \thinmuskip, the \kern -\dimen@ cancellation, box 4 and box 6 widths). Every value matches math-layout/tests/sideset.rs's asserted constants (e.g. b/a at x=1.66663, y=∓8.02785/6.00005; ∑ at x=6.50428, width 14.44447; d/c at x=20.94875) and inline vs. display are byte-for-byte identical box structures, confirming the amsmath-macro-shape claim in the PR body. cargo test -p flashtex-math-layout (all files): 0 failed.
  2. amsmath gate verified, via a throwaway compiler-level probe (flashtex_compiler::incremental::compile_full, never committed): \sideset{...} without \usepackage{amsmath} produces exactly "\\sideset requires \\usepackage{amsmath}" (UnsupportedFeature) and recovers by typesetting the command literally, no panic.
  3. left_scripts cannot regress existing math output — architecturally, not just by test count. Atom::atom() in math-layout/src/layout.rs dispatches to the new make_sideset path only if let Some(left) = &atom.left_scripts, and every existing atom constructor sets left_scripts: None. Confirmed the pre-existing math-layout test files (golden.rs, kernel_symbols.rs, big_delimiters.rs, glue_set.rs, source_spans.rs, text_runs.rs) are byte-identical to compiler + math-layout: \tag and \text can contain math — a TextRun nucleus with nested $…$ (#441, PR 1 of 2) #470 (git diff review-470..review-581 on those paths is empty) and all pass. Full crates/compiler suite is also green: --lib 344/344, hw1_preamble 6/6, siunitx_columns 5/5, supported_latex 8/8, unsupported_inventory 1/1 (+1 ignored).
  4. Bug: \sideset + a trailing display-style limit script is mis-laid-out in this crate's own (IDE-preview) math layout. crates/compiler/src/math.rs's takes_display_limits() (line 3987) matches only Nucleus::Text("lim"|"max"|...) and Nucleus::Symbol("∑"|"∏"); it has no arm for Nucleus::SideSet, so it falls through its wildcard to false. That function (used at math.rs:4228) decides whether an atom's own trailing super/subscript is placed as a genuine display-style limit (below/above) or a plain corner script. I compiled real source through compile_full (a throwaway probe, not committed) and confirmed: plain $\sum_{i}$ vs \[\sum_{i}\] place i very differently (dx/dy change substantially between styles, as expected), but $\sideset{_a^b}{}\sum_{i}$ vs \[\sideset{_a^b}{}\sum_{i}\] place i at the identical offset in both styles — i.e. a trailing script on a \sideset operator never takes display limits in this layout path, contradicting both real pdflatex (confirmed above via \showbox on \displaystyle\sideset{_a^b}{}\sum_{i}, which genuinely centres i below the operator with \hfil glue) and the PR's own stated design ("Scripts after #3 are the \mathop's own"). Minimal fix: add a Nucleus::SideSet { operator, .. } => operator.atoms.last().is_some_and(|a| takes_display_limits(&a.nucleus)) arm.

Everything else — the amsmath gate, the new Nucleus::SideSet arms added to incremental.rs::shift_math_list and siunitx.rs::respan_atom, the inventory/coverage regen — looks correct and complete. Recommend landing the one-line takes_display_limits fix (or explicitly documenting the limitation) before merge.

What changed:
- `takes_display_limits()` in crates/compiler/src/math.rs gains a
  `Nucleus::SideSet` arm: it takes limits exactly when the inner operator
  (the last atom of `#3`) would. Before, it fell through to `false`, so
  `\[\sideset{_a^b}{}\sum_{i}\]` put `i` at the same corner offset as inline.
- New test `sideset_trailing_script_is_a_display_limit_like_its_operator`
  compares inline vs display placement of `i`. pdflatex `\showbox` (amsmath,
  10pt): inline `i` at x=20.95 shifted down 6.50; display `i` centred under
  `∑` at x=10.65, 13.30 below. The test asserts that direction (display is
  left of and below inline) and that the display limit baseline matches bare
  `\sum_{i}`. It fails without the arm (display y == inline y == 12.2967).

What was run:
- cargo test -p flashtex-compiler (56 suites): 674 passed, 0 failed
- cargo test --lib (compiler): test result: ok. 345 passed; 0 failed; 0 ignored
- cargo test -p flashtex-math-layout (10 suites): 71 passed, 0 failed

Next step:
- pdflatex also gives `\displaystyle\sideset{_a^b}{}\int_{i}` a centred
  limit (amsmath's outer `\mathop` has default `\displaylimits`, so the
  inner `\int`'s `\nolimits` does not carry over). This arm follows the inner
  operator as requested in review; widen it to every `\sideset` if we want
  that case too.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@d-q222

d-q222 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

daniel-parent (subagent): review fix pushed as 0c520d5, corrected in fae2b3a

  • takes_display_limits() now has a Nucleus::SideSet { .. } => true arm. amsmath wraps \sideset in an outer \mathop with the default \displaylimits. So pdflatex puts limits on it in display style whatever the inner operator is, including \int, whose own \nolimits stays inside. Text style keeps corner scripts, because the layout only asks in display style at level 0. 0c520d5 first followed the inner operator, and that was wrong for \int; the later commit fixes it.

  • sideset_trailing_script_is_a_display_limit_whatever_the_operator compares inline and display placement of i. I measured both cases in pdflatex with \showbox (amsmath, 10pt):

    • \sideset{_a^b}{}\sum_{i}: inline i at x=20.95, shifted down 6.50. Display i is centred under ∑ at x=10.65, baseline 13.30 below.
    • \sideset{_a^b}{}\int_{i}: inline i at x=16.50, shifted down 9.61. Display i is centred under ∫ at x=8.42, baseline 16.41 below.

    For both, the test asserts display i is left of and below inline i, with the same limit baseline as bare \sum_{i}. It also checks that a bare \int_{i} keeps its corner script in display style. Without the arm, the display and inline baselines are equal (12.2967), so the test fails.

Test results:

  • cargo test --lib in crates/compiler: test result: ok. 345 passed; 0 failed; 0 ignored
  • cargo test in crates/math-layout: 10 suites, 71 passed, 0 failed
  • The earlier full crates/compiler run (on 0c520d5) was 56 suites, 674 passed, 0 failed.

What changed:
- The `Nucleus::SideSet` arm of `takes_display_limits()` is now
  unconditionally `true`. amsmath wraps `\sideset` in an outer `\mathop`
  with the default `\displaylimits`, so pdflatex puts limits on it in display
  style whatever the inner operator is. That includes `\int`, whose own
  `\nolimits` stays inside. The layout only calls this in display style at
  level 0, so text style keeps corner scripts. This replaces 0c520d5's
  inner-operator rule, which was wrong.
- The test is renamed to
  `sideset_trailing_script_is_a_display_limit_whatever_the_operator` and adds
  `\sideset{_a^b}{}\int_{i}`. pdflatex `\showbox` (amsmath, 10pt): inline
  `i` at x=16.50, shifted down 9.61; display `i` centred under `∫` at x=8.42,
  baseline 16.41 below. It also checks that a bare `\int_{i}` keeps its
  corner script in display style.

What was run:
- cargo test --lib (crates/compiler): test result: ok. 345 passed; 0 failed; 0 ignored
- cargo test (crates/math-layout): 10 suites, 71 passed, 0 failed

Next step:
- None for this review item.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
… regen supported inventory

main took 71 merges today including #470's squash; the branch carried #470's
original commits. Resolved compiler math.rs/parser.rs/vocabulary.rs and
math-layout layout.rs/lib.rs hunk by hunk (kept main's Lap/underbar/comment
additions alongside the branch's SideSet work, dropped the duplicated
make_text_styled and text_space copies the auto-merge produced), then
regenerated the supported-latex inventory against the merged compiler
(amsmath 45/102, total 543/1314).

compiler: 876 tests, 0 failures. math-layout: 74 tests, 0 failures.
--locked release builds clean.

Implementation-Agent: fable-daniel-takeover
Commit-Executor: fable-daniel-takeover (direct; Cursor usage limit)
@GoKubar
GoKubar merged commit 923796b into main Sep 15, 2026
11 of 22 checks passed
@GoKubar
GoKubar deleted the agent/daniel-parent/sideset-geometry branch September 16, 2026 04:17
d-q222 added a commit that referenced this pull request Sep 16, 2026
…ideset-pipeline

What changed:
- #581's compiler `Nucleus::SideSet` and math-layout `Atom::left_scripts` have
  landed on main by another route, so every conflicted hunk in
  crates/compiler and crates/math-layout was this branch's copy of material
  main already carries. All of them resolved to main's side.
  - crates/compiler/src/math.rs (6), parser.rs (1), vocabulary.rs (1),
    crates/math-layout/src/layout.rs (2).
  - crates/math-layout/src/cm.rs auto-merged a second copy of
    `fn text_space(&self, size: SizeClass)` (E0201, duplicate definition);
    the duplicate was removed so the file matches main.
- Generated artefacts (docs/user/compiler.md,
  crates/compiler/supported/{supported-latex.json,coverage.md}, the bundled
  apps/mac copy) were taken from main and regenerated with
  `sh crates/compiler/scripts/render_supported_latex.sh`.
- What survives from this branch is only its own payload: the pipeline-side
  consumption of math-layout's left scripts, feature `amsmath-sideset`.
  `git diff origin/main` is now exactly crates/render-pipeline/Cargo.toml,
  src/incremental.rs, src/typeset.rs and tests/amsmath_sideset.rs
  (4 files, +220).

What was run:
  crates/math-layout: cargo build --lib -> Finished
  crates/render-pipeline: cargo build --lib --tests -> Finished
  crates/render-pipeline: cargo test --lib
    test result: ok. 164 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out
  amsmath_inline:            test result: ok. 11 passed; 0 failed; 0 ignored
  displaystyle_switch:       test result: ok. 3 passed; 0 failed; 0 ignored
  math_ellipsis:             test result: ok. 5 passed; 0 failed; 0 ignored
  math_operator_limits:      test result: ok. 6 passed; 0 failed; 0 ignored
  math_operator_thin_space:  test result: ok. 3 passed; 0 failed; 0 ignored
  math_symbols:              test result: ok. 18 passed; 0 failed; 1 ignored
  math_text:                 test result: ok. 7 passed; 0 failed; 0 ignored
  amsmath_sideset:           test result: ok. 0 passed; 0 failed; 0 ignored
    (the whole file is behind `amsmath-sideset`, which is off until the re-pin)

Next step:
- Still blocked on the vendor/compiler + vendor/math-layout re-pin (#711);
  until it moves, the feature cannot be switched on by default and the
  end-to-end behaviour cannot be shown.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
ItsAkilesh pushed a commit to ItsAkilesh/flashtex that referenced this pull request Sep 18, 2026
What changed:
- `crates/render-pipeline/Cargo.toml` declares a new off-by-default feature
  `compiler-node-surface`. It carries no behaviour of its own: every arm it
  adds is the inert answer the pipeline already gave for a compiler node the
  current pin (`c95977d6`) cannot produce.
- The pipeline's exhaustive matches and node constructors now cover main's
  compiler surface behind that feature: `parser::Block::Penalty`/`Tabbing`,
  `parser::Inline::ThePage`/`PageNumbering`/`TabStop`/`TabJump`/`Marginpar`/
  `Penalty`/`PagePenalty`/`Discretionary`, `VSpace`/`HSpace` glue components,
  `math::Nucleus::TextRun`/`SideSet`/`Lap` and `math::Accent::Mathring`
  (compiler flash-tex#549, flash-tex#551, flash-tex#555, flash-tex#568, flash-tex#581, flash-tex#583, flash-tex#587, flash-tex#606, flash-tex#616).
  `adapter::vspace_block` is a new cfg'd constructor beside the existing
  `line_break_inline`; the one open-coded `Inline::LineBreak { .. }` left in
  the `\opening` lowering now goes through `line_break_inline` too.
- `tabbing` is lowered to flush-left paragraphs with one `unsupported_block`
  limitation, the way `LetterBlock` is, so no row is dropped by the re-pin.
- `docs/integration/repin-runbook.md`: the exact re-pin commands, the three
  vendor directories that must move (`compiler`, `tex-expansion`, and a new
  `bibliography`), the lockfile and `#[ignore]` edits `--locked` CI needs, the
  measured test deltas and the PRs the pin unblocks.

No file under `vendor/` is touched: the vendor swap used to measure all of
this was scratch-only and reverted. `git diff --stat origin/main...HEAD`
contains zero `vendor/` paths.

What was run:
Whole `crates/render-pipeline` suite, CARGO_BUILD_JOBS=4, --no-fail-fast:
  origin/main, pinned vendor, feature off:   469 passed, 13 failed
  this branch, pinned vendor, feature off:   469 passed, 13 failed (same 13)
  this branch, vendor re-pinned, feature on: 485 passed, 0 failed
The 13 red-on-main tests (letter_class_geometry x5, frame_env, underline_sout
x4, uline x2, xcolor_oracle) all pass after the re-pin.
Two re-pin-gated #[ignore]s also pass against the re-pinned vendor:
  test frame_draws_a_rule_border_around_its_content ... ok
  test coloneqq_decomposes_like_mathtools ... ok
crates/flashtex-cli against the same re-pinned vendor:
  test result: ok. 58 passed; 0 failed
cargo check --all-targets on this branch at the current pin: 0 errors.

Next step:
The integration lane applies docs/integration/repin-runbook.md section 3 --
swap the three vendor trees, move `compiler-node-surface` (and
`linebreak-skip`) into `default`, refresh both Cargo.locks, drop the two
`#[ignore]`s, update vendor/VENDORING.md.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
jay3332 added a commit that referenced this pull request Sep 19, 2026
…through their PINs (#953)

d5cedcb edited vendor/math-layout/src/{cm,mathlist}.rs and
vendor/pdf/src/encoding.rs directly (the angle-bracket delimiter aliases),
which VENDORING.md forbids; scripts/check-vendor-pins.sh FAILed integrity
on both (pdf's a9ec24a pin had also stopped matching the mirror's
exact.rs/v2.rs). Both mirrors are now `git archive d5cedcb crates/<name>`
exports, byte-identical to main's live crates apart from PIN, so the
aliases reach the pipeline through the pin. math-layout also picks up the
four crates/math-layout commits the old pin lacked (#470 TextRun, #560
ord_pair, #581 sideset, #646), all additive: no pipeline source changed.

Verified: check-vendor-pins.sh reports math-layout and pdf "up to date
(ok)"; cargo test --release on crates/render-pipeline 750 passed / 0
failed with these mirrors and the reconciled compiler mirror of the next
commit.

Implementation-Agent: Claude Code (mac-claude-a)
Commit-Executor: git via Claude Code
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Y1nAv4pEnmMYXgteBoadHn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants