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

Conflicts With MathJax #510

Closed
estoquodaudes opened this issue Jun 13, 2017 · 4 comments
Closed

Conflicts With MathJax #510

estoquodaudes opened this issue Jun 13, 2017 · 4 comments

Comments

@estoquodaudes
Copy link

If I want to include some math formulas in LaTex, I can't avoid using "_".
And sometimes Parsedown will translate them into " ",which stops MathJax from interpreting

@aidantwoods
Copy link
Collaborator

Could you post an example?

@cebe
Copy link
Contributor

cebe commented Jun 13, 2017

you'd need to extend Parsedown to handle formulas included in $ in a special way, i.e. not interpret the content as markdown. That means adding $ as an inline element. Normal markdown does not treat $ as a special character so that should be done in an extension imo.

@aidantwoods
Copy link
Collaborator

aidantwoods commented Jun 13, 2017

If you like, you can grab https://github.com/aidantwoods/parsedown/blob/mathjaxlatex/ParsedownExtensionMathJaxLaTeX.php

Which overloads a single ` to be inline math, and adds special handling for the language latex when used in fenced code. You might want to make some changes to those markers to suit you though.

(I give a bit more detail than that in #457)


I'm a little intrigued as to the cases where Parsedown is turning _ into spaces (as reported) though, smells like a bug if that is the case.

@aidantwoods
Copy link
Collaborator

As mentioned this would be best handled by an extension, also see #554

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

3 participants