Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Probably I'm going to bother all of you, but I really don't understand where the problem is. Here follows a snapshot of my error: enter image description here

It is a common error, but I'm quite sure my code is ok! The error is provided by this code:

\begin{table*}[hbt]%
\centering%
\tabcolsep2mm \small   %  
\begin{tabular}{c|c|c|c|c|c}
        \multicolumn{3}{c}{y:5}  & \multicolumn{3}{c}{x:10}       
\end{tabular}
    \caption{A caption.}%
    \label{tab:des}%
\end{table*}%

However, If I don't use \multicolumn everything is compiled fine, e.g.:

\begin{table*}[hbt]%
\centering%
\tabcolsep2mm \small   %  
\begin{tabular}{c|c|c|c|c|c}
        a & b & c & d & e & f       
\end{tabular}
    \caption{A caption.}%
    \label{tab:des}%
\end{table*}%

What am I missing? Isn't \multicolumn available by default?

EDIT Upon request, here follows the code. Please, notice that I'm using elsart.sty, the style file from Elsevier.

\documentclass[3p,twocolumn,number,referee,compress]{elsarticle}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{color}

\raggedbottom

\usepackage{lineno}

\usepackage{natbib}
\usepackage[fleqn]{amsmath}
\usepackage{booktabs}
\usepackage[USenglish]{babel}


\journal{xxx}
\begin{document}  
\begin{frontmatter}
\title{xxx}

\begin{abstract}\end{abstract}  
\begin{keyword}\end{keyword}
\end{frontmatter}


\begin{table*}[hbt]%
\centering%
\tabcolsep2mm \small   %  
\begin{tabular}{c|c|c|c|c|c}
        \multicolumn{3}{c}{y:5}        & \multicolumn{3}{c}{x: 10}       
\end{tabular}
    \caption{.}%
    \label{tab:des}%
\end{table*}%


\bibliographystyle{elsarticle-num}
\bibliography{References}    
\end{document}
\endinput

With this code the error is: enter image description here

share|improve this question
Your example works for me. Unless you provide a complete example that reproduces the problem it will be difficult to help you, and I will be forced to tell Javert where you are hiding. – Ian Thompson Jan 15 at 11:21
Eh Eh! Very funny (Javert cit)! I will post the fullcode: is not so long – JeanValjean Jan 15 at 11:24
\multicolumn, not \multicol. – Ian Thompson Jan 15 at 11:33
Yes, you are right! I did a test. I supposed that i was wrong with multicolumn, but multicol is a package for layouts. In my original question the code was right! – JeanValjean Jan 15 at 11:35
1  
In your first error message you have a string of å (if I read correctly); probably the text has some invisibile characters: fix it and retry. – egreg Jan 15 at 13:13
show 4 more comments

closed as too localized by Harish Kumar, lockstep, Andrew Swann, Stefan Kottwitz Jan 15 at 12:51

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.