You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSharpMath does not track catcode-changing contexts, so it uses the ordinary document boundary where @ has default catcode 12.
Regression coverage
adjacent apostrophe, relation, and star punctuation
@ terminating a control word and \@ acting as a control symbol
control-word versus control-symbol whitespace
acceptance of reachable command keys and rejection of unreachable keys
parser atom types and exact serialization
Compatibility
Previously accepted custom command names containing @, such as \foo@bar, are now rejected as unreachable under the default tokenizer. Supporting package-style names would require explicit catcode-context support rather than an unconditional exception.
Clarification on @: it is not a CSharpMath custom extension, and the earlier Stack Overflow wording was only a quotation from that linked post, not the specification. Under the ordinary LaTeX document catcode regime, @ is a non-letter, so \@ is a one-character control symbol and \foo@bar ends the control word at \foo. Inside a \makeatletter context, LaTeX temporarily makes @ a letter, allowing package-style control words that contain it.
CSharpMath does not model mutable TeX catcodes or \makeatletter contexts. It therefore uses the ordinary document rule consistently: control words are backslash plus ASCII letters; control symbols are backslash plus one non-letter; delimiter whitespace is discarded only after a control word. Registrations that extend beyond that reachable token boundary are rejected.
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
Area/ParsingLaTeX tokenization, parsing, commands, and serialization.Type/BugA reproducible defect in CSharpMath.
2 participants
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.
Summary
@as a non-letter by default:\@is a one-character control symbol, and\foo@barends at\fooSpecification
\makeatletterand\makeatotherCSharpMath does not track catcode-changing contexts, so it uses the ordinary document boundary where
@has default catcode 12.Regression coverage
@terminating a control word and\@acting as a control symbolCompatibility
Previously accepted custom command names containing
@, such as\foo@bar, are now rejected as unreachable under the default tokenizer. Supporting package-style names would require explicit catcode-context support rather than an unconditional exception.Validation
git diff --checkpassedFixes #182