![多行方程的垂直对齐](https://linux22.com/image/297732/%E5%A4%9A%E8%A1%8C%E6%96%B9%E7%A8%8B%E7%9A%84%E5%9E%82%E7%9B%B4%E5%AF%B9%E9%BD%90.png)
我尝试过很多方法来垂直对齐这些方程式,但都没有成功。
\documentclass[11pt,a4paper,oneside]{report}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}
\usepackage{mathtools}
\usepackage{amsthm}
\begin{document}
first attempt
\begin{equation}
\begin{aligned}
&-\omega\cdot \alpha_{1}=\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3}
\\
&-\omega\cdot \alpha_{2}=\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}
\\
&-\omega\cdot \alpha_{3}=\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}
\\
&-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}
\\
&-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}
\end{aligned}
\end{equation}
second attempt
\begin{alignat*}{3}
&-\omega\cdot \alpha_{1}=&&\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3} \\
&-\omega\cdot \alpha_{2}=&&\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3} \\
& -\theta\cdot \alpha_{3}=&&\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3} \\
&-\theta\cdot \alpha_{1}=&&\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+&&\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}
\end{alignat*}
third attempt
\begin{equation}
\begin{split}
&-\omega\cdot \alpha_{1}=\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3}
\\
&-\omega\cdot \alpha_{2}=\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}
\\
&-\omega\cdot \alpha_{3}=\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}
\\
&-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}
\\
&-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}
\end{split}
\end{equation}
\end{document}
生产
第一次尝试仅对齐前三行,而不对齐最后两行(它们彼此对齐,但不与其余行对齐),而第二次尝试几乎修复了除第三列和第四列之外的所有内容,但我没有在中间获得编号。最后一个似乎与第一个类似。有人能帮我吗?谢谢。
答案1
您必须先决定,是要一个方程,因此只有一个数字,还是要多个方程和多个数字(有关此选择,请参阅文章末尾的注释)。第一次使用时,\begin{equation}
使用\end{equation}
环境ed
(如aligned
、gathered
)。由于您有多个对齐点,因此应该使用环境alignedat
。
这里是 MWE(包括序言):
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{alignedat}{8}
&-\omega &&\cdot \alpha_{1} &&= \bigl|B_{1}A_{2}A_{3}\bigr| &&\cdot \alpha_{1} &&+ \bigl|A_{1}B_{1}A_{3}\bigr| &&\cdot \alpha_{2} &&+ \bigl|A_{1}A_{2}B_{1}\bigr| &&\cdot \alpha_{3} \\
&-\omega &&\cdot \alpha_{2} &&= \bigl|B_{2}A_{2}A_{3}\bigr| &&\cdot \alpha_{1} &&+ \bigl|A_{1}B_{2}A_{3}\bigr| &&\cdot \alpha_{2} &&+ \bigl|A_{1}A_{2}B_{2}\bigr| &&\cdot \alpha_{3} \\
&-\theta &&\cdot \alpha_{3} &&= \bigl|B_{3}A_{2}A_{3}\bigr| &&\cdot \alpha_{1} &&+ \bigl|A_{1}B_{2}A_{3}\bigr| &&\cdot \alpha_{2} &&+ \bigl|A_{1}A_{2}B_{2}\bigr| &&\cdot \alpha_{3} \\
&-\theta &&\cdot \alpha_{1} &&= \bigl|A_{1}B_{2}B_{3}\bigr| &&\cdot \alpha_{1} &&+ \bigl|B_{1}A_{1}B_{3}\bigr| &&\cdot \alpha_{2} &&+ \bigl|B_{1}B_{2}A_{1}\bigr| &&\cdot \alpha_{3}
\end{alignedat}
\end{equation}
\end{document}
评论:
对于多个方程:\begin{equation}
用替换\begin{alignat}{8}
,\end{equation}
用 替换\end{alignat}
,并删除\begin{alignedat}{8}
和\end{alignedat}
。