使用 Beamer 自动切换幻灯片

使用 Beamer 自动切换幻灯片

我有多张图片想在一张幻灯片中显示beamer。这些图片实际上是相关的,我想通过在这些图片之间转换来模拟 GIF。

目前,我使用\only<1>{}命令显示图像 1,\only<2>显示图像 2 等,并依靠手动前进来查看下一张图片。有没有办法在同一张幻灯片上自动在指定的过渡时间之间切换这些图像?

我正在使用beamer-metropolis。考虑以下 MWE,其中“图像”是简单的 TikZ 线:

平均能量损失

\documentclass[10pt]{beamer}
\usetheme[progressbar=frametitle]{metropolis}
\usepackage{tikz}

\begin{document}

\begin{frame}

\only<1>{%
\begin{tikzpicture}[scale=0.4]
\draw[line width=2.5pt] (0,-2) to[out=0,in=135] (14, -9) to[out=315,in=125] (20,-16);
\end{tikzpicture}}

\only<2>{%
\begin{tikzpicture}[scale=0.4]
\draw [line width=2.5pt] (-14,-9) to [out=45,in=180] (0,-2) to[out=0,in=135] (14, -9) to[out=315,in=125] (20,-16);
\end{tikzpicture}}

\only<3>{%
\begin{tikzpicture}[scale=0.4]
\draw [line width=2.5pt] (-19.5,-16) to[out=55,in=228] (-14,-9) to [out=45,in=180] (0,-2) to[out=0,in=135] (14, -9) to[out=315,in=125] (20,-16);
\end{tikzpicture}}

\end{frame}

\end{document}

编辑

我在 stack exchange 上看到了有关示例和 beamer 手册的相关帖子,但对幻灯片的过渡时间没有影响。

即使尝试以下 MWE(Thorsten 的回答来自如何设置幻灯片之间的时间以使用 beamer 创建自动幻灯片放映?):

\begin{frame}
\transduration{0.75}
This is my first frame
\end{frame}

\begin{frame}
\transduration{0.75}
This is my second frame
\end{frame}

\begin{frame}
\transduration{0.75}
This is my third frame
\end{frame}

当我在 pdf 查看器(Acrobat 和 Preview)中查看幻灯片时没有任何效果。

相关内容