# How to fix the error of align

Actually I am trying too much but I am not able to fix the error after running: Any help is appreciated:

\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}


• The above makes no error (if made into a test document), if you mean that you would like a different output it is best to say what output you would like Commented Mar 23, 2018 at 19:35
• Maybe, you want \intertext instead of \text. Commented Mar 23, 2018 at 19:39
• the error is Missing \begin{document}. but I put it at the first of article! Commented Mar 23, 2018 at 19:41
• If you get an error you need to post the test file that produces the error, and show the exact error that you get in a code section in the question. Commented Mar 23, 2018 at 20:48
• Error messages are important for debugging. If it is the first line, then a BOM could be causing this. Save the file as UTF-8 without BOM then. Commented Mar 23, 2018 at 21:49

your code works fine, but it seems that you looking for intertext as Heiko Oberdiek suggest in his comment:

\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}


however, i would write this equations as follows:

(red lines indicate text borders)

\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}

• Suspens, who gessed where the mysterious error is ? Commented Mar 23, 2018 at 19:53
• Actually after running I get error 88 Commented Mar 23, 2018 at 20:01
• not in my computer. this error not arise from code which you show in your question. please test both mine codes, if they compile without errors and warnings. Commented Mar 23, 2018 at 20:09

A variant, with the multlined environment from mathtools, and the optional spacing argument of \intertext (defined in nccmath), and some delimiters size improvements:

 \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}


• +1 for \intertext[o0.5ex]{...} defined in nccmath. i was'nt aware for it. similarly can be space reduced by use \shortintertext from mathtools Commented Mar 23, 2018 at 20:20
• I am using TEXworks, In the tab of errors I see"Errors: 1, Warnings: 0, Bad boxes: 0" Commented Mar 23, 2018 at 20:26
• @Zarko: Yes, I tried \shortintertext first, but found it too tight in this context (due to the many \sums ). Commented Mar 23, 2018 at 21:29
• @user118746: An error with this very code, and nothing more? Commented Mar 23, 2018 at 21:30