Repository navigation
compiler: text accents \c \v \u \H \r \k \d \b compose their dfu characters (#243) (rebase of #304) - #392
Merged
Conversation
… no-op
`\(` and `\)` fell through the lexer's control-symbol branch and became the
literal words "(" and ")", so every LaTeX-style inline formula was typeset
as text: `\(x_t\)` printed "(x" with "math script marker used outside math
mode", `\(\alpha\)` reported \alpha as unsupported, and a 158-line notes
document written entirely with \( \) came back with 129 errors.
Lexer: `\(`/`\)` are `InlineMathOpen`/`InlineMathClose` beside the `\[`/`\]`
pair; the expansion converter, the math-mode "unexpected delimiter" arm, the
\text-argument literal table and siunitx's raw-text scan learn the two new
kinds. Parser: `paren_math` is `bracket_math` with display = false, so the
content, layout and recovery are exactly `$...$`'s (an unterminated `\(`
ends with its paragraph; a stray `\)` is reported and dropped).
`\allowdisplaybreaks[<0-4>]` (amsmath) only permits page breaks inside
displays; it is now a preamble no-op instead of an error, registered in
BUILT_INS, TEXT_COMMANDS and the vocabulary; inventory artifacts and the
bundled supported-latex.json regenerated (kernel command count +1).
Tests: tests/paren_inline_math.rs — same typeset items as `$`, inside a list
and through a \newcommand, the unterminated and stray cases. Compiler suite
473 passed / 0 failed. Through the render pipeline with this compiler
patched into the vendor mirror: the notes document 129 → 24 errors, 4 pages
like its pdflatex reference; the rest are \uline (ulem), \odot (kernel cmsy
slot not yet mapped), \maketitle without \author (#244) and \boxed's frame.
The render-pipeline vendor mirror is not touched here; re-pin it from main
(`git archive`, VENDORING.md) after this lands so the app and CLI pick it up.
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
…acters
GH#243. Every letter-named text accent reported "\X is not supported by
this compiler version"; only the control-symbol accents composed, and
those only in render-pipeline's adapter. The issue named \c and \v, but
\u \H \r \k \d \b failed the same way on main.
One parser arm reads the argument the way TeX does: a braced single
letter, \i, \j or nothing, or unbraced, the next letter only (so
`\v sice` accents the s). It emits one text inline, spanning the command
and its argument, holding the character tex-text-encoding's
UNICODE_DECLARATIONS (inverted *.dfu) declares for `\<accent> <base>`.
This is LaTeX's own table rather than a hand list. Two quirks of that
table are handled: U+01F0 is spelled `\v\j` without the space, and the
no-space spelling is tried only for control-sequence bases, since `\dh`
is eth, not `\d h`.
Recovery paths:
- no declared character (`\b{a}`, `\c{x}`): the bare letter plus a
warning. The \accent overlay is not drawn.
- `\k` in OT1: LaTeX's "unavailable in encoding" error, then the letter.
- a group that is not one letter: a warning, and the group is typeset.
Inventory regenerated: kernel coverage 163 -> 171 of 410. The Mac copy
of supported-latex.json is synced as the CI check requires.
Known, pre-existing, not changed here: the v1 Times layout does not kern
across inline boundaries, so `x\c{c}y` loses the x-c kern exactly as
`x\o{}y` already does. The tests compare each accent in isolation.
Implementation-Agent: daniel-vpclaude (Claude Code, Claude Pro plan)
Commit-Executor: daniel-vpclaude, direct git (Cursor-limit fallback)
Co-authored-by: d-q222 <[email protected]>
Claude-Session: https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ
No behaviour change. rustfmt cannot split the diagnostic format! strings, so the surrounding code lines are wrapped by hand. Crate-wide fmt --check and clippy -D warnings already fail on the base in files this lane does not touch (color.rs, expansion.rs, date.rs, ...); none of those findings are in the lines added here. Implementation-Agent: daniel-vpclaude (Claude Code, Claude Pro plan) Commit-Executor: daniel-vpclaude, direct git (Cursor-limit fallback) Co-authored-by: d-q222 <[email protected]> Claude-Session: https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ
Math-heavy documents often \renewcommand{\v}[1]{\mathbf{#1}} or
\def\b{...}. Making the accent letters host built-ins must not shadow
those definitions; this test pins that the user's macro is expanded, not the
caron.
Gate evidence (no commit): with this lane's parser.rs and text_builtins.rs
applied locally to render-pipeline/vendor/compiler and then reverted,
`flashtex check fixtures/real-world/unicode-accents/main.tex` went from
2 errors to 0 errors, 22 warnings (CJK/glyph coverage). In the v2 display
list, fa\c{c}ade and Ko\v{s}ice are 32.847 bp and 33.506 bp wide, the same
as the precomposed façade and Košice on the line above.
Implementation-Agent: daniel-vpclaude (Claude Code, Claude Pro plan)
Commit-Executor: daniel-vpclaude, direct git (Cursor-limit fallback)
Co-authored-by: d-q222 <[email protected]>
Claude-Session: https://claude.ai/code/session_012iWhnaQddU1UTMh6ZssGBJ
…rtefacts main (#343's batch) moved the generated inventory. All four conflicts were generated files: docs/user/compiler.md, crates/compiler/supported/ {supported-latex.json,coverage.md}, and the Mac bundled copy. Regenerated them with crates/compiler/scripts/render_supported_latex.sh and copied the Mac copy byte-for-byte (CompletionTests.testBundledInventoryMatchesTheCompiler). Counts: 253 text, 542 math, 48 environments, 14 packages. cargo test --no-fail-fast -p compiler: every binary ok except robustness::deeply_nested_input_does_not_blow_the_stack (debug-build stack overflow), which fails the same way on main 8f83ab5. Picked up after daniel-vpclaude's handoff. Commit-Executor: daniel-parent (Claude Code, mac-m5pro-dq222) Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
… the supported-LaTeX artefacts after #380 and sync the Mac copy Conflicts were generated files only; regenerated with render_supported_latex.sh and copied the Mac bundled inventory byte-for-byte. Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
) and \pagestyle family (#322) parser arms parser.rs conflict: #322 added the pagestyle/thispagestyle/pagenumbering arms where this branch (carrying #276's commit) added allowdisplaybreaks; kept both. Regenerated supported-LaTeX artefacts and synced the Mac copy. Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
…acters (#243) Rebase of #304 onto main after #317, #320, #322, #331 and #339 landed in the same generated artefacts. Four conflicts, all in generated output: `docs/user/compiler.md`, `crates/compiler/supported/supported-latex.json`, `crates/compiler/supported/coverage.md` and the bundled Mac copy. Resolved by regenerating with `crates/compiler/scripts/render_supported_latex.sh` followed by `apps/mac/scripts/sync-supported-latex.sh`, never by hand-merging. Every compiler source file merged without conflict; the `\allowdisplaybreaks` arm and #322's `\pagestyle`/`\thispagestyle`/ `\pagenumbering` arms are both present, verified after the merge. Verified on this branch: `cargo test --release --no-fail-fast` in crates/compiler, 0 failed; `apps/mac/scripts/sync-supported-latex.sh --check` green. Implementation-Agent: Claude Opus 5 (lane linux-integration, linux-primary) Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
Contributor
|
daniel-parent (carrying daniel-vpclaude's #304): confirmed. This branch is built on my merge commits, including |
…st with #390's uline/underline/sout, regenerate the artefacts Implementation-Agent: Claude Opus 5 (lane linux-integration, linux-primary) Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
GoKubar
added a commit
that referenced
this pull request
Sep 14, 2026
…st with #392's allowdisplaybreaks, regenerate the artefacts Implementation-Agent: Claude Opus 5 (lane linux-integration, linux-primary) Commit-Executor: Claude Opus 5 (direct git, observed Cursor usage limit)
This was referenced Sep 14, 2026
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.
Rebase of #304 onto main after #317, #320, #322, #331 and #339 landed in the same generated artefacts. #304 is closed in favour of this one.
Four conflicts, all in generated output:
docs/user/compiler.md,crates/compiler/supported/supported-latex.json,crates/compiler/supported/coverage.mdand the bundled Mac copy. Resolved by regenerating withcrates/compiler/scripts/render_supported_latex.shfollowed byapps/mac/scripts/sync-supported-latex.sh, never by hand-merging.Every compiler source file merged without conflict. I checked the one place that worried me — this branch's
\allowdisplaybreaksarm and #322's\pagestyle/\thispagestyle/\pagenumberingarms sit in the same preamble-or-body match group — and all four arms are present after the merge.Verified locally:
cargo test --release --no-fail-fastincrates/compiler, 0 failed;apps/mac/scripts/sync-supported-latex.sh --checkgreen.One note on file lists: GitHub showed #304 as touching a dozen Swift files under
apps/mac/, which is an artefact of the merge commits on that branch. The real merge-base diff (git diff origin/main...) has no Swift — the onlyapps/file is the generatedResources/supported-latex.jsonthat CI requires to stay byte-identical to the compiler's copy. That is also true of this PR.Original #304 description follows.
Text accents
\c \v \u \H \r \k \d \bcompose their decomposed-form-unified characters, plus\( ... \)as inline math and\allowdisplaybreaksas a preamble no-op. A document's own\v/\bdefinitions still win over the builtins.