Repository navigation
LaTeX reader: a script in brackets that close, x^(a+b), as one group - #35
Merged
Merged
Conversation
…^(a+b) as x^{(a+b)}
The port took the opening bracket alone as the script and closed it with an empty fence (x^{()a+b}). A script in
brackets that close is now grouped whole in EscapeOpenBrackets, as Word's LaTeX writes it and Word reads it
(x^(a+b), x_[i]y, e^(i\pi)_n), keeping the port as it is.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SyVio98rJkziNnwWW9T1Mn
simonebortolin
force-pushed
the
claude/latex-bracket-scripts
branch
from
November 11, 2026 00:18
e6a4ab3 to
7a7f406
Compare
|
Pre-release NuGet package of 7a7f406. Updated on every push, deleted when this PR is closed. |
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.
Stacked on #32: main ← #32 ← this
x^(a+b)was read asx^{()a+b}. The port took the opening bracket alone as the script and closed it with an empty fence. That reading is wrong for TeX and for Word alike, even though it read back the same.This follows Word's reading,
x^{(a+b)}, for two reasons:^(…)for a script in brackets, which would no longer read back with TeX's reading (x^{(}a+b)).The change is in the pre-pass
EscapeOpenBrackets, so the code ported line by line stays as it is. A bracket that is a script and does not close, as inx_(, is still escaped as in #32.x^(a+b)x^{()a+b}x^{(a+b)}x_[i]yx_{([)i]y}x_{[i]}ye^(i\pi)_ne_n^{()i\pi}e_n^{(i\pi)}x^ (a)(b)x^{(()a)(b)}x^{(a)}(b)4 new cases in
ReadsSlashesAndBarsAsLaTeX. 6958/6958 pass on net10.0 and net8.0.🤖 Generated with Claude Code
https://claude.ai/code/session_01SyVio98rJkziNnwWW9T1Mn