[Tex/LaTex] 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:

% Kodierung
% Sprache (neue deutsche Rechtschreibung)
% Mathematik

        (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\\
        &= a+b+c+d+e+f+g+h+i+j+k+l+m+n \\
        & \quad +o+p+q+r+s+t+u+v+w+x+y+z+1+2+3+4
        &= a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p

Best Answer

Here is what I would do (require mathtools package)

   \MoveEqLeft[3]  (a+b+c+d+e+f) \\ 
    ={}& 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 \\
    &  +o+p+q+r+s+t+u+v+w+x+y+z+1+2+3+4
    ={}& a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p

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.

enter image description here