1

The MWE

\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}

produces three slides: A-AB, AB-A, and AB-AB, which is not what I would expect (A-, AB-A, and AB-AB).

Here somebody advises not to use \pause at all inside a tcolorbox, but the manual does mention a beamer skin, so I guess it must have support for beamer. Is there a better way to do the above?

1
  • 2
    Well, the manual says "This skin resembles boxes known from the beamer class and therefore is called ’beamer’." The presence of the skin doesn't imply support for beamer. Jul 2, 2017 at 19:53

1 Answer 1

2

Using \only instead works, though it is a bit more work.

\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}
2
  • Do you also know a way to prevent the tcolorbox to become smaller if the text is still hidden?
    – Carucel
    Jul 2, 2017 at 20:06
  • 3
    @Carucel To fix the size, try with \visible instead of \only Jul 2, 2017 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.