参考:LaTeX 公式篇
推荐网站:LaTeX公式编辑器,有模板
- 换行(居中对齐)
1 w e r 2 q w e r 3 q e w r a s d f \begin{array}{c} 1wer\\ 2qwer\\ 3qewrasdf\\ \end{array} 1wer2qwer3qewrasdf\begin{array}{c} 1wer\\ 2qwer\\ 3qewrasdf\\ \end{array}
- 换行(居左对齐)
\begin{aligned} &123423412341 \\ &2we \\ &3d \\ \end{aligned}
123423412341 2 w e 3 d \begin{aligned} &123423412341 \\ &2we \\ &3d \\ \end{aligned} 1234234123412we3d
-
公式拆分
$$ \begin{split} 1+2+3 &= 3+3 \\ &=6 \end{split} $$
1 + 2 + 3 = 3 + 3 = 6 \begin{split} 1+2+3 &= 3+3 \\ &=6 \end{split} 1+2+3=3+3=6
-
公式组合
$$ f(x) = \begin{cases} 1, & x=1 \\ 2, & x=2 \\ 3, & x \geqslant 3 \\ \end{cases} $$
f ( x ) = { 1 , x = 1 2 , x = 2 3 , x ⩾ 3 f(x) = \begin{cases} 1, & x=1 \\ 2, & x=2 \\ 3, & x \geqslant 3 \\ \end{cases} f(x)=⎩ ⎨ ⎧1,2,3,x=1x=2x⩾3
-
手动编号
$$ f(x) = a - b \tag{1.1} $$
f ( x ) = a − b (1.1) f(x) = a - b \tag{1.1} f(x)=a−b(1.1)
-
上下括号
$\overbrace{1+2+\cdots+n}^{n个}$ $\underbrace{a+b+\cdots+z}_{26}$
1 + 2 + ⋯ + n ⏞ n 个 \overbrace{1+2+\cdots+n}^{n个} 1+2+⋯+n n个
a + b + ⋯ + z ⏟ 26 \underbrace{a+b+\cdots+z}_{26} 26 a+b+⋯+z -
向量
$$ \vec{a} $$
a ⃗ \vec{a} a
-
求导
$x'$
x ′ x' x′
-
矩阵
$$ \begin{bmatrix} 1 & 2 & \cdots \\ 67 & 95 & \cdots \\ \vdots & \vdots & \ddots \\ \end{bmatrix} $$
[ 1 2 ⋯ 67 95 ⋯ ⋮ ⋮ ⋱ ] \begin{bmatrix} 1 & 2 & \cdots \\ 67 & 95 & \cdots \\ \vdots & \vdots & \ddots \\ \end{bmatrix} 167⋮295⋮⋯⋯⋱
公式推导过程
\begin{flalign}
a &= b &\\
&= c+m\\
&= d+1
\end{flalign}
取整
$\lfloor x \rfloor$
$\lceil x \rceil$
⌈
x
⌉
\lceil x \rceil
⌈x⌉
⌊
x
⌋
\lfloor x \rfloor
⌊x⌋