我想使用投影仪制作动画。在过渡期间,一张图片应该替换另一个。我有一个问题,文本将在此动画期间移动其位置。我试过\only 和\onslide 但问题没有解决。
\begin{frame}{}
\onslide<1->{some text }
\onlide<1>{
\begin{figure}[H]
\centering
\includegraphics[width=4in]{Figures/fig1.pdf}
\label{fig2}
\end{figure}
}
\onslide<2->{
\begin{figure}[H]
\centering
\includegraphics[,width=4in]{Figures/fig2.pdf}
\label{fig2}
\end{figure}
}
\end{frame}
“一些文本”的位置在动画过程中移动。
最佳答案
%
),就像一个空格onlide
应该是 onslide
\onslide<>
使内容不可见,但仍保留空间。您要使用 \only
反而[H]
在没有 float 机制的文档类中没有意义\centering
没有必要,beamer 数字默认居中\includeggraphics
是覆盖感知的,只需使用它并避免所有其他陷阱:\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{figure}
\includegraphics<+>[width=4in]{example-image}
\includegraphics<+>[width=4in]{example-image-duck}
\end{figure}
\end{frame}
\end{document}
关于animation - 如何在投影仪演示中更改图像时修复 block 的位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64046934/