Latex是数学公式的必备工具。

根据Katex 文档,将常用的整理如下:

输入 结果
\times \div \% \& \dot x \(\times \div \% \& \dot x\)
\cdot \(\cdot\)
a’ \(a'\)
a’’ \(a''\)
\mathring{U} \(\mathring{U}\)
\bar{y} \(\bar{y}\)
\vec{F} \(\vec{F}\)
\overline{AB} \(\overline{AB}\)
\not = \(\not =\)
\approx \(\approx\)
\angle \(\angle\)
x_n \(x_n\)
e^x \(e^x\)
a \atop b \(a \atop b\)
\sqrt{\smash[b]{y}} \(\sqrt{\smash[b]{y}}\)
\sum \(\sum\)
\int \iint \(\int \iint\)
\pm \(\pm\)
\sqrt[3]{x} \(\sqrt[3]{x}\)
\frac{a}{b} \(\frac{a}{b}\)
{a \over b} \({a \over b}\)
\dfrac{a}{b} \(\dfrac{a}{b}\)
\binom{n}{k} \(\binom{n}{k}\)
\in \notin \(\in \notin\)
\subset \subseteq \(\subset \subseteq\)
\forall \land \lor \(\forall \land \lor\)
\because \(\because\)
\therefore \(\therefore\)
\exists \(\exists\)
\ge \geq \lt \gt \(\ge \geq \lt \gt\)
\leqslant \(\leqslant\)
\to \gets \(\to \gets\)
\partial \checkmark \clubsuit \spadesuit \heartsuit \diamondsuit \(\partial \checkmark \clubsuit \spadesuit \heartsuit \diamondsuit\)
Gamma \Delta \(\Gamma \Delta\)
\alpha \beta \gamma \delta \(\alpha \beta \gamma \delta\)
\Theta \(\Theta\)
\epsilon \zeta \eta \theta \(\epsilon \zeta \eta \theta\)
\Lambda \(\Lambda\)
\iota \kappa \lambda \mu \(\iota \kappa \lambda \mu\)
\Xi \Pi \(\Xi \Pi\)
\nu \xi \omicron \pi \(\nu \xi \omicron \pi\)
\Sigma \Upsilon \(\Sigma \Upsilon\)
\rho \sigma \tau \upsilon \(\rho \sigma \tau \upsilon\)
\Phi \Psi \Omega \(\Phi \Psi \Omega\)
\phi \chi \psi \omega \(\phi \chi \psi \omega\)
\infty \(\infty\)
\mathcal{AaBb123} \mathsf{AaBb123} \mathtt{AaBb123} \(\mathcal{AaBb123} \mathsf{AaBb123} \mathtt{AaBb123}\)
\overbrace{x+⋯+x}^{n\text{ times}} \(\overbrace{x+⋯+x}^{n\text{ times}}\)
\overrightarrow{AB} \(\overrightarrow{AB}\)
\displaystyle\sum_0^n \(\displaystyle\sum_0^n\)
P\left(A\middle\vert B\right) \(P\left(A\middle\vert B\right)\)

矩阵:

\begin{matrix}
   a & b \\
   c & d
\end{matrix}
\[\begin{matrix} a & b \\ c & d \end{matrix}\]

矩阵

\begin{vmatrix}
   a & b \\
   c & d
\end{vmatrix}
\[\begin{vmatrix} a & b \\ c & d \end{vmatrix}\]

算式

\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}
\[\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}\]

连续相加等式

x_1 + \dots + x_n
\[x_1 + \dots + x_n\]

连续相乘

x_1 x_2 \dotsm x_n
\[x_1 x_2 \dotsm x_n\]

求和

\sum_{1\le i\le n} x_{i}
\[\sum_{1\le i\le n} x_{i}\]