
同様の質問これですしかし、リスト項目をオーバーレイするのではなく、フロートをオーバーレイできるようにしたいと思いますtable
。これはブロックの場合はうまくいきますが、
\begin{frame}[fragile]
\begin{block}<only@+>{First block}
%stuff
\end{block}
\begin{block}<only@+>{Second block}
%more stuff
\end{block}
\end{frame}
残念ながら、テーブルの場合はそうではありません。
\begin{frame}[fragile]
\begin{table}[!h]<only@+>
\begin{tabular}{} %column specs
%first table
\end{tabular}
\caption{} %some caption
\end{table}
\begin{table}[!h]<only@+>
\begin{tabular}{} %column specs
%second table
\end{tabular}
\caption{} %some caption
\end{table}
\end{frame}
出力: 両方の表が同じスライド上にあり、その上に意味不明な文字 (¡only@+¿) が書かれています。この場合の正しい構文は何でしょうか? よろしくお願いします。
PS 私が考え出したものよりもブロックをオーバーレイするためのより良い構文があれば、ぜひ教えてください! :) 理想的には、フレーム内の\begin{framebody}[<only@+>]
すべてのもの (ブロック、テーブル、itemize
または環境) がその動作を継承するようなものを探しています。enumerate
答え1
以下は意図したとおりの結果になるようです。
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{overprint}
\onslide*<1>{
\begin{table}[h]
\begin{tabular}{cc} %column specs
f & f%first table
\end{tabular}
\caption{1} %some caption
\end{table}
}
%
\onslide*<2>{
\begin{table}[h]
\begin{tabular}{cc} %column specs
c & c
%second table
\end{tabular}
\caption{2} %some caption
\end{table}
}
\end{overprint}
\end{frame}
%
\begin{frame}
%
\begin{block}<only@+>{First block}
b
\end{block}
%
\begin{block}<only@+>{Second block}
f
\end{block}
%
\end{frame}
\end{document}