-
-
Notifications
You must be signed in to change notification settings - Fork 83
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 engine support ($$ $$) #80
Comments
Thanks for the feedback. I think we are going to explicitly keep this gem bound to the Commonmark spec. However, please consider using https://github.com/gjtorikian/mathematical, which parses LaTeX symbols and converts them into math-rendered SVGs. You could tie this up with something like https://github.com/jch/html-pipeline to provide a full pass conversion. Alternative, you are free to create your own custom renderer as a plugin/add-on: https://github.com/gjtorikian/commonmarker#creating-a-custom-renderer I just want to keep this gem in particular specific to the spec. |
I'm not looking for a particular math engine.
A solution involving html-pipeline is bound to have quirky edge cases. Consider that: markdown inside
Yes, this is my question. How would I define a custom renderer for There is a lot of results for "math" on CommonMark Discourse: https://talk.commonmark.org/search?q=math Some of them mention extensions and no-markdown islands but I don't know if any of that was ever implemented. GitLab recently switch to CommonMark and they work around the issue by requiring math tags to be wrapped in backticks: Is the custom renderer API powerful enough to support this use case? |
As requested by my boss, I've patched a little to support part of LaTeX math equations (using directly |
Honestly that's really cool. You should ask the Commonmark folks to include this as an extension in the spec. |
Kramdown provides math engine support, via
$$
(block) and$
(inline).Implementing an engine is fairly simple. For example, here is my KaTeX implementation: https://github.com/gettalong/kramdown/blob/master/lib/kramdown/converter/math_engine/katex.rb
Is this possible with commonmarker and if so, how?
The text was updated successfully, but these errors were encountered: