# How to properly align a set of very long equations [duplicate]

I do have a term and would like to show several steps of a derivation, just like here:

\documentclass{IEEEtran}
\usepackage{amsmath}
\begin{document}
\begin{align}
thisIsATerm \\
&= \framebox[\columnwidth]{long equation 1}\\
&= \framebox[\columnwidth]{long equation 2}
\end{align}
\end{document}


Here, the equations 1 and 2 are filling up a single (double-column) line. which looks like:

How to I get something that looks better? Maybe something like this (please suggest something more beautiful or how you would do it):

There are several posts on this site. But here is your very example with use of the align environment:

% arara: pdflatex

\documentclass{IEEEtran}
\usepackage{amsmath}

\begin{document}
\begin{align}
\textit{thisIsATerm} &= a +b\notag\\
&= x\cdot y +\sum_{1}^{3}z\notag\\
\end{align}
\end{document}


If you want to get exactly the picture you are showing, you should replace the \qquad by \quad. I don't like that so much, but it will indent exactly (? at least I believe that...) the space of an =-sign.

\begin{align}
\textit{thisIsATerm} &= a +b\notag\\
&= x\cdot y +\sum_{1}^{3}z\notag\\
\end{align}


If you want to use the (shown first) indented approach but would like to align other operators as well, you can go the \phantom-way.

\begin{align}
\textit{thisIsATerm} &= a +b\notag\\
&\hphantom{{}= a} +c+d\\
&= x\cdot y +\sum_{1}^{3}z\notag\\
&\hphantom{{}= x\cdot y} -\sinh x
\end{align}


I set the number on the right always aligned to the second row (as you are showing in your image). If you would like to get this centred, you will have to wrap two lines in a split-environment and get rid of the \notags.

Have a look at the align and multline environment. I suggest always using the amsmath package.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\section{The \texttt{multline} Environment}
\textbf{Watch Out:} \texttt{multline} without an \texttt{i}
in \texttt{multi}.

\begin{multline}
\alpha = a + b + c + d + e + f + g + h + i +\\
j + k + l + m + n + o + p + q + r + s + t\\
u + v + w + x + y + z
\end{multline}

\begin{multline*}
\alpha = a + b + c + d + e + f + g + h + i +\\
j + k + l + m + n + o + p + q + r + s + t\\
u + v + w + x + y + z
\end{multline*}

\section{The \texttt{align} Environment}

\begin{align}
a_1 & = b_1+c_1\\
a_2 & = b_2+c_2-d_2+e_2
\end{align}

\begin{align}
a_{11} & = b_{11} &
a_{12} & = b_{12} \\ % End First Row
a_{21} & = b_{21} &
a_{22} & = b_{22}+c_{22} % End 2nd Row
\end{align}

\end{document}


In order to supress an equation number for just one line you can use the \nonumber command:

\begin{align}
c & = a^2 + 2ab + b^2\nonumber\\
c & = (a + b)^2
\end{align}

• Thanks, but this doesn't fit my needs (or I don't know how to use it), since I want to have several equations below each other, without stating again thisIsATerm= – bonanza Sep 12 '14 at 6:47
• You don't need it. Just try the code and lave out the "thisIsATerm" (only 'nothing' &= abc for example) – Dr. Manuel Kuehner Sep 12 '14 at 7:38