-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Math formula support ? #49
Comments
I would love that too ;) Actually that is one of the features I want most, because I plan to use mdBook for my school notes. But the best place to implement this is in the markdown parser (pulldown-cmark). There is already a request there, but it's not very active. |
I added the MathJax JS files (from the CDN) you can already add math equations but sometimes it collides with the markdown rules, for example: |
Yea, I agree that it should be in the markdown parser. As a workaround you could sanitize the MD by replacing the math with random, non-repeating characters a-z and keeping a lookup table, then putting the math back into the generated HTML. Maybe there is an easier way? |
At the moment, it should work using: Blocks
Inline
You have to double-escape, because the markdown parser is going to remove one backslash. I have used this and I haven't had any problems. The dollar signs do not work well and would need support in the markdown parser. |
Great work with this project! I would love to see mathjax or katex integration. I use math formulas frequently and pandoc supports this. Here is a render from pandoc with mathjax integration
and the same thing in mdbook
I am using them in parallel for this reason right now.
The text was updated successfully, but these errors were encountered: