帶投影機的 tcolorbox

帶投影機的 tcolorbox

氣象局

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tcolorbox}
\begin{document}
\begin{frame}
\begin{tcolorbox}
A\pause B
\end{tcolorbox}
\begin{tcolorbox}
A\pause B
\end{tcolorbox}
\end{frame}
\end{document}

產生三張投影片:A-ABAB-AAB-AB,這不是我所期望的(A-AB-AAB-AB)。

這裡\pause有人建議根本不要在 a 內使用tcolorbox,但是手動的確實提到了beamer皮膚,所以我猜它一定支持beamer.有沒有更好的方法來完成上述操作?

答案1

相反,使用它\only是可行的,儘管它需要更多的工作。

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tcolorbox}
\begin{document}
\begin{frame}
\begin{tcolorbox}
A\only<2->{B}
\end{tcolorbox}
\begin{tcolorbox}
\only<3->{A}\only<4>{B}
\end{tcolorbox}
\end{frame}
\end{document}

相關內容