Skip to content

compiler: \langle/\rangle are U+27E8/U+27E9 (#258 rank 13) - #339

Merged
GoKubar merged 1 commit into
mainfrom
agent/daniel-vpclaude/langle-codepoint
Sep 14, 2026
Merged

GoKubar merged 1 commit into
mainfrom
agent/daniel-vpclaude/langle-codepoint

Conversation

@d-q222

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

Copy link
Copy Markdown
Contributor

Closes #335 (#258 rank 13, probe fixtures/divergence-probes/min-langle). Claim GH-335, daniel-vpclaude (Claude Pro).

Cause: crates/compiler/src/math.rs mapped \langle/\rangle to U+2329/U+232A, the deprecated angle brackets, which NFC-normalise to CJK U+3008/U+3009. The pipeline's math-layout knows only the mathematical angle brackets U+27E8/U+27E9 (cm.rs symbol_slot/delimiter_slot, cmsy "68/"69), so it drew empty boxes: no math glyph for '〈'; empty box used.

A second bug had the same cause. symbol_class lists U+3008 and U+27E8 as Open, but not U+2329, so a bare \langle was spaced as Ord instead of \mathopen. The \left\langle path already used U+27E8.

Change:

  • math.rs: \langle/\rangle map to U+27E8/U+27E9 (fontmath.ltx \mathopen/\mathclose cmsy "68/"69), so they're now Open/Close.
  • Base-14 path: Adobe Symbol names these glyphs angleleft/angleright at U+2329/U+232A, so the compiler's own PDF path would otherwise lose them. Two small additions keep it working:
    • export.rs encodes U+27E8/U+27E9 as Symbol 0xE1/0xF1.
    • layout.rs shapes them as U+2329/U+232A in Symbol, next to the existing lunate-ε substitution.
  • Not touched: math-layout, so there's no conflict with math-layout: the twelve kernel math delimiters, their cmex growth chains, and why lasy should not be bundled #201.

Evidence:

  • Compiler diagnostics: $\langle x, y \rangle$ and \[ \left\langle a \right\rangle \] give 0 warnings on main and on this branch. Changing only the table would have produced 6 warnings (Times-Roman has no glyph for '⟨', will not survive PDF export); the export/layout aliases remove them.
  • Unit tests: math::tests::primes_mathrm_and_epsilons_follow_latex (symbols plus Open/Close class) and export::tests::mathematical_angle_brackets_encode_as_symbol_angles. Both fail without the fix.
  • Suite: full crates/compiler suite green (no FAILED; every test binary ok). Only my own hunks are rustfmt-clean; the files already had drift on main.
  • Inventory: regenerated for the \langle/\rangle glyph; Mac copy synced.

Integration: the pipeline effect, removing the empty boxes in min-langle and twelvept-plain, lands at the next vendor re-pin. It's reasoned from cm.rs mapping U+27E8 and not yet measured through flashtex-render.

🤖 Generated with Claude Code

https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ

The symbol table mapped them to the deprecated U+2329/U+232A, which
NFC-normalise to CJK U+3008/U+3009; math-layout knows only U+27E8/U+27E9
(cmsy "68/"69), so the pipeline drew empty boxes ("no math glyph for
'〈'"), and symbol_class did not list U+2329, so a bare \langle was spaced
as Ord. \left\langle already used U+27E8.

The base-14 path keeps its glyphs: Adobe Symbol names them angleleft and
angleright at U+2329/U+232A, so export encodes U+27E8/U+27E9 as Symbol
0xE1/0xF1 and layout shapes them through the same substitution as the
lunate epsilon.

Refs #335, #258 rank 13 (fixtures/divergence-probes/min-langle)

Implementation-Agent: daniel-vpclaude (Claude Code, Claude Pro)
Commit-Executor: daniel-vpclaude (direct git)
Co-authored-by: d-q222 <[email protected]>
Claude-Session: https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ
@d-q222

d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Integration note: #200 extends symbol_class's Open/Close line with ⟮/⎰ but leaves the \langle table row unchanged, so the two PRs don't overlap textually and don't conflict in meaning. — daniel-vpclaude

@GoKubar
GoKubar merged commit 8a02384 into main Sep 14, 2026
20 checks passed
@GoKubar
GoKubar deleted the agent/daniel-vpclaude/langle-codepoint branch September 14, 2026 14:43
GoKubar added a commit that referenced this pull request Sep 14, 2026
`main` advanced by 16 commits while the first re-pin was being measured, five
of them in `crates/compiler`, so `c1ae760d` was already stale. Re-exported at
`e44d5917`, which also carries #339 (`\langle`/`\rangle` as U+27E8/U+27E9
mathopen/mathclose -- the corpus's `twelvept-plain` fixture was reporting "no
math glyph for '<'" and drawing an empty box), #321 (`\pagestyle`,
`\thispagestyle`, `\pagenumbering` in the preamble), #244 (`\maketitle`
without `\author`), #314 (`\odot`/`\ominus`/`\oslash`/`\bigcirc` as binary
operators) and #331 (siunitx `S[...]`/`s` columns) on top of #380's natbib.

Byte-identity re-verified at the new SHA the same two ways: the vendored
tree's path/mode/blob-SHA listing matches `git ls-tree -r
e44d591:crates/compiler` on all 555 files, and `diff -r --exclude=PIN`
against a fresh re-extraction is empty.

The no-other-directory-needs-re-pinning finding was re-checked against the new
`main` rather than carried over: `math-layout`, `paragraph-layout`,
`microtype`, `document-style`, `font-resources`, `tex-text-encoding`,
`tex-boxes`, `tex-expansion` and `vector-graphics` are still byte-identical to
`main`'s crates, and `font-engine`/`pdf`/`project-files` still differ only by
their own rows' deliberate choices.

Gates re-run at this pin, same font environment:

  cargo test --release on crates/render-pipeline   254 passed, 0 failed, 2 ignored
  amsmath corpus                                   59/59 within 0.5 bp
  tabular corpus                                   106/106 (words 0.5 bp, rules 0.1 bp)
  HW1 render                                       3 pages, 0 errors
  HW2 render                                       3 pages, 0 errors

Zero font-failure diagnostics on either HW document; the only diagnostics
remain `math_resource_profile` (4 on HW1, 7 on HW2), which are informational.

PR #385 (hyperref/`\hypersetup` and url.sty URL breaking) is still OPEN and so
is still deliberately absent from this pin.

Implementation-Agent: Claude Opus 5 (lane nixos-vendor-repin, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-authored-by: GoKubar <[email protected]>
GoKubar added a commit that referenced this pull request Sep 14, 2026
… natbib (#386)

* render-pipeline: re-pin vendor/compiler to main so the corpus can see natbib

`crates/render-pipeline/vendor/*` are frozen `git archive` snapshots, so a
compiler-side change is invisible to `flashtex-render` -- and therefore to the
whole rendered corpus -- until the pin moves. `vendor/compiler` sat at
`f9bab2a7` (PR #267), one `crates/compiler` commit behind: PR #380
(`dd4a9809`, natbib citations and the `\bibitem[Author(Year)]` labels behind
them). #381 had already landed the render-pipeline half against the live
crate, so the corpus's `natbib-review` fixture was being measured against a
pipeline whose vendored compiler still could not parse `\citep`/`\citet`.

Re-exported from `main` at `c1ae760d`:

    git archive c1ae760:crates/compiler | tar -x -C vendor/compiler
    git rev-parse c1ae760 > vendor/compiler/PIN

Byte-identity verified two independent ways: a path/mode/blob-SHA listing of
the vendored tree matches `git ls-tree -r c1ae760:crates/compiler` on all 553
files, and `diff -r --exclude=PIN` against a fresh re-extraction is empty.

PR #385 (hyperref/`\hypersetup` and url.sty URL breaking -- the rebase of the
closed #379) was still OPEN when this pin was taken, so it is deliberately not
carried here: a vendor pin never holds an unmerged branch. It will arrive with
the next re-pin after it merges.

No other vendor directory needed re-pinning, and this was checked rather than
assumed. `crates/compiler`'s own path dependencies at `c1ae760d` are
`font-engine`, `tex-text-encoding`, `tex-boxes` and `tex-expansion`; a
recursive diff of every vendor directory against `main`'s crate of the same
name shows `math-layout`, `paragraph-layout`, `microtype`, `document-style`,
`font-resources`, `tex-text-encoding`, `tex-boxes` and `tex-expansion` already
byte-identical to `main`. `font-engine`, `pdf` and `project-files` do differ,
but each by its own VENDORING.md row's deliberate choice, and none of those
deltas is an API the new compiler needs -- the build and the full test run
below confirm it.

Also noted in the VENDORING.md row: that table's `compiler` and `math-layout`
cells still name `ea4ee5c8`, while the `PIN` files held `f9bab2a7` and
`9a82257b`. The table had drifted behind `PIN`; `PIN` is the authority. Only
the `compiler` row is corrected here, and by prepending -- the old log text is
kept intact.

Gates, all with `FLASHTEX_FONT_DIRS`/`FLASHTEX_TFM_DIRS` set to
`apps/mac/Fonts` and its lm + jknappen/ec + amsfonts/symbols TFM trees:

  cargo test --release on crates/render-pipeline   249 passed, 0 failed, 1 ignored
  amsmath corpus                                   59/59 within 0.5 bp
  tabular corpus                                   106/106 (words 0.5 bp, rules 0.1 bp)
  HW1 render                                       3 pages, 0 errors
  HW2 render                                       3 pages, 0 errors

Zero font-failure diagnostics on either HW document. The only diagnostics are
`math_resource_profile` (4 on HW1, 7 on HW2), which report that Latin Modern
Math supplies one 10 pt design for several optical sizes -- informational, not
a failure, and unchanged by this re-pin.

Implementation-Agent: Claude Opus 5 (lane nixos-vendor-repin, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-authored-by: GoKubar <[email protected]>

* render-pipeline: move the vendor/compiler pin forward to current main

`main` advanced by 16 commits while the first re-pin was being measured, five
of them in `crates/compiler`, so `c1ae760d` was already stale. Re-exported at
`e44d5917`, which also carries #339 (`\langle`/`\rangle` as U+27E8/U+27E9
mathopen/mathclose -- the corpus's `twelvept-plain` fixture was reporting "no
math glyph for '<'" and drawing an empty box), #321 (`\pagestyle`,
`\thispagestyle`, `\pagenumbering` in the preamble), #244 (`\maketitle`
without `\author`), #314 (`\odot`/`\ominus`/`\oslash`/`\bigcirc` as binary
operators) and #331 (siunitx `S[...]`/`s` columns) on top of #380's natbib.

Byte-identity re-verified at the new SHA the same two ways: the vendored
tree's path/mode/blob-SHA listing matches `git ls-tree -r
e44d591:crates/compiler` on all 555 files, and `diff -r --exclude=PIN`
against a fresh re-extraction is empty.

The no-other-directory-needs-re-pinning finding was re-checked against the new
`main` rather than carried over: `math-layout`, `paragraph-layout`,
`microtype`, `document-style`, `font-resources`, `tex-text-encoding`,
`tex-boxes`, `tex-expansion` and `vector-graphics` are still byte-identical to
`main`'s crates, and `font-engine`/`pdf`/`project-files` still differ only by
their own rows' deliberate choices.

Gates re-run at this pin, same font environment:

  cargo test --release on crates/render-pipeline   254 passed, 0 failed, 2 ignored
  amsmath corpus                                   59/59 within 0.5 bp
  tabular corpus                                   106/106 (words 0.5 bp, rules 0.1 bp)
  HW1 render                                       3 pages, 0 errors
  HW2 render                                       3 pages, 0 errors

Zero font-failure diagnostics on either HW document; the only diagnostics
remain `math_resource_profile` (4 on HW1, 7 on HW2), which are informational.

PR #385 (hyperref/`\hypersetup` and url.sty URL breaking) is still OPEN and so
is still deliberately absent from this pin.

Implementation-Agent: Claude Opus 5 (lane nixos-vendor-repin, linux-primary)
Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Co-authored-by: GoKubar <[email protected]>
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.

compiler: \langle/\rangle emit CJK U+3008/U+3009, so math-layout draws empty boxes (#258 rank 13)

2 participants