1

I have an external align environment and the computations inside each line are longer than the available width, so I wrapped each of those inside a multlined environment. Inside each of these multlined environments I'd like to right align (or left align with an additional indentation with respect to the first line) the lines following the first one. How can I achieve it?

Here is an example of what I have so far and I need the three lines that I marked with % at the end to be all right aligned (or left aligned with an addition indentation with respect to the main line).

\phi(asdfg) &= \phi(asd asd asd asd asd asd asd asd asd)\\
            &= \begin{multlined}[t]
                   (fgh fgh fgh fgh fgh fgh fgh fgh) (fghfghfgh) \cdot \\
                   \cdot (fghfghfghfghfghfghfghfghfgh)^{-1} (asd) %
               \end{multlined}\\
            &= \begin{multlined}[t]
                (qwe qwe qwe qwe qwe)(qweqweqwe)(qweqwe)^{-1} \cdot \\
                \cdot (asdasdasd asdasdasd) (asdasdas) (asdasdadasd) \cdot\\%
                \cdot (asdasdasdasdasd) %
               \end{multlined}\\
            &= \begin{multlined}[t]
                ...and so on...
               \end{multlined}
\end{align*}            

UPDATE (after @Bernard's answer):

To clarify my question here is a picture of what I need. Proof of concept

Any other suggestion on how to nicely typeset the above computations is more than welcome!

1

If I've well understood what you want, you simply can use aligned in the place of multlined, without any ampersand:

\documentclass{article}%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools}

\begin{document}

\begin{align*}\phi(asdfg) &= \phi(asd asd asd asd asd asd asd asd asd)\\
        &= \begin{aligned}[t]
               (fgh fgh fgh fgh fgh fgh fgh fgh) (fghfghfgh) \cdot{}  \\
               {} \cdot (fghfghfghfghfghfghfghfghfgh)^{-1} (asd) %
           \end{aligned}\\
        &= \begin{aligned}[t]
            (qwe qwe qwe qwe qwe)(qweqweqwe)(qweqwe)^{-1} \cdot{} \\
            {} \cdot (asdasdasd asdasdasd) (asdasdas) (asdasdadasd) \cdot\\%
            \cdot (asdasdasdasdasd) %
           \end{aligned}\\
        &= \begin{aligned}[t]
           \textit{ ...and so on...}
           \end{aligned}
\end{align*}

\end{document} 

enter image description here

Unless you mean this:

enter image description here

4
  • The expression following the third equal sign should really be in the same horizontal position as on all the other lines with equal signs. – barbara beeton Nov 20 '19 at 20:01
  • @barbarabeeton: I agree it's not very nice and Iwondered what the O.P. had in mind exactly. That's why I added another solution. – Bernard Nov 20 '19 at 20:04
  • @Bernard: I updated my question with a picture that should clarify my needs. The second option you provided seems what I need, but I don't see the related latex code, how did you achieve it? Also, now that I see it, it is not as nice as I thought, maybe aligning on the left leads to a better result. Do you know how to do it? Or do you have any other suggestion on how to typeset those computation? – Sirion Nov 20 '19 at 23:45
  • For my second version, I added the second optional argument of multlined: the width of the environment, approximately found by trial and error. To align on the left, use aligned as in the first solution, but with an ampersand at the beginning of each line. – Bernard Nov 21 '19 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.