Katex: Math operators require braces when used in superscript/subscript

Created on 17 Jul 2020  路  3Comments  路  Source: KaTeX/KaTeX

On katex.org, enter T_\max

Resulting behavior:

KaTeX parse error: Got function 'max' with no arguments as subscript at position 3: T_滩m滩a滩x滩

Expected behavior: This should be identical to T_{\max}, which does work fine in KaTeX. The T_\max does work in LaTeX and MathJax: http://jbergknoff.github.io/mathjax-sandbox/#JFRfXG1heCQ%3D

Superscripts and subscripts should not require braces.

bug

Most helpful comment

This will be fixed by #2085 combined with #2134.

All 3 comments

@ylemkimon Will this be fixed by #2085?

This will be fixed by #2085 combined with #2134.

Actually, LaTeX adds the missing brace via error recovery:

Missing { inserted.
leading text: $x_\max

This feature is tracked by #428.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mbourne picture mbourne  路  3Comments

sophiebits picture sophiebits  路  3Comments

yawnoc picture yawnoc  路  3Comments

StaloneLab picture StaloneLab  路  3Comments

Joe312341 picture Joe312341  路  5Comments