水平方向に 4 つの画像があるとします。2 行目の固定位置に、いくつかの画像 (Share0 と Share2 と仮定) を重ねて表示したいと思います。動きのあるスタイルにする必要があります。PowerPoint のアニメーションでこれを行うことができます。Beamer でこれを行うにはどうすればよいでしょうか。
次のコードを使用してこれを実行しようとしましたが、失敗しました。
\begin{frame}{series of images}
\begin{center}
\begin{overprint}
\only<2>{\includegraphics[scale=0.40]{image1.pdf}}
\hspace{-0.17em}\only<3>{\includegraphics[scale=0.40]{image2.pdf}}
\hspace{-0.34em}\only<4>{\includegraphics[scale=0.40]{image3.pdf}}
\hspace{-0.17em}\only<5>{\includegraphics[scale=0.40]{image4.pdf}}
\only<2-5>{\mbox{\structure{Figure:} something}}
\end{overprint}
\end{center}
\end{frame}
答え1
画像の動きを手動でアニメーション化する例:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\transduration<0-30>{0.1}
\begin{tikzpicture}[remember picture, overlay]
\foreach \x in{0,...,30}{
\node[] at (1.5+0.1333333*\x,2.-0.2*\x) {\includegraphics<+>[width=3cm]{example-image}};
\node[] at (5.5,2.) {\includegraphics<.>[width=3cm]{example-image-b}};
\node[] at (9.5-0.1333333*\x,2.-0.2*\x) {\includegraphics<.>[width=3cm]{example-image-a}};
}
\end{tikzpicture}
\end{frame}
\end{document}