Repository navigation
compiler: a package-provided math symbol needs its package loaded - #230
Merged
Merged
Conversation
…amsmath's definition when amsmath is loaded
`math::parse_tokens` took no package context, so every construct a
package redefines silently got the LaTeX kernel's definition -- the
wrong one whenever the document actually loaded the package. `\colon`
is the case that forced this: the kernel declares it punctuation
(`fontmath.ltx` 400, `\DeclareMathSymbol{\colon}{\mathpunct}{operators}
{"3A}`, 0mu/3mu) and amsmath renews it (`amsmath.sty` 409-410) to
`\nobreak\mskip2mu\mathpunct{}\nonscript\mkern-\thinmuskip{:}\mskip6mu
plus1mu\relax`, whose empty punctuation atom's 3mu is cancelled by the
negative kern behind it -- leaving an *ordinary* `:` with 2mu before
and 6mu after. Most documents that write `\colon` load amsmath.
Measured with TeX Live 2025 pdflatex at 10pt, control `\hbox{$ab$}` =
9.57755pt:
| box | no amsmath | with amsmath | delta |
| --- | ---: | ---: | ---: |
| `\hbox{$\colon$}` | 2.77779pt | 7.22212pt | +8mu |
| `\hbox{$a\colon b$}` | 14.02196pt | 16.79967pt | +5mu |
| `\hbox{$a\colon=b$}` | 24.57747pt | 30.13289pt | +10mu |
| `\hbox{$a\colon+b$}` | 21.79976pt | 29.0218pt | +13mu |
| `\hbox{$f\colon A\to B$}` | 41.55893pt | 44.33664pt | +5mu |
The 10mu and 13mu rows are the class in evidence, not just the glue:
the kernel's punctuation atom turns a following `+` into an Ord
(TeXbook Chapter 17's Bin-after-Punct rule) where amsmath's ordinary
one leaves it a Bin. The three-atom model this emits -- `space(2/18)`,
a `:` forced Ord, `space(6/18)` -- was checked against amsmath's own
expansion inside one document and is identical to the scaled point in
text, display, script and scriptscript style, and for `\colon` at a
formula boundary, before a relation, before a binary, and doubled.
## The mechanism
`MathPackages` is a `Copy` value carried by `MathParser` and passed to
`parse_tokens` / `parse_tokens_reporting_unclosed` as a required
parameter, so a caller cannot forget it and silently fall back to the
kernel. `parser::P` folds it from `\documentclass` and each
`\usepackage` name into a `math_packages` field -- the shape
`P::colors` and `P::font_encoding` already use, and the one that can
capture package *options* later, since the parser reads and drops them
in the same place. It is deliberately not a global: siunitx's
thread-local `Settings` is the mistake this does not repeat, and one
process compiles many documents. `siunitx::typeset`/`Context` take it
too, because `Context::math` re-parses synthesized unit formulas and is
the one path into the math parser with no document in scope.
Which packages and classes carry amsmath's definitions in was measured,
not assumed: each name was compiled with pdflatex and
`\hbox{$a a\colon b b$}` compared against the kernel expansion
(23.5995pt) and the amsmath expansion (26.37721pt) in the same
document, so font metrics cancel. Loading amsmath: `mathtools`,
`empheq`, `physics`, `nccmath`, `aligned-overset`, `cool`, `commath`,
`mismath`, `mhchem`, `chemformula`, and the `amsart`/`amsbook`/
`amsproc`/`acmart`/`beamer` classes. Measured as leaving the kernel's
alone, and so deliberately absent: `amsthm`, `amssymb`, `amsfonts`,
`amsopn`, `amsbsy`, `amscd`, `amstext`, `bm`, `unicode-math`,
`siunitx`, `esint`, `breqn`, `cases`, `mathdots`, `thmtools`, `braket`,
`cancel`, `tikz-cd`, `diagbox`, and the `article`/`report`/`book`/
`memoir`/`scrartcl`/`scrbook`/`scrreprt`/`revtex4-2`/`elsarticle`/
`IEEEtran`/`letter`/`proc`/`slides`/`amsdtx` classes.
`\colon` was previously diagnosed `\colon is not supported in math
mode` and typeset literally, so both definitions are new behaviour; it
joins the supported-LaTeX inventory and the generated artefacts are
regenerated.
`math::AtomClass` and `MathAtom::class_override` become public. The
render pipeline re-derives the forced class today by reading the
control word back out of the source at the atom's span
(`typeset::class_override_of`), which cannot tell `\colon`'s two
definitions apart -- they are the same five characters of source. The
sibling pipeline PR reads the field instead, behind its own feature.
## Gates
`cargo test --release` in `crates/compiler`: 444 passed, 0 failed,
against 441 passed / 0 failed at the same base (590fd86) in a separate
control worktree -- the 3 new tests, no other change. (`--test
robustness`'s `deeply_nested_input_does_not_blow_the_stack` overflows
in a *debug* build on this machine identically on both sides; release
passes on both.)
Real-world corpus (`tools/real-world-corpus/run.py --no-oracle`, this
checkout's binaries): 20 fixture/producer pairs, status, page counts
and exact diagnostic message sets identical to the control. hw1 and hw2
render 3 pages each, 0 errors, 0 overfull.
`crates/render-pipeline` vendors its own pinned copy of this crate
(`flashtex-compiler = { path = "vendor/compiler" }`), so nothing here
reaches `flashtex-render` until that pin moves; the render gates were
therefore also run through an *uncommitted* vendor swap, together with
the sibling pipeline change. amsmath corpus 59/59, amssymb 38/39
(`32-braces-narrow`, 1.012 bp, fails at this base too), both with zero
font diagnostics. Through that full stack `\hbox{$X a\colon b X$}`
renders within 0.0001 bp of pdflatex with and without amsmath.
Implementation-Agent: Claude Code engine-engineer (linux-primary, NixOS)
Commit-Executor: git via Claude Code
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
…th-package-context
`apps/mac/scripts/sync-supported-latex.sh --check` and `CompletionTests.testBundledInventoryMatchesTheCompiler` compare `apps/mac/Sources/FlashTeXMac/Resources/supported-latex.json` against `crates/compiler/supported/supported-latex.json` by sha256, so the editor's completion vocabulary never drifts from the compiler. The two were byte-identical at this branch's base (21eed5701677) and the previous commit regenerated the compiler-side copy, so the bundled one had to follow. Regenerated with the script, not by hand; the check now reports `bundled copy is current (23d25a1ff459)`. Implementation-Agent: Claude Code engine-engineer (linux-primary, NixOS) Commit-Executor: git via Claude Code Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
…context' into agent/kabir-claude/math-package-gating # Conflicts: # docs/user/compiler.md
`math::command_atom` applied the amssymb/amsfonts table unconditionally, so
`\square`, `\nleq`, `\mho` and the other 218 commands it answers rendered
happily in documents that never loaded the package. Probed with `\ifcsname`
under TeX Live 2025, base LaTeX2e has **no definition for any of them** and
pdflatex answers "Undefined control sequence", so this was a 1:1 divergence
across the whole table, not a few symbols.
Each symbol now carries the file that declares it (`amssymb::Provider`,
generated, not hand-written: `gen_amssymb.py` collects the declarations from
both `.sty` files before the dedup that used to hide `amsfonts.sty` 141-147's
re-declaration of `\square`, `\lozenge`, `\rightsquigarrow`,
`\vartriangleright`, `\vartriangleleft`, `\trianglerighteq` and
`\trianglelefteq`). `MathPackages` gains `amssymb` and `amsfonts` flags beside
`amsmath`, and `command_atom` diagnoses the missing `\usepackage` instead of
rendering. The regenerated table is byte-identical to the committed one apart
from the new field.
The same gate covers the four commands with their own arms rather than a table
row — `\varnothing`, the dashed arrows, `\mathbb`/`\mathfrak` and the obsolete
`\Bbb`/`\bold` (`\mathbf`, which `\bold` stands for, is the kernel's and stays
unconditional).
Negative behaviour, measured rather than assumed:
* `\angle` and `\hbar` are the two commands here base LaTeX2e *does* define,
as composites amsfonts replaces. Without the package they keep the kernel
advance: `\hbox{$\angle$}` 6.37344pt against amssymb's 7.22223pt, and
`\hbox{$\hbar$}` 5.76172pt against 5.40280pt. The `\hbar` composite
reproduces exactly from its pieces (macron 5.00002 + `\mkern-9mu` -4.99988 +
math italic h 5.76158). Neither changes atom class.
* Everything else in the table is diagnosed, because pdflatex errors.
Which package loads which was measured, not assumed: every candidate compiled
with pdflatex and probed for `\nleq` (amssymb only), `\ulcorner` (also
amsfonts) and `\binom` (amsmath). `txfonts`, `pxfonts`, `newtxmath`,
`newpxmath`, `mathabx`, `kpfonts`, `MnSymbol` and `cool` really do load
amssymb; `amsart`/`amsbook`/`amsproc` load amsfonts but not amssymb;
`acmart`/`beamer` load both. `libertinust1math`, `fourier` and `siunitx`
define part of the inventory themselves without either AMS package and are
deliberately absent.
Tier 1 of #198's audit, each measured before and after against pdflatex:
* `\pmod` inline opens with amsmath's `\mkern8mu`, not the kernel's 18mu:
`$a\pmod{y}$` 50.82503pt -> 45.26960pt, matching `$a\mkern8mu(...)$`
exactly. Display is 18mu under both (`\@displaytrue` puts amsmath back on
50.82503), so display formulas are untouched.
* `\bmod` is 5mu on each side, not the 4mu of its Bin class, under every
package: `$a\bmod b$` 34.29970 against an ordinary `mod` at 28.74428, and
`$\bmod b$` 24.56947 against 23.45839 where the Bin degrades to Ord.
* Text-mode `\,`/`\!` take amsmath's `.1667em` when amsmath is loaded: 20sp
wider at 10pt, 24sp at 12pt. `\:`/`\;` are identical under both, and the
math-mode `\mskip` forms do not move.
The inventory now records which package each symbol needs, so
`supported-latex.json` and the Mac bundled copy say "needs amssymb" where they
used to claim an unconditional symbol.
Gates, `crates/compiler` `cargo test --release`: **457 passed, 0 failed**
against **448 passed, 0 failed** at the base (62200c0 + #198) in the same
worktree; the +9 are this change's tests. Through an uncommitted full vendor
swap into `crates/render-pipeline`, the amsmath corpus is 59/59 and the
amssymb corpus 38/39 (`32-braces-narrow`, 1.012 bp, fails at the base too) —
**byte-identical output files** to the same swap of the base, with zero font
diagnostics. Every real-world fixture compiles with no new diagnostic: they
all load their packages, including through the `\usepackage{amsmath,amssymb}`
comma form.
Stacked on #198, whose `MathPackages` this extends; the merge of that branch
is the first parent commit here.
Implementation-Agent: engine-engineer (Claude Opus 5), linux-primary worktree
Commit-Executor: engine-engineer direct Git (Cursor usage-limit fallback)
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
…th-package-gating # Conflicts: # docs/user/compiler.md
This was referenced Sep 14, 2026
GoKubar
added a commit
that referenced
this pull request
Sep 14, 2026
…rs all nine
Self-correction, and it reverses this lane's recommendation.
The first version of the README claimed aliasing the nine latexsym commands to
amssymb "changes the atom class of four of them", and recommended transcribing
eleven lasy10 advances as constants to avoid that. It also said \Join has no
amssymb equivalent at all. Both were wrong, and the error was reading
amssymb.sty without reading amsfonts.sty's compatibility block.
amsfonts.sty 151-162, guarded by
`\@ifpackageloaded{latexsym}{\@tempswafalse}{\@tempswatrue}`, provides all
nine itself when latexsym is not loaded -- and it keeps the kernel classes.
\lhd \unlhd \rhd \unrhd are re-declared \mathbin on the same AMSa slots the
\vartriangle* relations use, rather than \let to those relations, so the class
never changes. \Join is there too, at line 161, as a \mathrel composite of
AMSb "6F and "6E with \mkern-13.8mu.
Measured under \usepackage{amssymb} with no latexsym, every class is correct
and six of the nine are advance-exact: \mho, \leadsto, \lhd, \unlhd, \rhd and
\unrhd are all +0.00000 against lasy. Only three differ -- \Box +0.30556,
\Join +0.66690, \Diamond -1.25004.
So the recommendation becomes much cheaper and strictly more correct: provide
all nine through the amsfonts declarations gen_amssymb.py already parses,
gated on amssymb/amsfonts via #230's provider field. msam/msbm metrics are
already bundled and \mathbb already draws from msbm, so nothing new has to be
bundled, licensed or transcribed. The 1.11111 pt class error stays in the
README as the reason not to use the \vartriangle* names.
One exception the new table pins: with BOTH packages loaded, amsfonts leaves
latexsym's design alone for every name except \mho (lasy ht 6.83331 -> msbm
6.88889, advance unchanged), because amsfonts 101's \ams@DeclareMathSymbol is
`\global\let#1\undefined` then re-declare, an unconditional override sitting
outside the \if@tempswa guard. Load order does not change it.
measure.py grows a table for the nine under amssymb/amsfonts/both so every
number above is reproducible, and labels the old comparison as the naive alias
it is.
Implementation-Agent: Claude Opus 5 (engine-engineer, kernel math gap lane, linux-primary)
Commit-Executor: Claude Code direct Git
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
GoKubar
marked this pull request as ready for review
September 14, 2026 01:18
GoKubar
added a commit
that referenced
this pull request
Sep 14, 2026
vendor: re-pin compiler past #230, and switch package gating on
This was referenced Sep 14, 2026
GoKubar
pushed a commit
that referenced
this pull request
Sep 15, 2026
…ositions, new compiler lanes (#246) The board still said "main ad71b64" with FT-050..055 as the queue. It now carries the FT-060..067 outcomes, the two standing performance programs (FT-070 Kabir, FT-071 Mac), the dispositions agreed on issue #2 for the 53 open PRs (Kabir's 2026-09-14T00:10Z triage), the merge order #233 -> #241 -> #230 -> #231 -> #232, and the three unclaimed compiler lanes #242/#243/#244 that close the last real-world corpus errors. Historical rows are kept below. Implementation-Agent: Claude Code (mac-claude-a) Commit-Executor: git via Claude Code Claude-Session: https://claude.ai/code/session_01Y1nAv4pEnmMYXgteBoadHn Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 16, 2026
ItsAkilesh
pushed a commit
to ItsAkilesh/flashtex
that referenced
this pull request
Sep 18, 2026
…tex#769) Split out from PR flash-tex#247 (closed as superseded); the fix itself never landed when flash-tex#247 was superseded by flash-tex#230/flash-tex#529/flash-tex#530. main still carried \mod as an unconditional plain text atom, with a comment saying the gap was deliberate. - \mod is undefined in base LaTeX2e (amsmath.sty 910-911); gated the same way \sideset already is: `"mod" if !self.packages.amsmath => self.missing_package(...)`. - Under amsmath, \mod opens with \mkern12mu (inline; this compiler has no display flag, so the inline number is the one that applies, matching how \pmod already handles the same distinction), sets its argument as an ordinary (not Bin) upright "mod" via required_group + class_override, and puts 6mu before the argument. Two new constants, AMSMATH_MOD_OPENING_MU and AMSMATH_MOD_TRAILING_MU, mirror the existing AMSMATH_POD_MU/BMOD_EXTRA_MU pattern. Verified against TeX Live 2025 pdflatex at 10pt (see the code comment for the measured equivalences); added mod_needs_amsmath (mirrors sideset_needs_amsmath) and a width test mirroring the existing pmod/bmod style. cargo test --lib: 414 passed, 0 failed. Commit-Executor: daniel-muse-lead (Claude Sonnet)
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.
Compiler half of the package-gating lane. Sibling pipeline PR is independent. Stacked on #198, whose
MathPackagesthis extends; that branch is merged in as this branch's second parent, so the diff below contains #198's commit as well as this one. Review543bde5c.The problem
math::command_atomapplied the amssymb/amsfonts symbol table unconditionally. Nothing checked that the document wrote\usepackage{amssymb}, so\square,\nleq,\boxdotand the other 218 commands the table answers rendered happily in a document that loaded no package at all.I probed every one of them with
\ifcsnameunder TeX Live 2025 pdflatex, with an empty preamble and then underamssymb,amsfonts,latexsymandamsmath:So it was the whole table, not a few symbols: for 225 commands pdflatex answers
! Undefined control sequencewhere this compiler drew a glyph. No name in the table collides with a\not@basestub, andlatexsymprovides nothing this compiler supports, so the divergence is uniform.The gate
Each symbol now carries the file that declares it. That is generated, not hand-written:
gen_amssymb.pycollects declarations from both.styfiles before the dedup that used to hideamsfonts.sty141–147 re-declaring\square,\lozenge,\rightsquigarrow,\vartriangleright,\vartriangleleft,\trianglerighteqand\trianglelefteq. The regenerated table is byte-identical to the committed one apart from the new field (checked by stripping the field and diffing), so no oracle data moved.MathPackages(from #198) gainsamssymbandamsfontsbesideamsmath, and the fallback arm diagnoses the missing\usepackageinstead of rendering. The split the generator produces agrees with pdflatex on all 218 commands: 15 names + 7 pieces fromamsfonts.sty, the rest fromamssymb.sty.The same gate covers the commands that have their own arm rather than a table row —
\varnothing, the three dashed arrows,\mathbb/\mathfrakand the obsolete\Bbb/\bold.\mathbf, which\boldstands for, is the kernel's and stays unconditional.Which package provides what was measured, not assumed. Each candidate was compiled and probed for
\nleq(amssymb only),\ulcorner(also amsfonts) and\binom(amsmath):amssymb,txfonts,pxfonts,newtxmath,newpxmath,mathabx,kpfonts,MnSymbol,cool; classesacmart,beamer.amsfonts; classesamsart,amsbook,amsproc.libertinust1math,fourierandsiunitxdefine part of the inventory themselves without either AMS package (\nleqyes,\ulcorner/\yen/\mathfrak/\dashrightarrowno), so neither flag describes them.amsthm,amsopn,amsbsy,amscd,amstext,bm,unicode-math,stmaryrd,wasysym,esint,mathrsfs,eucal,euler,mathpazo,mathptmx,mathdesign,concmath,dsfont,bbm,bbold,cmll,physics,mathtoolsand 20 more measured as providing neither.The negative behaviour, measured
\angleand\hbarare the only two commands of this inventory that base LaTeX2e does define, as composites amsfonts replaces with one glyph. Without the package they now keep the kernel advance:\hbox{$\angle$}\hbox{$a\angle b$}\hbox{$\hbar$}\hbox{$a\hbar b$}The context rows move by exactly the width difference, so neither changes atom class. The
\hbarcomposite reproduces exactly from its pieces: OT1 macron 5.00002 +\mkern-9mu−4.99988 + math italich5.76158 = 5.76172. The kernel\angleis an\ialignof rules and is size-invariant — 6.37344pt in\scriptstyletoo, where amssymb's scales to 5.81946.Only the advance is forced; the nearest Latin Modern Math character stays the glyph either way, because the kernel
\angleis a rule drawing with no character to name. The compiler's own layout honourswidth_em; the render pipeline reads it only as the\varnothingsentinel flag, so through the full stack these two advances are not yet forced — a follow-up, called out below.Every other command in the table is diagnosed, because pdflatex errors. Recovery is the existing literal one, with the actionable half in the message:
\square requires \usepackage{amssymb}.Tier 1 of #198's audit
Measured before and after against TeX Live 2025 pdflatex at 10pt.
\pmodinline — kernel\mkern18mu, amsmath's\pod\if@display\mkern18mu\else\mkern8mu\fi:$a\pmod{y}$$a\mkern18mu(\mathrm{mod}\mkern6mu y)$$a\mkern8mu(\mathrm{mod}\mkern6mu y)$$\pmod{y}$Setting
\@displaytrueby hand puts amsmath back on 50.82503, confirming display is 18mu under both; we hardcoded 18mu, so only inline moves.\bmod— not a bare\mathbin:latex.ltx15703-15706 cancels\medmuskipand puts\mkern5muin its place, so it is 1mu wider on each side than its Bin class. Package-independent (identical under kernel, amsmath and amssymb):modcontrol$a\bmod b$$\bmod b$$\bmod$$a\mkern5mu\mathrm{mod}\mkern5mu b$is 34.29970 exactly. The 2mu rows are the Bin degrading to Ord with no left operand, which the compiler'sspacing_classesalready models and which the new kerns leave intact. Residual: the two\nonscripts drop the −4mu in script styles, where the Bin class contributes nothing either, so pdflatex keeps the full 5mu there and this keeps 1mu. That needs a style-aware kern, which no atom here carries; it is stated in the code.Text-mode
\,/\!— amsmath renews them to.1667emagainst the kernel's.16667em:\hbox{a\,b}\hbox{a\!b}24sp at 12pt.
\:/\;and their negatives are byte-identical under both, and the math-mode\mskipforms do not move ($a\,b$identical) — all asserted.\widehat/\widetildeare a newly measured fourth case, not in #198's audit: amsfonts changes them too, but only in height, and only over wide arguments —\widehat{abcdefg}ht 10.13890 → 10.56485,\widetilde{abcdefg}10.13890 → 11.31479, while every width and\widehat{abc}are identical. That is math-layout work, not a compiler arm; recorded here, not implemented.Gates
crates/compilercargo test --release94e3caa5, the same base merged with the samemain, same worktree)32-braces-narrow, 1.012 bp)Zero font diagnostics asserted on every render gate. The +9 tests are this change's.
No real-world fixture gains a
requires \usepackagediagnostic: they all load their packages, including through the\usepackage{amsmath,amssymb}comma form, which the parser splits and folds in per name.The render gates cannot see
crates/compiler(the pipeline depends onvendor/compiler, a pinned mirror), so they were measured through an uncommitted full vendor swap ofcrates/compiler/srcovervendor/compiler/src, against a control that swaps in the base's sources the same way. The swap is neutral: the control's numbers are identical to the committed pin's.Unblocks #212
#212 holds back six amsfonts symbols and says so explicitly: "
math::command_atomapplies the amssymb table unconditionally … these six would render as their msam/msbm glyphs even in a document that loads no package, where pdfLaTeX would give the kernel composite for\angle/\hbar/\rightleftharpoonsand an error for the other three. Fixing it needs the parser'spackageslist plumbed into the math layer."That is what this PR does, and it does it in the shape #212 needs:
\mho,\sqsubset,\sqsupsetenter the table asProvider::Amssymband are diagnosed without the package —! LaTeX Error: Command \sqsubset not provided in base LaTeX2e.is an error either way, so "diagnose, do not render" is right for them.\angleand\hbaralready have their kernel-composite arm here, gated onamsfonts; compiler: stop dropping six amsfonts symbols on a false premise #212 supplies the msam/msbm side, which is the branch this arm falls through to.\rightleftharpoonshas no row at all today, so compiler: stop dropping six amsfonts symbols on a false premise #212 adding one lands straight on the gated fallback.Two things #212 will need on rebase: its six names leave
SKIPingen_amssymb.py, which now also computesprovider(\angle,\hbar,\mho,\sqsubset,\sqsupsetand\rightleftharpoonsare all declared inamsfonts.sty, so they come outProvider::Amsfonts— correct, and matching the probe); andangle_and_hbar_keep_the_kernel_composite_without_amsfontsassertswidth_em == Noneon the loaded side, which becomes the ams row instead.What this does not do
\text,\binom,\boxed,\dfrac,\operatorname,\tag,\substack,\xrightarrow,\mod, … — are undefined in base LaTeX2e for exactly the same reason and are still applied unconditionally. They are a coherent follow-up lane of their own; gating them changes far more documents than gating symbols does, and the full measured list is in this PR's probe output.\modin particular is a different command from\bmodwith a different kern ($x\mod{y}$40.14336pt under amsmath) and is deliberately left exactly as it was.\angle/\hbaradvances reach the compiler's own layout but not the render pipeline, which readswidth_emonly as the\varnothingsentinel flag. Forcing them there needs two more sentinels on theVARNOTHING_SENTINELpattern (mathfont.rs,mathtex.rs,typeset.rs).Draft; not for merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu