Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown parsing occurs before katex parsing and causes error #407

Open
PaulEcoffet opened this issue Sep 2, 2022 · 0 comments
Open

Markdown parsing occurs before katex parsing and causes error #407

PaulEcoffet opened this issue Sep 2, 2022 · 0 comments

Comments

@PaulEcoffet
Copy link

PaulEcoffet commented Sep 2, 2022

Hello, I want to use the markdown parsing with katex, and I noticed that for some formula involving underscores, the markdown parsing occurs before the katex transformation and alter the result.

I think it would be clearer with an example

Markdown:

$\sum_{j=0}^{M} \sum_{i=0}^{N} (\hat{k}_{i}^{j} - k_{i}^{j})$

output from ngx-markdown with katex activated:

$\sum_{j=0}^{M} \sum_{i=0}^{N} (\hat{k}<em>{i}^{j} - k</em>{i}^{j})$

Notice the <em> tags that appears. If I remove the curly braces which are optional in this context, the formula is rendered correctly. It seems that some underscores are considered as at the beginning or at the end of words and thus the markdown parser replace them with emphases.

Thank you for you help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant