3

I would like to produce the following format.

A=A B=B

C=C D=D E=E

I tried using align. However, I failed to get the required output. Please correct me.

\begin{align*}  A&=A & B&B \\     C&=C  & D&=D  &E&E    \end{align*} 

Appreciate your inputs.

  • I would say that you need the same number of & on each lines to align them together. Do you have the amsmath loaded in your preamble? – Ludovic C. Jun 19 '13 at 12:08
  • \begin {align*}  A&=A & B&=B \\     C&=C  & D&=D  & E&=E    \end{align*} – Steven B. Segletes Jun 19 '13 at 12:09
  • Hi Steven. Thanks for the correction. This is of great help. – learner123 Jun 19 '13 at 12:30
2

If you're just looking for centred, gathered equations, then use gather*:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
Some text before
\begin{gather*}
  A=A \qquad B=B \\
  C=C \qquad D=D \qquad E=E
\end{gather*}
and some text after.
\end{document}

For more horizontally-aligned content, align* works fine, but you'll have a dangling equation (in the second row):

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
Some text before
\begin{align*}
  A &= A & B &= B \\
  C &= C & D &= D & E &= E
\end{align*}
and some text after.
\end{document}

There are options as well, depending on whether you want them numbered or aligned.

  • Hi Werner, Thanks for giving me the more generic one. It has educated me. – learner123 Jun 19 '13 at 12:30

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.