2

I get an error message for a table. Strange thing is that I already have a similar table in my file, and thereby I don't get an error message... Can someone help me out?

The table is the following:

\begin{table}[htbp]
\centering
\caption{Impact on Trade Balance, in million US \$ change from base}
\scalebox{1}{
\begin{tabular}{lccc}
    \hline\hline
    \multicolumn{4}{l}{Scenario A} \\
    \hline

               & EFTA & CA & ROW   \\[-10pt]
               &      &        &          \\




Non-Agriculture & 3.1598 & -3.9787 & 1.0283    \\

Agriculture &  -1.9159 & 3.2666 & -2.0655   \\

Services & -1.8677 & 0.3535 & 2.01962   \\\cline{2-12}

Total & -0.6238 & -0.3586 & 0.9824 \\

 \hline 
      \multicolumn{4}{l}{Scenario B} \\
    \hline 

    Non-Agriculture & 2.5389 & -3.0276 & 0.6769   \\

Agriculture &  -1.0801 & 1.9608 & -1.2893 \\

Services & -1.8290 & 0.7192 & 1.3302  \\\cline{2-12}

Total & -0.3702 & -0.3476 & 0.7178  \\

    \hline\hline
  \end{tabular}}
  \caption*{\scriptsize{Source: RunGTAP.}}
\label{tbl:EffectsOnTradeBalance}
\end{table}

The error message is the following:

! Extra alignment tab has been changed to \cr.
<template> \endtemplate
l.2510 \end{tabular}}

You have given more \span or & marks than there were
in the preamble to the \halign or \valign now in progress.
  • Why there is \scalebox{1} and many empty lines? – wipet May 13 '15 at 17:52
  • the \scalebox function allows us to manually scale the table if it is, for instance, too wide and doesn't fit on one A4 page.... the function is getting closed with a bracket after \end{tabular} ... – escazu wtf May 13 '15 at 21:33
2

The code

\cline{2-12}

requests a horizontal rule to span from column 2 through to column 12. However, you only have a 4-column tabular since you've used

\begin{tabular}{lccc}

You're probably interested in using \cline{2-4}.

  • oh man!!!! you made my day... I've been looking for errors the whole day and couldn't find anything... maybe because I'm looking at too many tables and numbers. I somehow lost the overview!!! but you saved me!! thank you very much @Werner – escazu wtf May 13 '15 at 17:33

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.