# How to make the right ends of equations in a split environment to align vertically?

I have an align environment inside of which I use a split environment to split the second long equation:

I would like to ask how to push + h and + k to the right such that their right ends are the same as that of f+g. In this particular case, g, h and k are aligned vertically. Thank you so much for your elaboration!

\documentclass{article}
\usepackage{amssymb,amsthm,amsmath}

\begin{document}

\begin{align}
a &= b+c-d \\
\begin{split}
e &= f + g \\
& +h \\
& +k
\end{split} \\
l &= m.
\end{align}

\end{document}


split is by far the most complicated AMS alignment, it is designed to do exactly what you show: carrying the alignment from an outer alignment into an inner one. Here you just want to wrap the right hand side, so you want one of the ...ed environments.

I'd use multlined even though that uses left, then centered then right rather than left then right alignment. But you could use aligned

\documentclass{article}
\usepackage{amssymb,amsthm,mathtools}

\begin{document}

\begin{align}
a &= b+c-d \\
\begin{split}
e &= f + g \\
& +h \\
& +k
\end{split} \\
l &= m.
\end{align}

\bigskip

\begin{align}
a &= b+c-d \\
e &\begin{multlined}[t]
= f + g \\
+h \\
+k
\end{multlined} \\
l &= m.
\end{align}

\bigskip

\begin{align}
a &= b+c-d \\
e &=\begin{aligned}[t]
f + g \\
{} +h \\
{} +k
\end{aligned} \\
l &= m.
\end{align}

\bigskip

\begin{alignat}{-1}
a &= b+c-d \\
e &= f + g \nonumber\\
&&{} +h \\
&&{} +k\nonumber\\
l &= m.
\end{alignat}

\end{document}

• For the non-initiated: \begin{alignat}{-1} is basically the same as \begin{align} but without intercolumn space. (Is that documented somewhere?) Apr 19 at 9:21
• @campa for people too lazy to count how many columns are needed for the better documented positive number:-) Apr 19 at 9:24
• Could you add the code using multlined? Apr 19 at 9:42
• @Analyst it's there (the second one) Apr 19 at 9:50
• Thank you so much for your help! Apr 19 at 9:56