Repository navigation
vendor: re-pin math-layout to main, and select the kernel \big rule without amsmath (#239's missing pipeline half) - #252
Merged
Conversation
`crates/render-pipeline/vendor/math-layout` was pinned at `ea4ee5c8`, **five math-layout commits behind main** — it was never re-pinned after #186 landed, so three merged PRs were inert in the pipeline. `git archive origin/main:crates/math-layout`, byte-identical to the real crate apart from `PIN`, per vendor/VENDORING.md. What the bump carries: - **#239** `BigSizing::{Kernel, Amsmath}` — the kernel's fixed `\big`..`\Bigg` lengths alongside amsmath's `\bBigg@`. `Atom::big_delimiter` keeps the amsmath rule, so this re-pin alone changes no output; selecting the kernel rule is the pipeline's job and is the next commit. - **#229** `MathFontMetrics::extension_glyph` takes a `SizeClass`. - **#186** 47 kernel math symbols with their cmsy/cmmi/cmr/cmex slots. - `2d652944` cmsy square relations boxed from their real TFM slots. - `c1702353` dotless letters share `\imath`/`\jmath`'s slots. - `b81a5414` `\bullet`/`\bigcirc` key off their cmsy slot's code point. #229's signature change lands on this crate's two implementors of the trait, which are pure delegators: `mathtex.rs` forwards to `CmMathMetrics` and `mathtext.rs` to its inner metrics. Both now forward `size`, as every neighbouring method in the same impls already does (`delimiter_extensible`, `radical_extensible`, `accent_sizes`). Taking the `_size` escape instead would have silently pinned family 3 to Text and quietly discarded the point of #229. Unblocks: #239's pipeline half (next commit). #227 (vertical assemblies) also builds against this mirror. Gates, NixOS linux-primary, bundled apps/mac/Fonts, FLASHTEX_TFM_DIRS = public/lm:jknappen/ec:public/amsfonts/symbols. Zero **font-failure** diagnostics (`font_unavailable`, `required_metrics_unavailable`, `ec_metrics_unavailable`, `font_outline_substituted`, `tfm_missing`, `math_font_unavailable`) — not zero diagnostics of any kind, since every corpus fixture legitimately reports `math_resource_profile`: | gate | control (main 9a82257) | after re-pin | |---|---|---| | render-pipeline --release --locked --no-fail-fast | 202 passed, 0 failed | 202 passed, 0 failed | | render-pipeline failing SET | empty | empty (identical) | | amsmath corpus | 59/59 within 0.5 bp | 59/59 | | HW1 / HW2 | 3 pages, 0 errors, 0 overfull | same | | real-world corpus (10 fixtures) | status/pages/diagnostic sets | identical to control | Implementation-Agent: Claude Opus 5 (integration lane, linux-primary / NixOS) Commit-Executor: Claude Opus 5 via Claude Code (direct-agent Git execution under the observed-Cursor-limit user override) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
… absent The pipeline half #239 named as "the one thing here that is *not* done". math-layout models both sizing rules (`BigSizing::Kernel` / `::Amsmath`); choosing between them is a fact about the package list, which only this crate reads, and the math-layout lane was correctly barred from touching `vendor/`. - `Context::amsmath_loaded`, computed once in the constructor and carried on `TextSink::amsmath`, beside the existing `amsfonts`. Once, not per formula: a per-formula `\usepackage` re-scan is what made a whole-document render quadratic in (source size x formula count) — the FT-070 finding. - The `N::SizedDelimiter` arm picks `Atom::big_delimiter` (amsmath) or `Atom::big_delimiter_kernel` (the kernel's absolute `\vbox` lengths), mapping the compiler's 1.2/1.8/2.4/3.0 scale through math-layout's own `BigSizing::kernel_for_factor` rather than copying 8.5/11.5/14.5/17.5 into this crate. **`amsmath` is deliberately a separate predicate from `ams_symbol_fonts`.** That one is `amssymb || amsfonts` — the msam/msbm symbol fonts — and neither package loads `amsmath`. Reusing it here would apply amsmath's rule to a document that only wanted its symbols. The fix, `\Big[` in an article, as painted: | body size | before (no amsmath) | after | pdflatex | |---|---|---|---| | 10pt | cmex10 | cmex10 | fixed | | 11pt | cmex10, baseline 142.092 | cmex10, baseline 141.240 | `\vbox`, not `\vcenter` | | 12pt | **one variant further up the chain** | cmex10 | fixed | At 12pt the old code reached a visibly taller bracket than pdflatex sets; the 11pt baseline moves because Rule 19's delta is `max(pt - axis, axis)` for the kernel's `\vbox`, not half the target as for amsmath's `\vcenter`. New `tests/big_delimiter_packages.rs` (3): no movement with body size without amsmath, tracking with it, and that `amssymb`/`amsfonts` alone do not read as amsmath. The third asserts at the predicate, not through the painted glyph, because an `amssymb` document currently renders identically to an `amsmath` one for an unrelated reason — `amsfonts` redeclares `OMX/cmex/m/n` with several designs (`ExtensionSizing::Designs`, #204), and at these sizes both targets resolve to the same variant. Two mechanisms, two packages; the test says so rather than resting on the coincidence. Gates (control = main 9a82257 + the re-pin commit), zero **font-failure** diagnostics — `math_resource_profile` is expected on every corpus fixture and is not one: | gate | control | this commit | |---|---|---| | render-pipeline --release --locked --no-fail-fast | 202 passed, 0 failed | 205 passed, 0 failed | | render-pipeline failing SET | empty | empty (identical) | | amsmath corpus | 59/59 within 0.5 bp | 59/59 | | HW1 / HW2 | 3 pages, 0 errors, 0 overfull | same | | real-world corpus (10 fixtures) | status/pages/diagnostic sets | identical to control | Implementation-Agent: Claude Opus 5 (integration lane, linux-primary / NixOS) Commit-Executor: Claude Opus 5 via Claude Code (direct-agent Git execution under the observed-Cursor-limit user override) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar
pushed a commit
that referenced
this pull request
Sep 14, 2026
…without amsmath — #337 already fixed by #252 (#341) Test-only pin; #337 confirmed already fixed by #252 on main. Verified on linux-primary NixOS: --test big_delimiter_packages 4 passed / 0 failed, exit 0. No source file changed. HW1/HW2 unchanged. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
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.
Two commits: the re-pin, then the pipeline half #239 explicitly left undone.
1.
vendor/math-layoutre-pin —ea4ee5c8→9a82257bIt was five math-layout commits behind main and had never been re-pinned after #186, so three merged PRs were inert in the pipeline. Carries #239 (
BigSizing), #229 (extension_glyphtakes aSizeClass), #186 (47 kernel symbols), plus the cmsy square relations, dotless letters and\bullet/\bigcirccommits.#229's signature change lands on this crate's two implementors, both pure delegators (
mathtex.rs,mathtext.rs). They now forwardsize, as every neighbouring method in the same impls already does. Taking the_sizeescape would have silently pinned family 3 to Text and discarded the point of #229.Unblocks: #239's pipeline half (commit 2), and #227 builds against this mirror.
2. The pipeline half — what #239 called "the one thing here that is not done"
math-layout models both rules; choosing between them is a fact about the package list, which only the pipeline reads, and the math-layout lane was correctly barred from touching
vendor/.Context::amsmath_loadedis computed once in the constructor (a per-formula\usepackagere-scan is what made a whole-document render quadratic — the FT-070 finding) and carried onTextSink::amsmath. TheSizedDelimiterarm then picksbig_delimiterorbig_delimiter_kernel, mapping the compiler's scale through math-layout's ownBigSizing::kernel_for_factorrather than copying 8.5/11.5/14.5/17.5 into this crate.amsmathis deliberately not the existingams_symbol_fontspredicate, which isamssymb || amsfonts. Neither of those loads amsmath; reusing it would apply amsmath's rule to a document that only wanted its symbols.The fix, measured
\Big[in anarticle, as painted, no amsmath:At 12pt the old code reached a visibly taller bracket than pdflatex sets. The 11pt baseline moves because Rule 19's δ is
max(pt − axis, axis)for the kernel's\vbox, not half the target as for amsmath's\vcenter.A note on the third test
An
amssymb-only document currently renders identically to anamsmathone — not because the rule is wrong, but becauseamsfontsredeclaresOMX/cmex/m/nwith several designs (ExtensionSizing::Designs, #204) and at these sizes both targets resolve to the same variant. Two mechanisms keyed off two different packages. The test therefore asserts at the predicate rather than resting on that coincidence, and says so.Gates
Control is a checkout of the same base. Zero font-failure diagnostics (
font_unavailable,required_metrics_unavailable,ec_metrics_unavailable,font_outline_substituted,tfm_missing,math_font_unavailable) — not zero diagnostics of any kind, since every corpus fixture legitimately reportsmath_resource_profile.--release --locked --no-fail-fastEach commit builds on its own.
Found while doing this
crates/math-layout/src/cm.rson main has a duplicate'\u{2292}'match arm (lines 429 and 528, both(Symbol, 0x77)) — #186 and the cmsy-square-relations commit each added\sqsupseteq. Same value, so no behaviour change, but it is a liveunreachable_patternswarning. Not fixed here; it belongs to that crate's owner.Implementation-Agent: Claude Opus 5 (integration lane, linux-primary / NixOS)