2

Say I have 5 equations, and I want to align them such that the first equation is centered, and the other four equations are aligned in two columns. If I use the align environment, (I am using the amsart document class), and do the following

\begin{align}
  a=A
\end{align}
\begin{align}
  b&=B & c&=C \\
  d&=D & e&=E
\end{align}

then the resulting gap after the first equation will be bigger than that between the rest of the equations. How can I do that better?

Thanks for suggestions!

0

2 Answers 2

6

If it is ok to have a shared number for the two column part you can use

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{gather}
  a=A
  \\
  \begin{aligned}
    b&=B & c&=C
    \\
    d&=D & e&=E
  \end{aligned}
\end{gather}
\end{document}

Note also this is the preferred method for giving example code, a self contained full but minimal example, others can copy and test as is.


Edit: as Barbara notes in the comments align is actually allowed inside a gather (normally these display math envs cannot be nested, which is why I used the inner variant aligned above). Here is the same MWE with gather + align:

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{gather}
  a=A
  \\
  \begin{align}
    b&=B & c&=C
    \\
    d&=D & e&=E
  \end{align}
\end{gather}
\end{document}

enter image description here

2
  • 1
    Actually, align can be used inside gather. See the "Explanation" at the bottom of page 26 in the amsmath user's guide. Commented Sep 4, 2019 at 17:23
  • @barbarabeeton interesting, never realised that.
    – daleif
    Commented Sep 5, 2019 at 13:50
2

Here is a proposition with alignat and 3 columns:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{alignat}{3}
   & & & a =A \\
  b&=B &\hspace{3.5em}& & \hspace{3.5em}c&=C \\
  d&=D & & & e&=E
\end{alignat}

\end{document} 

enter image description here

Not the answer you're looking for? Browse other questions tagged .