0

This question already has an answer here:

I found from several posts that this usually happens due to extra column in data. But I can't find it in my code. Here is the partial code:

\begin{table}[h]
\tbl{Comparison of parameters using different k value}{
    \begin{tabular}{ |c|c|c|c|c|c|c|c|c|} 
        \toprule 
        Dataset & $A$ & $B$ & $C$ & $D$ & $E$ & $F$ & \multicolumn{2}{c|}{G}\\
        \cline{8-9}
        &&&&&&&{H}&{I}&
        \hline
        \multirow{2}{*}{DATA1} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
        \cline{3-9}
        & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
        \hline
    \end{tabular}
}
\end{table}

where tbl is defined as:

\long\def\tbl#1#2{%
    \parindent\z@\ignorespaces\noindent\tablecaptionfont
    \caption{#1}%
    \par\setbox\tempbox\hbox{\tablefont #2}%
    \tablewd\hsize\advance\tablewd-\wd\tempbox\global\divide\tablewd\tw@
    \ifdim\wd\captionbox<\wd\tempbox\centerline{\unhbox\captionbox}
    \else\leftskip\tablewd\rightskip\leftskip{\unhbox\captionbox}\par
    \fi\vskip5pt\centerline{\box\tempbox}
}

marked as duplicate by sodd, Community Nov 27 '16 at 15:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • &&&&&&&{H}&{I}& should be &&&&&&&{H}&{I} \\ – sodd Nov 27 '16 at 14:58
  • @hooy thanks. How did I miss that? :( – nomem Nov 27 '16 at 15:02

Browse other questions tagged or ask your own question.