# Welcome to the UK List of TeX Frequently Asked Questions on the Web

## Why not use eqnarray?

The environment eqnarray is attractive for the occasional user of mathematics in LaTeX documents: it seems to allow aligned systems of equations. Indeed it does supply such things, but it makes a serious mess of spacing. In the system:

\begin{eqnarray}
a & = & b + c \\
x & = & y - z
\end{eqnarray}


the spacing around the “=” signs is not that defined in the metrics for the font from which the glyph comes — it’s \arraycolsep, which may be set to some very odd value for reasons associated with real arrays elsewhere in the document.

The user is far better served by the AMSLaTeX bundle, which provides an align environment, which is designed with the needs of mathematicians in mind (as opposed to the convenience of LaTeX programmers). For this simple case (align and other AMSLaTeX alignment environments are capable of far greater things), code as:

\begin{align}
a & = b + c \\
x & = y - z
\end{align}


The matter is discussed in more detail in a PracTeX journal paper by Lars Madsen; Stefan Kottwitz offers a TeX blog entry which includes screen shots of the output, convincingly demonstrating the problem.

AMSLaTeX
macros/latex/required/amslatex (or browse the directory); catalogue entry

Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=eqnarray

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.28, released on 2014-06-10.