我正在用 Beamer 制作幻灯片,其中我想有 3 列,每列都有一张图片和下面的标题。这些图片将被动画化。虽然我让图片很好地对齐,但我在标题方面遇到了一些困难。特别是,我无法将它们放置在图片下方。这是我的框架代码:
\frame{
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[scale=.3]{subplotA1}
\includegraphics<2>[scale=.3]{subplotA2}
\includegraphics<3>[scale=.3]{subplotA3}
caption A
\end{column}
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[scale=.3]{subplotB1}
\includegraphics<2>[scale=.3]{subplotB2}
\includegraphics<3>[scale=.3]{subplotB3}
caption B
\end{column}
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[scale=.3]{subplotC1}
\includegraphics<2>[scale=.3]{subplotC2}
\includegraphics<3>[scale=.3]{subplotC3}
caption C
\end{column}
\end{columns}
}
答案1
一种选择是\par
在标题前使用(您也可以在标题前的代码中留一个空行):
\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{columns}
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[width=\linewidth]{subplotA1}
\includegraphics<2>[width=\linewidth]{subplotA2}
\includegraphics<3>[width=\linewidth]{subplotA3}\par
caption A
\end{column}
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[width=\linewidth]{subplotB1}
\includegraphics<2>[width=\linewidth]{subplotB2}
\includegraphics<3>[width=\linewidth]{subplotB3}\par
caption B
\end{column}
\begin{column}{0.3 \textwidth}
\centering
\includegraphics<1>[width=\linewidth]{subplotC1}
\includegraphics<2>[width=\linewidth]{subplotC2}
\includegraphics<3>[width=\linewidth]{subplotC3}\par
caption C
\end{column}
\end{columns}
\end{frame}
\end{document}
由于我没有实际的图像,因此我\includegraphics
在示例中更改了选项。
线路
\PassOptionsToPackage{demo}{graphicx}
用黑色矩形替换实际图像。不是在实际代码中使用该行。