Skip to content

Fix TeX parsing of unbraced numeric script arguments - #306

Merged
jgm merged 1 commit into
jgm:masterfrom
jdpipe:fix/unbraced-numeric-scripts
Nov 4, 2026
Merged

jgm merged 1 commit into
jgm:masterfrom
jdpipe:fix/unbraced-numeric-scripts

Conversation

@jdpipe

@jdpipe jdpipe commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Consume one token after ^ or _, so x^12 and x_12 mean x^{1}2 and x_{1}2. Preserve braced numbers, commands, and prime handling.

Add regression tests for numeric and decimal scripts, combined scripts, primes, and comments. Correct the summation fixture to use ^{100}.

(cherry picked from commit 1e4df7e)

Refer PR #304

Consume one token after ^ or _, so x^12 and x_12 mean x^{1}2
and x_{1}2. Preserve braced numbers, commands, and prime handling.

Add regression tests for numeric and decimal scripts, combined
scripts, primes, and comments. Correct the summation fixture to
use ^{100}.

(cherry picked from commit 1e4df7e)
@jgm
jgm merged commit 718beb8 into jgm:master Nov 4, 2026
6 checks passed
jdpipe added a commit to jdpipe/texmath that referenced this pull request Nov 5, 2026
Group annotated braces to preserve expression boundaries, supply labels
for bare braces, and retain scripts on the opposite side of a brace.
Supply missing operands for trailing signs and standalone operators in
fractions, and separate upright letters from following identifiers.

Reuse existing groups in roots, scripts, accents, and brace labels to
avoid redundant braces. Add regression coverage and update golden tests
for display and inline output.

Consolidates the StarMath changes from jgm#304 on current master; the TeX
numeric-script reader fix is already included upstream via jgm#306.
jgm pushed a commit that referenced this pull request Nov 6, 2026
Group annotated braces to preserve expression boundaries, supply labels
for bare braces, and retain scripts on the opposite side of a brace.
Supply missing operands for trailing signs and standalone operators in
fractions, and separate upright letters from following identifiers.

Reuse existing groups in roots, scripts, accents, and brace labels to
avoid redundant braces. Add regression coverage and update golden tests
for display and inline output.

Consolidates the StarMath changes from #304 on current master; the TeX
numeric-script reader fix is already included upstream via #306.
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