# flush multiline equation to the right

How do I flush the two equations to the right? And keep the eqution number centered between the two lines?

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} a = b \\ b = c + d + e \end{split}$$
\end{document}


'flalign' can flush to the right, however with two lines, the number of the equation is not centered vertically.

'multiline' only flushes the last line to the right.

I also tried 'align' and 'aligned'. Didn't work out either.

I think I just don't get it....

It should look like this .......

• Welcome to our site. Please show us a complete minimal example of your document so that we do not have to guess your documentclass and alike. I fear you're are mixing up horizontal and vertical in your post. Do you want this for the whole document or only one equation? And why? Where shall we align the right side to? Imagine the next equation has the tag (1.5), This will look like a mess. – LaRiFaRi Mar 17 '16 at 10:53
• Thank you. Added minimal example. Corrected the hor/ver mistake. I want this for the whole document. Why? Because I think it looks nicer, and I think it's easier to read. Where shall we align to? To the left of the equation-number. If possible the right side of all equations should be vertically aligned. Independent of the length of the equation number. – user100924 Mar 17 '16 at 20:05

Like this?

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}
\numberwithin{equation}{section}
\usepackage{showframe} % only for demo

\begin{document}
\setcounter{section}{1}
\setcounter{equation}{44}
\begin{flalign}
&&\begin{split}
a = b \\
b = c + d + e
\end{split}
\end{flalign}
\end{document}


or

\begin{flalign}
&&\begin{aligned}
a = b \\
b = c + d + e
\end{aligned}
\end{flalign}

• I'd use aligned – egreg Mar 17 '16 at 13:48
• @egreg added. Looks the same to me but 3 characters more to type. – LaRiFaRi Mar 17 '16 at 13:51
• You would see a big difference if the tbtags option is specified. – egreg Mar 17 '16 at 13:52
• @egreg True, but if someone sets this option, I would expect that to happen. I cite yourself: "Thus it's better to use split whenever possible, if equation numbers are involved. " Anyhow, I did not get an MWE so it's otiose to treat all cases. – LaRiFaRi Mar 17 '16 at 13:56
• That's for “concatenated” formulas; here the two pieces have no relation to each other. – egreg Mar 17 '16 at 13:58