下面的例子可以正常工作:
\begin{frame}[fragile]
\begin{columns}
\column{.5\textwidth}
\begin{itemize}[<+->]
\item First
\item Second
\end{itemize}
\column{.5\textwidth}
\visible<3>{
Third
}
\end{columns}
\end{frame}
不过,我尝试将 Third 设置为逐字文本。
\begin{frame}[fragile]
\begin{columns}
\column{.5\textwidth}
\begin{itemize}[<+->]
\item First
\item Second
\end{itemize}
\column{.5\textwidth}
\visible<3>{
\begin{verbatim}
Third
\end{verbatim}
}
\end{columns}
\end{frame}
它无法编译。我收到一条错误消息:
Runaway argument?
\end{columns}rbatim} \beamer@endinvisible
! File ended while scanning use of \@xverbatim.
<inserted text>
\par
l.17 \end{frame}
但是,下面是编译,但它导致了四个覆盖的总结,但它应该只有三个(第二和第三覆盖是相同的):
\begin{frame}[fragile]
\begin{columns}
\column{.5\textwidth}
\begin{itemize}[<+->]
\item First
\item Second
\end{itemize}
\column{.5\textwidth}
\pause
\begin{verbatim}
Third
\end{verbatim}
\end{columns}
\end{frame}
答案1
\begin{frame}[fragile]
\begin{columns}
\column{.5\textwidth}
\begin{itemize}[<+->]
\item First
\item Second
\end{itemize}
\column{.5\textwidth}
\begin{visibleenv}<3>
\begin{verbatim}
Third
\end{verbatim}
\end{visibleenv}
\end{columns}
\end{frame}