WORKAROUND 六月 04, 2020

技巧速记:如何在Hexo中插入多行公式

文章字数 1.2k 阅读约需 1 mins. 阅读次数 0

原创发表于 DavidZ Blog,遵循 CC 4.0 BY-NC-SA 版权协议,转载请附上原文出处链接及本声明。

Q

我在博客中写公式的时候使用双斜线\\来代表换行,效果是这样的,

$$
\begin{bmatrix}
cos\theta & sin\theta \
-sin\theta & cos\theta
\end{bmatrix}
$$

$$
\begin{bmatrix}
cos\theta & sin\theta \\
-sin\theta & cos\theta
\end{bmatrix}
$$

那么如何插入多行公式呢?

A

根据Multiple lines Mathjax formulas flattened to one line,应该插入 六个 斜线来表示换行,应该是由于Markdown的渲染机制导致\\被反义。

$$
\begin{bmatrix}
cos\theta & sin\theta \\\
-sin\theta & cos\theta
\end{bmatrix}
$$

$$
\begin{bmatrix}
cos\theta & sin\theta \\\\\\
-sin\theta & cos\theta
\end{bmatrix}
$$
0%