Error with subscript or superscript
See original GitHub issueTyping \log_{10}\left(x\right) into the preview at katex.org results in the error
Invalid markup: Incorrect number of children for <msub/> tag.
Same with
\log^{10}\left(x\right)
I am using Firefox 63.0.3 on Windows. The error does not occur on Chrome or Edge.
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Superscript/Subscript Issue - Microsoft Community
I tried to open an older document in which the superscripts/subscripts looked "normal" and the older document opened with them looking as they ......
Read more >Known Typographical and Other Errors
All of the errors listed below except the last 11 and the errors in Table 10.2 ... Delete double-occurrence of "c-subscript-s-superscript-s-capital-psi" in ...
Read more >Superscript-subscript uncertainty notation
Superscript-subscript uncertainty notation · 2 · 1 · can this simply mean like +/- error where two values of error are possible like...
Read more >Microsoft Word: Using Subscript and Superscript - YouTube
Learn how to easily add subscripts and superscripts into your Microsoft Word documents. These are great for adding math equations into ...
Read more >HOW TO DO SUBSCRIPT IN WORD | Superscript text and ...
Learn how convert normal text into superscript and subscript text with ... to find the solution and developed a way to solve the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

With that instruction, I can reproduce the error. It seems to happen with
\log_5 xbut not\log x.Ah, I see the issue now.
<msub>is supposed to have only two children, but in this example, it has 3. This is caused byop’s MathML builder returning a document fragment: https://github.com/KaTeX/KaTeX/blob/f71f469d4b3ca97654702a0807e736d176f4c4c5/src/functions/op.js#L251-L263I think we need to modify
supsub’s MathML builder to wrap a fragment in anmrow, in this line: https://github.com/KaTeX/KaTeX/blob/f71f469d4b3ca97654702a0807e736d176f4c4c5/src/functions/supsub.js#L204Alternatively, we need to bring the
⁡outside of the subscript…The error shows up if you select CSS under filter output in the console. Is this an issue?