Hexo 展示数学公式 | hexo-renderer-mathjax
Feature
Installation
Use hexo-renderer-kramed
$ npm uninstall hexo-renderer-marked --save
$ npm install hexo-renderer-kramed --save
Insatll mathjax
$ npm uninstall hexo-math --save
$ npm install hexo-renderer-mathjax --save
Fix mathjax CDN
edit /node_modules/hexo-renderer-mathjax/mathjax.html
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
Fix escape bugs
edit /node_modules/kramed/lib/rules/inline.js
find escape
& em
regexp and change to
escape: /^\\([`*\[\]()# +\-.!_>])/,
em: /^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
Enjoy LaTeX
Demo
$$
\left\{
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\right\}
$$