我有两个块。我需要的是在每个块上tickpicture
使用(或覆盖)另一个图:\pause
\begin{tikzpicture}
\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{Figures/plot.pdf}};
\draw (0., 1.5) node {\small $\Delta R({\mu,\tau})$ };
\pause \draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{Figures/plotmodified.pdf}};
\end{tikzpicture}
\begin{tikzpicture}
\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{Figures/plot2.pdf}};
\pause \draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{Figures/plot2modified.pdf}};
\end{tikzpicture}
但是,上述操作会创建两个新闻幻灯片,即一个接一个,另一个接一个\pause
- 是否可以同时更改情节?
答案1
和投影机,可以使用多个命令来指定叠加规范(参见这里)
以下代码将在一个框架上创建两个幻灯片,第一个幻灯片包含图像A和b第二张图片b和C。
\draw (0., 1.5) node {\small $\Delta R({\mu,\tau})$ };
不在only
括号内,所以它会一直出现。我把它移到了环境的末尾,tikzpicture
以免覆盖它。
\documentclass{beamer}
\usepackage{mwe}
\usepackage{tikz}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{graphicx}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\only<1>{\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{example-image-a}};}
\only<2>{\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{example-image-b}};}
\draw (0., 1.5) node {\small $\Delta R({\mu,\tau})$ };
\end{tikzpicture}
\begin{tikzpicture}
\only<1>{\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{example-image-b}};}
\only<2>{\draw (0, 0) node[inner sep=0] {\includegraphics[width=1\textwidth,height=0.44\textheight]{example-image-c}};}
\end{tikzpicture}
\end{frame}
\end{document}