Before reporting a bug
- [x] Check common issues.
- [ ] Check the bug is reproducible in the demo. If not, check KaTeX is up-to-date and installed correctly.
- [x] Search for existing issues.
Describe the bug:
There is rendering issue when using katex and latex modifiers
(La)TeX code:
The code of (La)TeX you tried to render:
${\displaystyle |\psi \rangle =\alpha |0\rangle +\beta |1\rangle }$
Expected behavior:
_from: latex.codecogs.com_
Screenshots:

le of displaystyle is rendered :man_facepalming:
Environment (please complete the following information):
showdown-katexshowdown-katex can render either KaTeX or AsciiMath. I can reproduce the faulty rendering on the showdown-katex demo page by submitting the input string to an AsciiMath field instead of to a KaTeX field.
The same imput string, when submitted to a latex field on the demo page, renders correctly.
I would speculate that your installation is set so that the $...$ delimiters are programmed to invoke AsciiMath instead of KaTeX.
The demo on katex.org renders the correct thing. This seems like an issue with showdown-katex and not katex itself.
So how do i fix it
the showdown-katex is using 0.10 version of katex
As @ronkok wrote above, the fix is likely to change the configuration in showdown-katex to use LaTeX mode instead of ASCII math mode. If it's not clear from the documentation, perhaps you should open an issue for showdown-katex. We know KaTeX but unfortunately not as much about showdown-katex.
@ronkok
{
displayMode: true,
throwOnError: false, // allows katex to fail silently
errorColor: '#ff0000',
delimiters: [
{ left: "$", right: "$", display: false }, // katex default
{ left: '~', right: '~', display: false, asciimath: true },
],
}
This is my configuration
@tbhaxor You need to raise this issue in a showdown-katex forum, not here. We don't know showdown-katex here and we can't tell if such a configuration is well formed or not.
If you get to the point where you have successfully invoked KaTeX and not AsciiMath, and then KaTeX is still acting improperly, then please come back and raise a new KaTeX issue here.
Most helpful comment
@tbhaxor You need to raise this issue in a
showdown-katexforum, not here. We don't knowshowdown-katexhere and we can't tell if such a configuration is well formed or not.If you get to the point where you have successfully invoked KaTeX and not AsciiMath, and then KaTeX is still acting improperly, then please come back and raise a new KaTeX issue here.