# LaTex之方程组和等式对齐

2021年1月9日 / 11次阅读
MathJax

\begin{cases}
3x + 5y + z \\
7x - 2y + 4z \\
-6x + 3y + 2z
\tag{1} \end{cases}

\begin{cases}
3x + 5y + z \\
7x - 2y + 4z \\
-6x + 3y + 2z
\tag{1} \end{cases}

1, & \text{if } z > 0 \\
0, & \text{if } z \le 0 \tag{2} \end{cases} $$ 效果如下：$$ \sigma'(z) = \begin{cases}
1, & \text{if } z > 0 \\
0, & \text{if } z \le 0 \tag{2} \end{cases} 

& 符号用来确定多行表达式对齐的位置，对齐位置就是 & 符号的下一个位置。

\text{...} 就是文本，中间可以有空格。

\begin{align}
f(x)&=(m+n)^{2}\\
&=m^{2}+2mn+n^{2}\\
\tag{3} \end{align}

\begin{align}
f(x)&=(m+n)^{2}\\
&=m^{2}+2mn+n^{2}\\
\tag{3} \end{align}

\begin{array}{ll}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{4} \end{array}

\begin{array}{ll}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{4} \end{array}

\begin{array}{rl}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{5} \end{array}

\begin{array}{rl}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{5} \end{array}

\begin{array}{lr}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{6} \end{array}

\begin{array}{lr}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{6} \end{array}

\begin{array}{rr}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{7} \end{array}

\begin{array}{rr}
z &=&a\\
f(x,y,z)&=&x+y+z
\tag{7} \end{array}

Ctrl+D 收藏本页