1

I made the following table:

\begin{table}[htp]
\caption{ABC} 
\label{tab:info}
\centering
\begin{tabularx}{0.48\textwidth}{lX}
\scriptsize
\multicolumn{2}{c}{A Information} \\ \toprule
Attribute & Meaning\\ \midrule
\\  \hline \\
\multicolumn{2}{c}{\textbf{B Information}}\\ \toprule
\textbf{Attribute} & \textbf{Meaning}\\ \midrule
\\ \hline \\
\multicolumn{2}{c}{\textbf{C}}\\ \toprule
\textbf{Attribute} & \textbf{Meaning}\\ \midrule
\\ \hline \\
\multicolumn{2}{c}{\textbf{D}}\\ \toprule
\textbf{Attribute} & \textbf{Meaning}\\ \midrule
\\
\end{tabularx}
\vspace*{-0.8cm}
\end{table}

But I am getting the following error:

I expect to see \omit only after tab marks or the \cr of an alignment. Proceed, and I'll ignore this case.
2
  • 2
    You can't put \multicolumn after \scriptsize. \multicolumn must be at the beginning of a cell (syntactically). Jul 1, 2020 at 14:15
  • @F.Pantigny your suggestion resolved my problem. Kindly write it in an answer format so I could accept it. Thanks a lot! Jul 1, 2020 at 15:36

1 Answer 1

1

A command \multicolumn must syntactically be at the beginning of the cell. It can't be preceded by a token such as \scriptsize. The reason is that \multicolumn is expanded in a list of tokens beginning by \omit and such an \omit (which means : omit the format of the column specified for the current cell) must always be syntactically at the beginning of the cell (hence the error message of TeX).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .