# Error: extra alignment tab has been changed to \cr

I am using the ACM SIG template and trying to create a table of 4 columns.

I get the error mentioned in the title of the question. I know the standard reasons why this error can occur.

But my question is: Is it possible that the template or .cls file is controlling the maximum number of columns in a table ? If it were, would I get a different error than this?

-

## migrated from stackoverflow.comDec 4 '11 at 18:46

This question came from our site for professional and enthusiast programmers.

The error can be reproduced by

\documentclass{article}

\begin{document}

\begin{tabular}{c|c}
one & two & three \\
\hline
one & two
\end{tabular}
\end{document}


The problem is caused by the extra column you try to insert. The tabular environment expects two columns but three is inserted.

-
that's precisely what was happening. in TexShop on mac, the characters for | and l look exactly same. – euphoria83 Oct 18 '10 at 19:46

\documentclass{article}

\begin{document}

\begin{tabular}{c|c|c}
one & two & three \\
\hline
one & two
\end{tabular}
\end{document}

-

Not all extra alignment tab has been changed to \cr errors are found via Google or Bing. Something as simple as defining a macro with arguments and forgetting the argument before the first \\ will reproduce the error.

Same thing with \newcommand.

e.g.,

\def\test#1#2{$\hbox to 4cm{#1}}$}
\begin{tabular}{cccc}
Oh & \test{tested}{} & Oh & \test{Oh} \\
& \test{testing}{} &   & \test{Ohh}{} \\
\end{tabular}

-
That is the very same error as in the other cases, because you are trying to typeset 8 columns, but only four are expected. – Johannes_B May 15 at 10:12
@Johannes_B You've been around with TeX for a while now. Could you point me to a relevant piece of information either through tug or any other book or material where the newcommand and this error have been co related with one another? .... The error so far, to my understanding points to a very broad concept I wasn't able to find it but just trough trial and error. – doed May 15 at 10:21
Your definition wants two arguments, in the first row, the last \test doesn't have a second and uses what comes next. That means the double backslash gets (partly) eaten up and LaTeX doesn't have the information that the line should be broken. Hence it complains that two many columns are used. – Johannes_B May 15 at 10:25
Try \test{Wombat}\\ Wombat or even use \def\test#1#2{#1\typeout{This is shown in the terminal: #2}} to see that the double backslash is eaten up completely. – Johannes_B May 15 at 10:29
But @Johannes_B ok, it complains that two many columns are used.... vague to say the least. And if the information out there is vague then it just defeats the purpose. Who wrote or came up with the idea to have the error extra alignment tab has been changed to \cr then? – doed May 15 at 11:20