Katex: Double superscript at position 6: f^{*}'

Created on 27 Oct 2020  ยท  3Comments  ยท  Source: KaTeX/KaTeX

Describe and reproduce:

  1. Use this Latex: f^{*}'
  2. See error message:

KaTeX parse error: Double superscript at position 6: f^{*}'ฬฒ

Expected behavior:
Clear rendering since there is not double superscript.

Screenshots:

image

Environment (please complete the following information):

  • KaTeX Version: 0.12.0
  • Device: Desktop
  • OS: Windows 10
  • Browser: Chrome
  • Version: 86
bug

All 3 comments

In the meantime, this may solve it for you:

image

Thanks a lot. โค

In (La)TeX, ' is treated as a superscript. For technical reasons, f'^* works fine but f^*' generates the double subscript error. This is how it is in (La)TeX, so this is how it is in KaTeX. In other words, KaTeX is correctly reproducing (La)TeX behavior.

In addition to @mbourne's workaround, you can use f^{* \prime}. ' is equivalent to ^{\prime} which maybe helps explain why it's viewed as a superscript.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OisinMoran picture OisinMoran  ยท  4Comments

fabiospampinato picture fabiospampinato  ยท  4Comments

sophiebits picture sophiebits  ยท  3Comments

hagenw picture hagenw  ยท  3Comments

pvnr0082t picture pvnr0082t  ยท  4Comments