I seem to have run into a strange interference between \includeonlyframes and use of \onslide to uncover a row in a tabular environment. Consider the following:
\documentclass{beamer}
\begin{document}
\includeonlyframes{second}
\begin{frame}{First frame}
\begin{tabular}{rl}
\onslide<+->{Some & text}
\end{tabular}
\end{frame}
\begin{frame}[label=second]{Second frame}
Some text on second frame
\end{frame}
\end{document}
When I run pdflatex on this example, I get "Missing } inserted." Curiously, if I make any one of the following changes, then the example compiles successfully.
- Remove the
\includeonlyframesline. - Remove the
\onslide<+->{and}from around thetabularrow. - Remove the
tabularenvironment (and&), but leave\onslide<+->{and}. - Replace
\onslide<+->{and}with the switch form\onslide<+->.
That is, use\onslide<+-> Some & text. - Replace
\onslide<+->{and}with\uncover<+->{and}.
(It seems particularly strange that\uncover<+->{works but\onslide<+->{does not, especially considering the apparent equivalence discussed in Differences and best practices: \onslide vs. \uncover, \onslide+ vs. \visible, \onslide* vs. \only?.) - Label the first frame with the optional argument
[label=first].
So, by doing either of the last three bullets, I can work around this problem and still retain the overlay behavior that I want. Nevertheless, I would like to understand why this error arises. Does anyone have any ideas?
\onslide<+->{Some & text}works fine as long as\includeonlyframes{second}is not included! Do you have any idea why this would be the case? (The bug report that you linked to does not mention\includeonlyframesas far as I can see.) – Henry DeYoung Aug 05 '12 at 17:28