Solution to render math equations in Markdown

Step-by-step to render math equations in Markdown from $\rm\TeX$ source.

Procedure

To produce a post with lots of math formulas, I will take three steps:

Caveats

The rendering of math equations with MathJax is of high quality. However, $\rm\LaTeX$ contains too many syntax, and it’s really hard to translate it into the script supporting both the syntax of Jekyll and MathJax with no mistakes. To be accurate, some mistakes are made by Pandoc. Here, I will list several common problems I encountered and the associated remedies (maybe far from best):