在 MathJax 中对齐多个方程

bmt*_*t24 11 mathjax

有没有办法使用 MathJax 对齐多个方程,使赤道彼此位于下方?

For example:
 2x - 4 = 6
     2x = 10
      x = 5
Run Code Online (Sandbox Code Playgroud)

Nae*_*mul 19

使用aligned环境和&符号。

例如

$$\begin{aligned} 2x - 4 &= 6 \\ 2x &= 10 \\ x &= 5 \end{aligned}$$
Run Code Online (Sandbox Code Playgroud)

&=每一行的前面插入,所以=所有行的水平位置都是相等的。

如果您不需要这样的水平对齐方式,那么您可以使用gatheredenvironment 代替aligned没有&.