/MathJax-Markdown

simple markdown preview with mathjax support

Primary LanguageHTML

Preview Markdown with MathJax support

** Inline Math Support using MathJax **

  • Put your math expression within $$...$$
  • eg $$$x_1 + 2$$$ will be render as $x_1 + 2$

Demo

** index_mathjax.html **
** index_katex.html **

Implementation.

  • I used ** marked ** to convert markdown code to html code.
  • I used MathJax or Katex for math expression rendering in * LaTex * style.
  • I used ** NodePDF(depends on PhantomJS) ** to compile rendered html to pdf file.

Usage

mathjax_markdown a.md a.html  # compile a.md to a.html
mathjax_markdown a.md a.pdf    # compile a.md to a.pdf

API

Please check mathjax_markdown.js

Style

css style is written in ** css_template/index.css **, feel free to modify it.

TODO

  • Add CSS support.
  • pdf hyperlink fix

ATTENTION

  • The pdf conversion doesn't work properly sometimes.
  • You can convert your markdown file to html file first, then use browser to print it as pdf.