在Hexo博客中插入Mathjax公式的方式

插入数学公式

在Markdown中插入数学公式的语法是$数学公式$$$数学公式$$

行内公式是可以让公式在文中与文字或其他东西混编,不独占一行。

  • 示例
1
质能方程$E = mc^2$
  • 显示

质能方程$E = mc^2$

独立公式使公式单独占一行,不与文中其他文字等混编。

  • 示例
1
质能方程$$E = mc^2$$
  • 显示

质能方程$$E = mc^2$$

For inline formulas, enclose the formula in $...$. For displayed formulas, use $$...$$.
These render differently. For example, type
$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
to show $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$ (which is inline mode) or type
$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$
to show $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$

墨问非名 wechat
订阅我的公众号
听说,你想请我喝杯咖啡?☕️
0%