Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

multicolumn table problem

1,629 views
Skip to first unread message

Robert Lopez

unread,
Nov 1, 2001, 11:17:33 AM11/1/01
to
Why does this table ...
\documentclass{article}

\begin{document}

\begin{tabular}{rrrrrrrrrrrrrrrrrrrr}
\multicolumn{20}{l}{\textbf This is the heading of this table}\\
\multicolumn{4}{c}{Label One}
\multicolumn{4}{c}{Label Two}
\multicolumn{4}{c}{Label Three}
\multicolumn{4}{c}{Label Four}
\multicolumn{4}{c}{Label Five} \\ \hline
\multicolumn{4}{c}{Sum 1}
\multicolumn{4}{c}{Sum 2}
\multicolumn{4}{c}{Sum 3}
\multicolumn{4}{c}{Sum 4}
\multicolumn{4}{c}{Sum 5} \\ \hline
A &B &C &D &A &B &C &D &A &B &C &D &A &B &C &D &A &B &C &D \\ \hline
1 &2 &3 &3 &1 &2 &3 &3 &1 &2 &3 &3 &1 &2 &3 &3 &1 &2 &3 &3 \\ \hline
\end{tabular}

\end{document}
generate this error...

-- ERROR: Misplaced \omit.

--- TeX said ---
\multispan ->\omit
\@multispan
l.8 \multicolumn{4}{c}{Label Two}

--- HELP ---
From the .log file...

I expect to see \omit only after tab marks or the \cr of
an alignment. Proceed, and I'll ignore this case.


Robert...@Philips.com

Anthony Goreham

unread,
Nov 1, 2001, 12:41:47 PM11/1/01
to
Robert Lopez <Robert...@abq.sc.philips.com> wrote:

> Why does this table ...

[ ... ]


> \multicolumn{4}{c}{Label One}
> \multicolumn{4}{c}{Label Two}
> \multicolumn{4}{c}{Label Three}
> \multicolumn{4}{c}{Label Four}
> \multicolumn{4}{c}{Label Five} \\ \hline

[ ... ]


> generate this error...
>
> -- ERROR: Misplaced \omit.

[ ... ]


> I expect to see \omit only after tab marks or the \cr of
> an alignment. Proceed, and I'll ignore this case.

It occurs because TeX only expects to see \omit after tab marks or the
\cr of an alignment.

Translated, LaTeX only expects to see \multicolumn after & or \\ in a
tabular.

You should therefore write:
\multicolumn{4}{c}{Label One} &
\multicolumn{4}{c}{Label Two} &
\multicolumn{4}{c}{Label Three} &
\multicolumn{4}{c}{Label Four} &


\multicolumn{4}{c}{Label Five} \\ \hline

--
Anthony Goreham The Queen's College, Oxford OX1 4AW, UK

0 new messages