11

I want to write a numbered system of equations. Right now, this is what I do and I am satisfied with the output, but I have a feeling it's not the best way to do it.

\begin{equation}
  \begin{array}{ccl}
    a + b + c & = & d \\
    e + f     & = & g \\
    h         & = & i
  \end{array}
\end{equation}

How should I handle system of equations with a single number associated to it?

UPDATE :

I have read the asmmath package documentation and I feel more comfortable with what it offers. However, are there still some situations in which using the array environment is still relevant. For example, I would not know how to produce this result otherwise :

\begin{equation}
  \left\{
  \begin{array}{lcl}
    x_1 + x_2 + x_3 & = & 1 \\
    x_1 + x_2       & = & 2 \\
    x_1             & = & 3
  \end{array}
  \right.
\end{equation}

In the case the spacing seems correct, and it would not bee desirable to have the first column aligned to the = sign.

David Carlisle
  • 757,742
Gradient
  • 489

1 Answers1

17

The spacing is all wrong if you use an array, the AMS alignments provide alignment whilst preserving operator spacing:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
  \begin{array}{ccl}
    a + b + c & = & d \\
    e + f     & = & g \\
    h         & = & i
  \end{array}
\end{equation}

\begin{equation}
  \begin{aligned}
    a + b + c & =  d \\
    e + f     & =  g \\
    h         & =  i
  \end{aligned}
\end{equation}

\end{document}
David Carlisle
  • 757,742