MathJax rendering

https://www.latexlive.com

You’ll need to swap out the default Markdown renderer (hexo-renderer-marked) for Latex rendering without workaround escape charactors such as \, _.

Setup

Some of the guide is from Hexo Next docs

First, uninstall the default Markdown renderer (hexo-renderer-marked)

1
npm un hexo-renderer-marked

Option 1: hexo-renderer-pandoc

pandoc need to be installed in your PATH.

1
npm un hexo-renderer-marked

Option 2: hexo-renderer-markdown-it

You could use markdown-it-katex with hexo-renderer-markdown-it as in the Hexo Next docs.

However, I recommend another plugin, markdown-it-latex2img[1], which does server-side rendering of math formulae, powered by https://math.now.sh/

MathJax rendering

See MathJax quick reference for syntax.

The delimiters $, $$ follow the pandoc rule.

Inline formulae

The left $ must be followed by a non white-space character. And the right $ must follow a non white-space character

  • Pythagoras theorem:
  • Sum of arithmetic sequence:
  • Fundamental theorem of calculus:
  • Binomial distribution:

Block formulae

Normaldistribution :

Fibonacci Sequence , the ratio of two consecutive numbers converges to golden ratio

Factorisation

Dirichlet function

Gauss’s law

Vandermonde matrix

System of linear equations

Physics

  • Newton’s first law:
  • Newton’s second law:
  • Newton’s third law:
  • Mass–energy equivalence:

Law of gravity:

Kirchhoff Laws

Second lawof thermodynamics

Chemistry

Ions and precipitation:

Ammonia synthesis

Equilibrium constant:

Biology

Photosynthesis


  1. https://github.com/MakerGYT/markdown-it-latex2img ↩︎