KaTex中的多行等式

Traceback (most recent call last): File "/2019/03/11/9c2ab4054ae2/" Error: no idea of using KaTex for math formula

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File " KaTex Support Table " Error: no idea of how to display multi-line equations

在写博客时要输入数学公式,发现想不起来\(\KaTeX\)(也即\(\LaTeX\))的语法了……

于是去查了语法,比如:

In:

1
2
$$\frac{1}{n-1}$$
$$\frac{v_1}{\theta^{3}}$$

Out:

\[\frac{1}{n-1}\]

\[\frac{v_1}{\theta^{3}}\]

然而遇到了一个多行公式(连等式),太长了实在避免不了分行,于是只能查一下怎么打多行公式。却发现\(\LaTeX\)支持的

1
2
3
4
5
\begin{equation*}%加*表示不对公式编号
\begin{split}
...
\end{split}
\end{equation*}

并不被\(\KaTeX\)支持,同时指向了Issue #445,打开发现其实可以用aligned代替:

1
2
3
4
\begin{aligned}
a&=b&c&=d\\
e&=f
\end{aligned}

输出为:

\[\begin{aligned} a&=b&c&=d\\ e&=f \end{aligned} \]

问题解决。EOF