Repository navigation
LaTeX reader: space commands, \ outside environments, \middle beside empty sides - #18
Merged
Merged
Conversation
…ide empty sides
- \hspace, \hskip, \kern, \mkern, \mskip and \mspace read with their length in any form (1em, {10ex}, -1.5pt,
1em plus 1fil) as the UnicodeMath space nearest to it; \thinspace, \negthinspace, \negmedspace, \negthickspace,
\nobreakspace and \space as the spaces they are
- \ outside an environment, a line break an equation does not keep, left out
- two bars with only zero spaces between them (|\!|) are no pair, which UnicodeMath would read as a double bar;
the writer parts a bar alone from the next bar with \!
- \middle with an empty side holds the placeholder there (├{⬚│⬚┤})
- the UnicodeMath grammar takes a no-break space after a bracket ((a)~b), reserved only before a diacritic
- latex2mathml cases spaces and middle read; the corpus test compares the separator │ as |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The \Box that both sides renamed kept once, and the ids of NotInWordLaTeX that main listed but that read now with the reader of b6eeafc (\tt, \Bbb, \mathop, the arrows of mathtools) taken out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonebortolin
changed the base branch from
main
to
claude/latex-unknown-command-space-42f4d4
November 9, 2026 18:45
|
|
simonebortolin
changed the base branch from
claude/latex-unknown-command-space-42f4d4
to
main
November 9, 2026 19:07
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.
Reads the latex2mathml cases
spacesandmiddle, which leaveNotReadYet.Spaces
\hspace,\hskip,\kern,\mkern,\mskip,\mspacetake their length in any form (1em,{10ex},-1.5pt,10mu,1em plus 1fil) and become the UnicodeMath space nearest to it (\,\:\;\enspace\quad\qquad). A negative length becomes\!, and a length that is not a number with a unit becomes\quad.\thinspace,\negthinspace,\negmedspace,\negthickspace,\nobreakspaceand\spaceread as the spaces they stand for.\outside an environment is a line break, which an equation does not keep, so it is left out.a\bnow reads asab; it used to be rejected.Bars
|\!|) as one double bar, soEscapeOddBarsno longer pairs them. A plain||keeps its old reading.|\!, so LaTeX → MathML → LaTeX → MathML gives the same MathML.(a)~band|a|~|b|were rejected as invalid UnicodeMath.\middle\middle|,\|or/gets the placeholder ⬚ (├{⬚│⬚┤}). The writer writes it as{}, so the result reads back unchanged:\{{}|{}\}.Canonicalnow compares UnicodeMath's separator│as|, which is how latex2mathml writes it.Merge with main
\Boxwas renamed on both sides; it is kept once.NotInWordLaTeXnow pass, because main wrote that list without the reader changes ofb6eeafc:tt,blackboard-bold,mathop,issue-125-4-mathopand the three mathtools arrows. They are taken out of the list.No snapshot was corrected.
VersionPrefixis unchanged. The full suite passes on net10.0 and net481 (5542 tests).🤖 Generated with Claude Code