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!

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

  • 1
    Actually, align can be used inside gather. See the "Explanation" at the bottom of page 26 in the amsmath user's guide. – barbara beeton Sep 4 '19 at 17:23
  • @barbarabeeton interesting, never realised that. – daleif Sep 5 '19 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

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.