6

I've a problem with combining tcolorbox and \pause in beamer. They do not seem to display the different elements in the desired order.

My MWE:

\documentclass[french,,aspectratio=1610]{beamer} 
\usepackage{tcolorbox} 


% Boite pour les theorèmes : 
\usepackage{tcolorbox} 
\tcbuselibrary{skins,breakable} 

% Théorème, proposition, lemme 

\newenvironment{theo}[1][]{% 
\tcolorbox[noparskip,% 
            breakable,% 
            colframe=blue,colback=blue!20!white,% 
            coltitle=black,% 
            fonttitle={\bfseries \scshape} ,% 
            title=Théorème :  #1]}% 
            {\endtcolorbox}  
%%%%%% Habituel pour compiler 
% =========================== 
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[upright]{fourier} 


\begin{document} 
    \begin{frame} 
            \begin{theo}[Mon titre] 
                    Mon premier \pause Mon deuxième 
            \end{theo} 

            \pause 

            \begin{theo} 
                    Mon troisième \pause mon quatrième 
            \end{theo} 
    \end{frame} 
\end{document} 
3

\pause is a very crude command, but you seem to need more fine-control. But with a but of manual invention, you can get your desired result:

\documentclass[french,,aspectratio=1610]{beamer} 
\usepackage{tcolorbox} 


% Boite pour les theorèmes : 
\usepackage{tcolorbox} 
\tcbuselibrary{skins,breakable} 

% Théorème, proposition, lemme 

\newenvironment{theo}[1][]{% 
\tcolorbox[noparskip,% 
            breakable,% 
            colframe=blue,colback=blue!20!white,% 
            coltitle=black,% 
            fonttitle={\bfseries \scshape} ,% 
            title=Théorème :  #1]}% 
            {\endtcolorbox}  
%%%%%% Habituel pour compiler 
% =========================== 
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage[upright]{fourier} 


\begin{document} 
    \begin{frame} 
            \begin{theo}[Mon titre] 
                    Mon premier \only<.(2)->{Mon deuxième} 
            \end{theo} 

                        \begin{onlyenv}<3->
                \begin{theo} 
                                \only<3->{Mon troisième} \only<4->{mon quatrième} 
                \end{theo}  
                        \end{onlyenv}                   


    \end{frame} 
\end{document} 

enter image description here

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.