Skip to content

render-pipeline: lay out eqnarray as centred rcl block (#520, needs vendor re-pin) - #561

Closed
d-q222 wants to merge 1 commit into
agent/daniel-muse-lead-2/eqnarray-compilerfrom
agent/daniel-muse-lead-2/eqnarray-pipeline
Closed

d-q222 wants to merge 1 commit into
agent/daniel-muse-lead-2/eqnarray-compilerfrom
agent/daniel-muse-lead-2/eqnarray-pipeline

Conversation

@d-q222

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

Copy link
Copy Markdown
Contributor

Draft — depends on #559 (compiler half) merging, then a vendor/compiler re-pin past its commit.

What changed

  • New RowsEnv::EqnArray, dedicated rows_block arm: right/centred/left columns, fixed 2x\arraycolsep (10pt) gaps reused from mathgrid::ARRAYCOLSEP, block centred. Only eqnarray-specific arms touched.
  • No compile-time dependency on compiler: eqnarray / eqnarray* environments are unimplemented (#520) #559 — RowsEnv reads the environment name from source text, not a new compiler type.

Tests

  • crates/render-pipeline: independently re-verified fresh, 100% green, no regressions.
  • End-to-end geometry test (tests/eqnarray.rs) is #[ignore]d: needs the vendor re-pin to see real eqnarray rows instead of the vendored plain-text fallback.

Ready when

  1. compiler: eqnarray / eqnarray* environments are unimplemented (#520) #559 merges.
  2. vendor/compiler re-pinned past it (integrator-owned).
  3. Un-ignore tests/eqnarray.rs, confirm the 10pt spacing/numbering assertions pass end to end, un-draft.

Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: daniel-muse-lead-2 (Claude Sonnet Muse supervisor; split from muse/eqnarray for the compiler-PR-first/pipeline-draft-second pattern)
Co-authored-by: d-q222 [email protected]

🤖 Generated with Claude Code

…acing (#520)

New RowsEnv::EqnArray (read from source at the display start, as for
all rows envs) plus a dedicated rows_block arm: right/centred/left
columns, fixed 2x\arraycolsep (10pt) gaps reused from
mathgrid::ARRAYCOLSEP, block centred, no {} prefix on the relation
column. Only eqnarray-specific arms touched; all other envs compute
byte-identical values. No compile-time dependency on the paired
compiler PR — RowsEnv reads the environment name from source text, not
a new compiler type.

Draft: the end-to-end geometry test (tests/eqnarray.rs) stays
#[ignore]d until a vendor/compiler re-pin past the compiler PR's
commit lets the vendored compiler emit real eqnarray rows instead of
its current plain-text fallback.

Implementation-Agent: muse-spark-1.3-contributor
Commit-Executor: daniel-muse-lead-2 (Claude Sonnet Muse supervisor; split
from muse/eqnarray for the compiler-PR-first/pipeline-draft-second
pattern)
Co-authored-by: d-q222 <[email protected]>
@GoKubar
GoKubar deleted the branch agent/daniel-muse-lead-2/eqnarray-compiler September 16, 2026 04:18
@GoKubar GoKubar closed this Sep 16, 2026
ItsAkilesh pushed a commit to ItsAkilesh/flashtex that referenced this pull request Sep 18, 2026
What changed:
- `RowsEnv::EqnArray`, read from the environment name at the display's
  first byte, so `eqnarray`/`eqnarray*` stop falling through to `align`.
- A `rows_block` arm for it, driven by a new free `eqnarray_columns`:
  right/centred/left columns separated by a fixed `2\arraycolsep`, the
  block centred by latex.ltx's two `\@centering` tabskips (`\mathindent`
  under `fleqn`). A fourth or later cell -- which pdflatex rejects with
  `Too many columns in eqnarray environment` and then overprints into the
  number column -- is set after the third column with a `math_limitation`
  warning instead of being drawn at x=0.
- The vertical is deliberately NOT special-cased. pdflatex measures
  `eqnarray` row baselines 15.000/16.600/17.500 pt apart at 10/11/12 pt,
  i.e. `\baselineskip` + `\jot`, identical to `align`: latex.ltx's
  `\@@eqncr` puts an explicit `\vskip\jot` between rows where amsmath's
  `\displ@y@` says `\openup\jot`. The lead-in to first row distance is
  identical too. The closed prior-art PR flash-tex#561 zeroed `\jot` for eqnarray;
  measurement says that was wrong, so this does not carry that hunk.

Oracle: pdfTeX 3.141592653-2.6-1.40.29 (TeX Live 2026), glyph origins via
PyMuPDF 1.28.2, article + geometry margin=1in on US Letter (text block
72..540 bp). Gap either side of the relation 9.9626/9.9600/9.9626 bp at
10/11/12 pt -- the quirk the issue names, against amsmath `align`'s
2.7696 bp at 10 pt in the same document. Block centre 306.0065/306.0051/
306.0046 bp, number right edge 540.018/540.016/540.010 bp. Under
`10pt,fleqn` the block starts 24.907 bp in (`\mathindent` = 25 pt); under
`10pt,leqno` the number moves to x=72 and the block does not move.

What was run:
  cargo test -p flashtex-render-pipeline --lib --test eqnarray
  test adapter::tests::rows_env_reads_eqnarray_from_source ... ok
  test typeset::eqnarray_tests::columns_match_pdflatex_at_ten_point ... ok
  test typeset::eqnarray_tests::columns_match_pdflatex_at_eleven_point ... ok
  test typeset::eqnarray_tests::columns_match_pdflatex_at_twelve_point ... ok
  test typeset::eqnarray_tests::long_right_hand_side_keeps_the_block_centred ... ok
  test typeset::eqnarray_tests::fleqn_starts_the_block_at_the_math_margin ... ok
  test typeset::eqnarray_tests::relation_gaps_are_arraycolsep_not_thickmuskip ... ok
  test result: ok. 171 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out

Next step: the three end-to-end tests in tests/eqnarray.rs are `#[ignore]`d
and pinned to the same measurements. `crates/render-pipeline` builds
against the frozen `vendor/compiler` mirror at `c95977d6`, which predates
the flash-tex#520 compiler change on main and still reports `environment 'eqnarray'
is not implemented; its body is typeset as plain text` (verified in this
worktree). Re-pinning vendor/ is integrator-owned; un-ignore all three at
re-pin time.

Prior art: the closed PR flash-tex#561 by daniel-muse-lead-2 / muse-spark-1.3-contributor
established this approach. It was auto-closed when its base branch
`agent/daniel-muse-lead-2/eqnarray-compiler` was deleted on integration of
the compiler half, not on review.

Implementation-Agent: claude-opus-5 subagent of daniel-parent
Commit-Executor: daniel-parent subagent
Co-authored-by: daniel-muse-lead-2 <[email protected]>
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
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