I've been struggling for a long while with this code trying to solve the problem there apparently is. I basically copied the code from this page http://en.wikibooks.org/wiki/LaTeX/Tables in the "Spanning in both directions simultaneously" section, and I just modified it a bit:
\begin{frame}
\begin{center}
\onslide<1->\begin{tabular}{c|c|c|c}
\cline{1-4}
\multicolumn{4}{c}{Matemáticas} \pause\\
\cline{1-4}
\multicolumn{2} {c}{Cantidad}& \multicolumn{2} {c}{Magnitud} \pause \\
\cline{1-4}
\multicolumn{1}{c} {Aritmética} & \multicolumn{1}{c}{Música} & \multicolumn{1}c}{Geometría} & \multicolumn{1}{c}{Astronomía} \pause\\
\cline{1-4}
\multicolumn{4}{c}{Quatrivium}
\end{tabular}
\end{center}
\end{frame}
TeXStudio keeps saying:
Misplaced \omit \cline{1-4}
Missing \endgroup inserted \cline{1-4}
Missing } inserted \cline{1-4}
Missing \cr inserted \cline{1-4}
I would like that the table ends up looking like this
Best Answer
Your basic problem is that your table contains for columns, but you have placed
\pause
after\multicolumn{4}{...}{...}
. At this point, there is no cell.\pause
can be put at the end of the last argument of\multicolumn
:But then the bottom line of the row is omitted. The following example smuggles
\pause
after the line:Remarks:
\hline
is better than\cline{1-<max column>}
, because then the space for the line is taken into account. This is not possible for\cline
. Otherwise several\cline
in a row would be vertically shifted.\noalign
allows to put material in vertical mode outside of the alignment.I have wrapped
\pause
into\hbox
, because\pause
does not seem to like vertical mode here.There are many ways to get to the wanted table layout, e.g.:
Remarks:
For the cells with two lines, I have used a nested
tabular
.@{}
removes the space that separates columns, because this space is already added by the outer tabular.The lines of the tabular are colored by setting the default color for the whole table to the color of the lines.
The textured background is omitted, because this is much more complicate:
The table could be put into a box and an image could be scaled to this dimensions and put behind the table box. But this causes trouble with
\pause
.A monochrome background should be easier, package like
colortbl
allows the setting of a background color, e.g. via\rowcolor
. The package has also commands for colorizing the lines. However there might be problems with partial overwritten lines by the "background" color.