animation - 如何在投影仪演示中更改图像时修复 block 的位置?

标签 animation latex beamer

我想使用投影仪制作动画。在过渡期间,一张图片应该替换另一个。我有一个问题,文本将在此动画期间移动其位置。我试过\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}
“一些文本”的位置在动画过程中移动。

最佳答案

  • 您的代码有许多不 protected 行结尾(在行尾缺少 %),就像一个空格
  • onlide应该是 onslide
  • \onslide<>使内容不可见,但仍保留空间。您要使用 \only反而
  • float 说明符,例如 [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/

    相关文章:

    latex - 包 inputenc 错误 : unicode character (U+2032)

    datetime - 使用包日期时间将当前时间添加到\today? ( latex )

    java - 如何设置标签颜色动画以使其发光?

    java - 顶部带有 JComponents 的动画

    javascript - Velocity.js 在动画完成后删除样式属性

    haskell - 使用Haskell的LaTeX自然演绎证明

    android - 如何在一些时间间隔后一个一个地动画多个对象android

    latex - 如何在 LaTeX Beamer 演示文稿中顶部对齐 "fragile"框架的内容?

    javascript - 如何在 Beamer LaTeX 中嵌入带有 javascript 代码的 HTML 页面?

    latex - 如何在 latex 投影仪类的幻灯片底部显示带有 toc 的进度条?