1

I'd like to make a simple table appear its cells one by one in beamer, but somehow I'm getting a "misspaced \omit". Related topics are about missing & etc., which is not my case (the table displays fine without the \onslide).

Here's the code

\begin{tabular}{|l|r||l|r|}
\hline
\onslide<2->{\multicolumn{2}{|c||}{\textsc{Actif}}} & \onslide<2->{ \multicolumn{2}{c|}{\textsc{Passif}}}\\ 
\hline
\hline
\onslide<3->{Banque} & \onslide<3->{18550} & \onslide<4->{Capital} & \onslide<4->{18550}\\
\hline
\onslide<5->{\textbf{Total}} & \onslide<5->{18550} & \onslide<5->{\textbf{Total}} & \onslide<5->{18550}\\
\hline
\end{tabular}
1

Move the \onslide command into the \multicolumn, like this:

\documentclass{beamer}
\setbeamertemplate{navigation symbols}{} % Has anyone ever used these?
\begin{document}
\begin{frame}
\begin{tabular}{|l|r||l|r|}
\hline
\multicolumn{2}{|c||}{\onslide<2->{\textsc{Actif}}} & \multicolumn{2}{c|}{\onslide<2->{ \textsc{Passif}}}\\ 
\hline
\hline
\onslide<3->{Banque} & \onslide<3->{18550} & \onslide<4->{Capital} & \onslide<4->{18550}\\
\hline
\onslide<5->{\textbf{Total}} & \onslide<5->{18550} & \onslide<5->{\textbf{Total}} & \onslide<5->{18550}\\
\hline
\end{tabular}
\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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