1

The following mwe compiles, however, if one exposes the commented text, I receive the error:

! Misplaced \noalign

In the non-mwe version of the table, I have also received error messages akin to:

! Misplaced \omit. \onslide \multicolumn

A quick search gives a few examples (75639, 149819) which may be relevant. Most of these questions/issues were solved by relatively simple fixes. I very well could be missing somethings basic.

Here is the code:

\documentclass[]{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
\begin{center}
\begin{tabular}[h]{lccc}
\toprule
\visible<1->{%
1 & \multicolumn{3}{l}{text$^{a}$} \\[1mm]%
}%
\visible<2->{%
1 & \multicolumn{3}{l}{text} \\[1mm]%
}%
\visible<3->{%
1 & \multicolumn{3}{l}{text} \\[1mm]%
}%
\visible<4->{%
 & $\ell_{x, y}$ & $\ell_{z}$ & $\tau$ \\
\cmidrule{2-4}
A & B & C & D \\[1mm]%
}%
\visible<5->{%
A & B & C & D \\[1mm]
}%
\visible<6->{%
A & B & C & D \\[1mm]
}%
%\midrule
%\visible<1->{%
%\multicolumn{4}{l}{\tiny\textcolor{gray}{$^{a}$a detailed note which spans columns.}} \\%
%}%
%\bottomrule
\end{tabular}
\end{center}
\end{frame}
\end{document}

Edit: As suggested by one answer, I have replaced the \visibles by \pauses, which worked. However, after adding further \multicolumns (footnotes essentially which are intended to be exposed at different times) I still receive the ! Misplaced \omit error.

\documentclass[]{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
  \begin{center}
    \begin{tabular}[h]{lccc}
    \toprule
    1 & \multicolumn{3}{l}{text$^{a}$} \\[1mm]%
\pause
    1 & \multicolumn{3}{l}{text} \\[1mm]%
\pause
    1 & \multicolumn{3}{l}{text$^{b}$} \\[1mm]%
\pause
      & $\ell_{x, y}$ & $\ell_{z}$ & $\tau$ \\
    \cmidrule{2-4}
    A & B & C & D \\[1mm]%
\pause
    A & B & C & D \\[1mm]
\pause
    A & B & C & D 
\pause[1]
                  \\
    \midrule
    \multicolumn{4}{l}{\tiny\textcolor{gray}{$^{a}$a detailed note which spans columns.}}
\pause[3]    
                  \\%
    \multicolumn{4}{l}{\tiny\textcolor{gray}{$^{b}$another note which spans columns.}}
    \bottomrule
    \end{tabular}
  \end{center}
\end{frame}
\end{document}
2

I have no direct fix, but get it to work by using \pause (once with optional argument) instead of \visible. Note that for some reason \midrule prefers to follow directly after \\[1mm] and gives an error when putting \pause inbetween.

\documentclass[]{beamer}
\usepackage{booktabs}
\begin{document}
\begin{frame}
  \begin{center}
    \begin{tabular}[h]{lccc}
    \toprule
    1 & \multicolumn{3}{l}{text$^{a}$} \\[1mm]%
\pause
    1 & \multicolumn{3}{l}{text} \\[1mm]%
\pause
    1 & \multicolumn{3}{l}{text} \\[1mm]%
\pause
      & $\ell_{x, y}$ & $\ell_{z}$ & $\tau$ \\
    \cmidrule{2-4}
    A & B & C & D \\[1mm]%
\pause
    A & B & C & D \\[1mm]
\pause
    A & B & C & D 
\pause[1]
                  \\[1mm]
    \midrule
    \multicolumn{4}{l}{\tiny\textcolor{gray}{$^{a}$a detailed note which spans columns.}} \\%
    \bottomrule
    \end{tabular}
  \end{center}
\end{frame}
\end{document}
|improve this answer|||||
  • The fix suggested by @gernot worked. I have updated the code to include multiple instances of \multicolumn; footnotes essentially which are intended to be exposed at different times. I tried to employ the approach of having the \pause command precede the \\` without luck. I receive the ! Misplaced \omit` error. – John Chris Sep 7 '16 at 22:57
  • 1
    There are two problems: You forgot \\ before the \bottomrule; without it, your code doesn't compile even without \pauses. The second is, that \multicolumn wants to sit alone in its tabular cell and accepts \pause (and other stuff) neither before nor after it. However, you can put the \pause commands into the multicolumn text, like that: \multicolumn{4}{l}{\pause[3]\tiny\textcolor{gray}{$^{b}$ ....}\pause[1]}\\ – gernot Sep 8 '16 at 8:39
  • Putting the \pause command within the \multicolumn works well. I should point out that I had originally wanted to implement a \newcommand in order to abstract away some of the code associated with the \multicolumn. This fix makes a little more work, less elegant in that the overlay commands are mixed in with the content. I'm likely ignoring some of the difficulty in achieving complete separation (of content and overlay directives), though. – John Chris Sep 8 '16 at 14:23

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.