Repository navigation
Fix TeX parsing of unbraced numeric script arguments - #306
Merged
Merged
Conversation
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)
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.
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.
Consume one token after
^or_, sox^12andx_12meanx^{1}2andx_{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