如何修复对齐错误

如何修复对齐错误

实际上我尝试太多了,但运行后无法修复错误:如能提供任何帮助,我们将不胜感激:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}  
    (f_{xy},f_{yz}) _{[w]}&=[f_{xy},z] - [x, f_{yz}]\\
                                         &=[[x,y]- \sum \alpha_{xy}^v v ,z ] - [x ,[y,z] -\sum\alpha_{yz}^v v ]\\
                                         &=[[x,y,z]]- \sum \alpha_{xy}^v [v,z] - [x,[y,z]] + \sum \alpha_{yz}^v [x,v]\\
\text{Using Jacobi's identity this equals}
                                         &=[[x,z],y] - \sum\alpha_{xy}^v ([v,z] - \sum \alpha_{vz}^u u)\\
                                         &+ \sum \alpha_{yz}^v ( [x,v] - \sum \alpha_{xv}^u u ) - \sum \alpha_{xy}^v \alpha_{vz}^u u + \sum     \alpha_{yz}^v \alpha_{xv}^u u\\
                                        &= [[x,z] - \sum \alpha_{xz}^v v , y ] + \sum \alpha_{xz}^v ([v,y] - \sum \alpha_{vy}^u u)\\
                                        &-\sum \alpha_{xy}^v f_{vz} + \sum \alpha_{yz}^v f_{xv}\\
                                        & -\sum_{u} (\sum \alpha_{xy}^v \alpha_{vz}^u + \sum \alpha_{yz}^v \alpha_{vx}^u + \sum \alpha_{zx}^v \alpha_{vy}^u) u
\end{align*} 
\end{document}

enter image description here

答案1

您的代码运行良好,但您似乎正在intertext寻找海科·奥伯迪克在他的评论中建议:

enter image description here

\documentclass{article}
\usepackage{amsmath}

\begin{document}
    \begin{align*}
(f_{xy},f_{yz}) _{[w]}&=[f_{xy},z] - [x, f_{yz}]\\
         &=[[x,y]- \sum \alpha_{xy}^v v ,z ] - [x ,[y,z] -\sum\alpha_{yz}^v v ]\\
         &=[[x,y,z]]- \sum \alpha_{xy}^v [v,z] - [x,[y,z]] + \sum \alpha_{yz}^v [x,v]
\intertext{Using Jacobi's identity this equals:}
    &=[[x,z],y] - \sum\alpha_{xy}^v ([v,z] - \sum \alpha_{vz}^u u)\\
    &+ \sum \alpha_{yz}^v ( [x,v] - \sum \alpha_{xv}^u u ) - \sum \alpha_{xy}^v \alpha_{vz}^u u + \sum     \alpha_{yz}^v \alpha_{xv}^u u\\
    &= [[x,z] - \sum \alpha_{xz}^v v , y ] + \sum \alpha_{xz}^v ([v,y] - \sum \alpha_{vy}^u u)\\
    &-\sum \alpha_{xy}^v f_{vz} + \sum \alpha_{yz}^v f_{xv}\\
    & -\sum_{u} (\sum \alpha_{xy}^v \alpha_{vz}^u + \sum \alpha_{yz}^v \alpha_{vx}^u + \sum \alpha_{zx}^v \alpha_{vy}^u) u
    \end{align*}
\end{document}

然而,我会把这个方程写如下:

enter image description here

(红线表示文本边框)

\documentclass{article}
\usepackage{mathtools} % <--- instead of `amsmath`, it define `multlined` environment

\begin{document}
    \begin{align*}
(f_{xy},f_{yz}) _{[w]}&=[f_{xy},z] - [x, f_{yz}]\\
     & = \Bigl[[x,y]- \sum \alpha_{xy}^v v ,z \Bigr]
        - \Bigl[x ,[y,z] -\sum\alpha_{yz}^v v \Bigr]\\
     & = [x,y,z] - \sum \alpha_{xy}^v [v,z] - \bigl[x,[y,z]\bigr] + \sum \alpha_{yz}^v [x,v]
\intertext{Using Jacobi's identity this equals:}
(f_{xy},f_{yz})_{[w]}
    & = \begin{multlined}[t][0.7\linewidth]
        \bigl[[x,z],y\bigr] - \sum\alpha_{xy}^v \Bigl([v,z] - \sum \alpha_{vz}^u u\Bigr)\\
        + \sum \alpha_{yz}^v 
        \Bigl( [x,v] - \sum \alpha_{xv}^u u \Bigr) - \sum \alpha_{xy}^v \alpha_{vz}^u u + \sum     \alpha_{yz}^v \alpha_{xv}^u u
        \end{multlined}    \\
    & = \begin{multlined}[t][0.7\linewidth]
        \Bigl[[x,z] - \sum \alpha_{xz}^v v , y \Bigr] \\
            + \sum \alpha_{xz}^v \left([v,y] - \sum \alpha_{vy}^u u\right) %\\
        -\sum \alpha_{xy}^v f_{vz} + \sum \alpha_{yz}^v f_{xv}  \\
        -\sum_{u} \Bigl(\sum \alpha_{xy}^v \alpha_{vz}^u + \sum \alpha_{yz}^v \alpha_{vx}^u + \sum \alpha_{zx}^v \alpha_{vy}^u\Bigr) u
        \end{multlined}     
    \end{align*}
\end{document}

答案2

一种变体,具有multlined来自的环境mathtools和可选的间距参数\intertext(在中定义nccmath),以及一些分隔符大小改进:

 \documentclass{article}
\usepackage{mathtools, nccmath}

\begin{document}

    \begin{align*}
(f_{xy},f_{yz}) _{[w]}&=[f_{xy},z] - [x, f_{yz}]\\
         &=\bigl[[x,y]- \sum \alpha_{xy}^v v ,z \bigr] - \bigl[x ,[y,z] -\sum\alpha_{yz}^v v \bigr]\\
         &=\bigl[[x,y,z]\bigr]- \sum \alpha_{xy}^v [v,z] - \bigl[x,[y,z]\bigr] + \sum \alpha_{yz}^v [x,v]
\intertext[0.5ex]{Using Jacobi's identity this equals:}
 &=\begin{multlined}[t]{}
 \bigl[[x,z],y\bigr] - \sum\alpha_{xy}^v ([v,z] - \sum \alpha_{vz}^u u)\\
 + \sum \alpha_{yz}^v\bigl( [x,v] - \sum \alpha_{xv}^u u \bigr) - \sum \alpha_{xy}^v \alpha_{vz}^u u + \sum \alpha_{yz}^v \alpha_{xv}^u u
 \end{multlined}\\
 &= \begin{multlined}[t]{}%
 \bigl[[x,z] - \sum \alpha_{xz}^v v , y \bigr] + \sum \alpha_{xz}^v \bigl([v,y] - \sum \alpha_{vy}^u u\bigr)\\
 -\sum \alpha_{xy}^v f_{vz} + \sum \alpha_{yz}^v f_{xv}\\
 -\sum_{u} \Bigl(\sum \alpha_{xy}^v \alpha_{vz}^u + \sum \alpha_{yz}^v \alpha_{vx}^u + \sum \alpha_{zx}^v \alpha_{vy}^u\Bigr) u
 \end{multlined}
    \end{align*}

\end{document} 

enter image description here

相关内容