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
One possible approach: introduce new tokens for \( and \) (Token::MathOpen and Token::MathClose or something) and then once the text-mode parser encounters this, it calls parse_sequence() with Token::MathClose as the end token.
I think this can work because the text-mode parser is non-recursive with its state in a stack, so it can be easily suspended and resumed.
Activity
tmke8 commentedon Nov 26, 2025
One possible approach: introduce new tokens for
\(and\)(Token::MathOpenandToken::MathCloseor something) and then once the text-mode parser encounters this, it callsparse_sequence()withToken::MathCloseas the end token.I think this can work because the text-mode parser is non-recursive with its state in a stack, so it can be easily suspended and resumed.
[-]Consider supporting nested math mode: `\text{x\(_2\)}`[/-][+]Nested math mode: `\text{x\(_2\)}`[/+]