Take the 2-minute tour ×
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.

I'm trying to code column headers in LaTeX so that each header spans two columns; however, the following code isn't working:

\usepackage{booktabs}
\begin{tabular}{cccc}
\toprule
\multicolumn{2}{c}{Assets} \multicolumn{2}{c}{Liabilities and Equities} \\
\cmidrule(r){1-2} \cmidrule(r){3-4}
Cash & \$13,152 & Short position (200 shares owed) & \$13,152 \\
\bottomrule
\end{tabular}

Assets should span the first two columns, and Liabilities and Equities should span the second pair. When I compile this, I get this error:

Misplaced \omit.
\multispan ->\omit 
                   \@multispan 
l.221 ...lticolumn{2}{c}{Liabilities and Equities}
share|improve this question
add comment

migrated from stackoverflow.com Dec 7 '11 at 0:03

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

1 Answer

up vote 5 down vote accepted

It seems you are doing this correct, but left out the column separator (&)on that line.

\begin{tabular}{cccc}
 \toprule
 \multicolumn{2}{c}{Assets} & \multicolumn{2}{c}{Liabilities and Equities} \\
 \cmidrule(r){1-2} \cmidrule(r){3-4}
 Cash & \$13,152 & Short position (200 shares owed) & \$13,152 \\
 \bottomrule
\end{tabular}

Gotta love those latex error descriptions!

share|improve this answer
    
LateX at 330 am... not a good combination. I just wasn't seeing it. Thank you very much. –  Ricardo Altamirano Sep 11 '11 at 2:26
2  
I love using latex at 330 am in the morning.... ;-) –  Nicholas Hamilton Jun 7 '13 at 4:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.