# Aligned multline

I want to show the derivation of a formula where I encounter long formulae. Unfortunately the derivation is very complex, so I have to show some intermediate steps.

My problem is, that I want to mix the behaviour of multline with align. The first line should be aligned left and the whole rest should be aligned right with respect to the longest line. This block should be aligned at the =.

At the moment, I use the align environment. But in this case, the first line is still aligned left to the \$ of the other lines.

Important note: I don't like magic numbers. So I prefer solutions which are completely automatic.

My approach so far:

\documentclass{scrartcl}
% Kodierung
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
% Sprache (neue deutsche Rechtschreibung)
\usepackage[ngerman]{babel}
% Mathematik
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}
\begin{align}
(a+b+c+d+e+f) \\ % aligned left
% the following block should be aligned right
&= a+b+c+d+e+f+g+h+i+j+k+l+m+n\\
\begin{split}
&= a+b+c+d+e+f+g+h+i+j+k+l+m+n \\
\end{split}\\
&= a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p
\end{align}
\end{document}

-
– mafp Feb 15 '13 at 15:59

Here is what I would do (require mathtools package)

\begin{align}
\MoveEqLeft[3]  (a+b+c+d+e+f) \\
={}& a+b+c+d+e+f+g+h+i+j+k+l+m+n\    \begin{split}
={}& 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+1+2+3+4
\end{split}\        ={}& a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p
\end{align}


I would not want to start using multline effects in it, ends up looking strange. The above sort of follows the guides set out by the AMS.

-

Here is a version without magic numbers. It uses the mathtools to make the first line appear to have zero width.

\begin{align}
\mathclap{(a+b+c+d+e+f)} & \notag \\
&= a+b+c+d+e+f+g+h+i+j+k+l+m+n \\
&= a+b+c+d+e+f+g+h+i+j+k+l+m+n \notag \\

I would not use that constrction either. The only reason why I use a number here is because I align to the right of the =. The default is 2, as recommended by AMS – daleif Feb 15 '13 at 13:51
@daleif I removed the 3 and aligned to the left of the = to follow the recommendation. – Stefan Feb 15 '13 at 13:58
Then you have to add the \quad which is cumbersome (I have macros in my editor to do &= -> = {} & so I save some time). Besides, aligning to the right is not as often as aligning to the left. – daleif Feb 15 '13 at 14:26