Extra alignment tab has been changed to \cr.

A table or matrix row has more & cells than the column specification allows. Add a column to {…}, remove an &, or add a missing \\.

Help centre › LaTeX errors › Tables and alignment · Error: the build stops or the output is wrong

What the log says

! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.4 Name & Run 1 &
                   Run 2 \\

What it means

A row of a tabular, array or matrix has more cells than there are columns. TeX ends the row at the extra & (that is what changed to \cr means), so the rest of the row is pushed to a new line or lost. The l.<n> line breaks right after the & that is one too many.

Causes and fixes

Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.

1. More cells in a row than columns in the specification

Count the column letters in \begin{tabular}{…} (l, c, r, p{…}: one each, | does not count) and the & in the row: a row has one & fewer than it has columns. Add a column letter, or remove the extra &.

Fails
\documentclass{article}
\begin{document}
\begin{tabular}{lc}
Name & Run 1 & Run 2 \\
Alpha & 1 & 2 \\
\end{tabular}
\end{document}
Fixed
\documentclass{article}
\begin{document}
\begin{tabular}{lcc}
Name & Run 1 & Run 2 \\
Alpha & 1 & 2 \\
\end{tabular}
\end{document}

2. A missing \\ joins two rows into one

Without \\ at the end of a row, the next line continues the same row and its & count is added. Add \\ at the end of each row.

Fails
\documentclass{article}
\begin{document}
\begin{tabular}{ll}
Name & Value
Alpha & 1 \\
\end{tabular}
\end{document}
Fixed
\documentclass{article}
\begin{document}
\begin{tabular}{ll}
Name & Value \\
Alpha & 1 \\
\end{tabular}
\end{document}

3. A matrix with more than 10 columns

The amsmath matrix environments (matrix, pmatrix, bmatrix …) allow 10 columns by default. Raise the limit in the preamble with \setcounter{MaxMatrixCols}{20}.

Fails
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[ \begin{pmatrix} 1&2&3&4&5&6&7&8&9&10&11 \end{pmatrix} \]
\end{document}
Fixed
\documentclass{article}
\usepackage{amsmath}
\setcounter{MaxMatrixCols}{20}
\begin{document}
\[ \begin{pmatrix} 1&2&3&4&5&6&7&8&9&10&11 \end{pmatrix} \]
\end{document}

4. A cases or aligned environment with too many & in a line

cases has two columns (value & condition), so a line has at most one &. In align, extra & pairs make extra column pairs, which is allowed, but aligned/split lines with a stray & can still trigger this error.

In Manulyx

The editor shows the error beside the line with an explanation, and the compile log is parsed into a list of problems.

Write in Manulyx for free · Journal templates

Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors