🔵hexo数学公式

本文最后更新于:2023年7月28日 凌晨

更换文本渲染器

🍍卸载原渲染器

1
npm uninstall hexo-renderer-marked --save

🍍安装渲染器

1
npm install hexo-renderer-pandoc --save

🍍安装pandoc

Releases · jgm/pandoc (github.com)

开启公式

1
2
3
4
5
6
post:
math:
enable: true
specific: true
# 在文章开头标记`math: true`对需要公式渲染的文章按需渲染
engine: mathjax

部署

注意备份public下的静态文件

1
hexo clean

mathjax不可换行问题

可在align公式块中写公式实现换行效果(曲线救国)

1
2
3
4
5
6
$$
\begin{align}
&E = m c ^ 2\\
&F = m a
\end{align}
$$

\[ \begin{align} &E = m c ^ 2\\ &F = m a \end{align} \]


🔵hexo数学公式
https://qingshaner.com/hexo数学公式/
作者
清山
发布于
2022年3月3日
许可协议