在 beamer 中使用 \only 绘制图形:图形不会停留在原位

在 beamer 中使用 \only 绘制图形:图形不会停留在原位

我想替换两个图形中的一个,所以我\only经常使用它。我观察到图形向右移动。在下面的代码片段中,我使用相同的图像文件来确保这不是由于图像宽度不同造成的。为什么图形每张幻灯片都会稍微向右移动?我该如何修复它?

\begin{frame}
\frametitle{$H$-Methode - Beispiel}
\begin{columns}[T] % align columns

\begin{column}{.4\textwidth}
\textbf{Liste von Paaren $(\alpha,\beta)$}\\
  \begin{itemize}
    \item<1>$V.\bigcup\limits_{i=1}^{m-n+1}.\Sigma_I^i$
    \item<2-3>\only<1-2>{$(aa,b)$}\only<3->{$(aa,b) \rightarrow a$}
    \item<4-5>\only<1-4>{$(aa,\epsilon)$}\only<5->{$(aa,\epsilon) \rightarrow b$}
    \item<6-7>\only<1-6>{$(ba,a)$}\only<7->{$(ba,a) \rightarrow a$}
    \item<8-9>\only<1-8>{$(ba,\epsilon)$}\only<9->{$(ba,\epsilon) \rightarrow a$}
    \item<10-11>\only<1-10>{$(ab,a)$}\only<11->{$(ab,a) \rightarrow a$}
    \item<12-13>\only<1-12>{$(bb,a)$}\only<13->{$(bb,a) \rightarrow b$}
  \end{itemize}
\end{column}%

\begin{column}{.70\textwidth}
\centering
\includegraphics[width=0.4\textwidth]{images/fsm-example01_orig}
\only<1-2>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<3>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<4>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<5>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<6>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<7>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<8>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<9>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<10>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<11>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<12>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<13>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\only<14>{\includegraphics[height=0.5\textheight]{images/HTree01}}
\end{column}%

\end{columns}
\end{frame}

答案1

放在%行的末尾,在每个隐藏图像后添加空格

相关内容