Marked: feature request : optional MathJax support

Created on 20 Feb 2016  路  8Comments  路  Source: markedjs/marked

Most helpful comment

would be nice to have it merged if no issues are found. (works fine for me so far)

All 8 comments

KaTeX is the future of math typesetting for the web.

KaTex vs. MathJax:
katex-comparison

I've submitted a pull request #723 to ignore everything between $ or $$ to allow the use of KaTeX or MathJaX without the user having to worry about using _ or * in TeX formulas

Thanks a lot for your work, and sorry for my late...
I've tested your code in vscode and found a bug:

bug

how to fix it? I know little about js.

Thanks for pointing out, I guess I should've made it a block-level grammar rule, I'll change the code and do so more extensive testing ...

I implemented this a while ago to use it with MathJax (I'll definitely have a glance at KaTeX since it looks promising). I use it regularly and I find it is quite stable.

https://github.com/chjj/marked/compare/master...Feder1co5oave:0341a2f

Basically you parse your markdown which includes $ ... $ (inline math) and $$ ... $$ (block level displaymath) tags, and then run MathJax.Process on the container you put your generated html code into.

would be nice to have it merged if no issues are found. (works fine for me so far)

Any updates?

Closing for now. Please see #956

See two targeted Markdown specifications.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

toc
zoe-cjf picture zoe-cjf  路  3Comments

mjbvz picture mjbvz  路  4Comments

FireflyAndStars picture FireflyAndStars  路  3Comments

bennycode picture bennycode  路  4Comments

gclove picture gclove  路  4Comments