在我的框架中,我有一个包含三张图片的列表。每次单击后,后面的图片都会出现在前一张图片的下方。这个方法很好,但我希望在出现下一张图片时,前一张图片的尺寸会缩小。当出现新的叠加层时,有没有快速减小图片尺寸的方法?
这是我现在使用的代码(已编辑):
\documentclass{beamer}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\begin{columns}
\begin{column}{.5\textwidth}
\includegraphics<1->[width=1\textwidth]{./image/pic1.jpg}
\includegraphics<2->[width=1\textwidth]{./image/pic2.jpg}
\includegraphics<3->[width=1\textwidth]{./image/pic3.jpg}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案1
像这样吗?
\documentclass{beamer}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\begin{frame}
\begin{columns}
\begin{column}{.5\textwidth}
\includegraphics<1>[width=1\textwidth]{example-image-a}
\includegraphics<2>[width=1\textwidth,height=1cm]{example-image-a}\par
\includegraphics<2>[width=1\textwidth]{example-image-b}
\includegraphics<3>[width=1\textwidth,height=1cm]{example-image-a}\par
\includegraphics<3>[width=1\textwidth,height=1cm]{example-image-b}\par
\includegraphics<3>[width=1\textwidth]{example-image-c}
\end{column}
\end{columns}
\end{frame}
\end{document}
更新:正如 Gonzalo 所建议的,如果您想要缩小以前的数字,而不仅仅是垂直缩小它们,最好使用scale
includegraphics 选项
\documentclass{beamer}
\usepackage{graphicx}
\usepackage{mwe}
\begin{document}
\begin{frame}
\begin{columns}
\begin{column}{.5\textwidth}
\includegraphics<1>[width=1\textwidth]{example-image-a}
\includegraphics<2>[scale=.1]{example-image-a}\par
\includegraphics<2>[width=1\textwidth]{example-image-b}
\includegraphics<3>[scale=.1]{example-image-a}\par
\includegraphics<3>[scale=.1]{example-image-b}\par
\includegraphics<3>[width=1\textwidth]{example-image-c}
\end{column}
\end{columns}
\end{frame}
\end{document}