slidev
slidev copied to clipboard
KaTeX rendering error
The katex inline math and display math failed to rendering expressions like ${{C}_0}$
, ${{C}^0}$
.
It is the curly braces around C causing this problem, although in the example the curly braces can be dropped but not in the actual slide code. A work around is to insert space such as ${{ C }_0}$
.
To Reproduce Steps to reproduce the behavior:
-
slidev
to initialize a slide - put
${{C}_0}$
in the md file - See the error in attached picture
Desktop (please complete the following information):
- OS: Kubuntu-22.04 LTS
- Browser: Firefox, Chromium
- Slidev version: v0.34.3
The issue comes from the fact that katex generates code that (also) contains the raw typed expression, so it contains {{
that is used for vue expressions.
To be sure, can you confirm that what works around the problem is to add a space between the two {
(I still get an error with the workaround mentioned in the issue description).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.