Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to use \pause and \framebreak in the same frame and it does not work.
The reason why I need that is that I'm writing a proof over several slides but don't want the stuff showing up all at once on each slide.

And since it is a proof I cannot just make a new frame instead of using \framebreak because of the \begin{proof} environment.
Is there any way to do this?

\edit: Here is the code I'm talking about:

\usetheme{Luebeck}  
\usecolortheme{beaver}

\newenvironment{myproof}[1][\proofname]{%  
\par
\def\insertproofname{#1{.}}%
\pushQED{\qed}
\alert{\textbf{
{\insertproofname}}} \hspace*{\fill} \\[5pt]}
{\popQED}
\makeatother  

\frame{
\frametitle{(1) Rate function}
\begin{myproof}
 \begin{itemize}
 \item[(i)]
 \vspace*{7pt}
 By definition of $I(\cdot)$ we have 
 \[
   text
 \] 
 \pause
 \[
  ...
 \].
 \end{itemize}
}

\frame{
\frametitle{(1) Rate function}
\begin{itemize}
\item[(ii)]
  ...
 \pause
 \vspace*{10pt}
\item[(iii)] 
...
 \end{itemize}
\end{myproof}
}  

Where I started a new frame I had \framebreak before, but neither of the two ways gives me the desired. I get errors instead.

share|improve this question
    
Although what you want is not possible, we could suggest you work-arounds. Which theme are you using? –  Gonzalo Medina May 24 '12 at 22:36

2 Answers 2

up vote 4 down vote accepted

As Daniel mentioned in his answer, it's not possible to use frame breaks and overlay specifications; however, using a beamercolorbox (or an appropriate variant, depending on the theme used) you can define a new environment that behaves as the proof environment, except for the title, and then you can use this new environment to write the successive parts of your proof in different frames (or in different slides of the same frame).

Below there's an example showing both approaches for the Berkeley theme (other themes will require a modification of the box used for the continuation of the proof). Locally redefining \qedsymbol you can prevent the symbol from appearing on the first frame/slide and then using \qed you can typeset the symbol one the proof is finished:

\documentclass{beamer}
\usetheme{Berkeley}
\usepackage{lipsum}% just to generate filler text

\setbeamercolor{proofblock}{use=block body,bg=block body.bg}

\newenvironment<>{proofc}[1]
  {\begin{actionenv}#2%
    \begin{beamercolorbox}[sep=1ex]{proofblock}#1%
  }
  {\end{beamercolorbox}\end{actionenv}}

\begin{document}

\begin{frame}
\def\qedsymbol{} % temporarily suppress the \qedsymbol
\frametitle{Proof of the main result}
\begin{proof}
\lipsum*[2]
\end{proof}
\end{frame}

\begin{frame}
\frametitle{Proof of the main result (Cont.)}
\begin{proofc}
\lipsum*[2]
\end{proofc}
\end{frame}

\begin{frame}
\frametitle{Proof of the main result (Cont.)}
\begin{proofc}
\lipsum*[4]\qed
\end{proofc}
\end{frame}

\begin{frame}
\only<1>{
\def\qedsymbol{} % temporarily suppress the \qedsymbol
\frametitle{Proof of the main result}
\begin{proof}
\lipsum*[2]
\end{proof}
}
\only<2>{
\frametitle{Proof of the main result (Cont.)}
\begin{proofc}
\lipsum*[2]
\end{proofc}
}
\only<3>{
\frametitle{Proof of the main result (Cont.)}
\begin{proofc}
\lipsum*[4]\qed
\end{proofc}
}
\end{frame}

\end{document}

Some images showing the result:

enter image description here

enter image description here

enter image description here

Now that the original question has been edited, the solution is simpler since no block is used in the customized myproof environment:

  1. Begin and end the myproof environment in every frame.

  2. Locally redefine \qedsymbol for those frames in which the proof isn't yet finished.

  3. Use the myproofc environment for those frames not needing the title.

A complete example using the code snippet given:

\documentclass{beamer}
\usetheme{Luebeck}  
\usecolortheme{beaver}

\newenvironment{myproof}[1][\proofname]{%  
  \par\def\insertproofname{#1{.}}%
  \pushQED{\qed}\alert{\textbf{{\insertproofname}}} \hspace*{\fill} \\[5pt]}
  {\popQED}

\newenvironment{myproofc}[1][\proofname]{%  
  \par%
  \pushQED{\qed}}
  {\popQED}

\begin{document}

\frame{
\def\qedsymbol{}
\frametitle{(1) Rate function}
\begin{myproof}
 \begin{itemize}
 \item[(i)]
 \vspace*{7pt}
 By definition of $I(\cdot)$ we have 
 \[
   text
 \] 
 \pause
 \[
  ...
 \].
 \end{itemize}
\end{myproof}
}

\frame{
\frametitle{(1) Rate function}
\begin{myproofc}
\begin{itemize}
\item[(ii)]
  ...
 \pause
 \vspace*{10pt}
\item[(iii)] 
...
 \end{itemize}
\end{myproofc}
} 

\end{document}
share|improve this answer
    
Ok, I will try this!! I don't know if I can figure it out though, since I'm not very experienced with the beamer class in latex (and latex in general lol). –  Newby1 May 25 '12 at 14:49
    
Oh actually I am using another proof environment as the default one, because i did not want it to be in a box but more like normal slide text, here is the code \newenvironment{myproof}[1][\proofname]{% \par \def\insertproofname{#1{.}}% \pushQED{\qed} \alert{\textbf{ {\insertproofname}}} \hspace*{\fill} \\[5pt]} {\popQED} \makeatother –  Newby1 May 25 '12 at 14:51
    
@Newby1 OK. I'll provide the code in a few hours; right now I have to rush to a lecture ;-). –  Gonzalo Medina May 25 '12 at 15:02
    
Thank you so much!! And I hope you weren't late to class because of me ;) –  Newby1 May 25 '12 at 15:54
    
@Newby1 according to your code snippet, you don't need any special redefinitions. If you are not sing a block, then you can simply write your proof in several frames without any further special settings. Or am I missing something? Could you please add your code to the original question (code inside comments doesn't show well) showing all the relevant settings involved (theme that you are using, for example) so I can get a faithful idea about the exact layout? –  Gonzalo Medina May 26 '12 at 0:16

It is not possible :-(

This is clearly stated on page 60 (§8.1) of the beamer manual in the documentation of the allowframebreaks option:

  • allowframebreaks=⟨fraction⟩. When this option is given, the frame will be automatically broken up into several frames if the text does not fit on a single slide. In detail, when this option is given, the following things happen:
    1. Overlays are not supported.
    2. ...

The \pause command internally uses \onslide (see §9.1 of the beamer manual), so it does employ overlay specifications.

share|improve this answer
    
Mhm, thank you so far, that is really disappointing. I'm using the Luebeck theme. Is there maybe another way how I could solve this problem? Do you need other information about what I'm using or anything like that? –  Newby1 May 25 '12 at 14:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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