[Tex/LaTex] Proofs in Beamer

beamerpage-breakingtheorems

I'm writing a presentation in Beamer, where I present proofs which are longer than one frame. How to make Beamer to break it automatically to another frame? If it is not possible how am I supposed to remove the square (the end of proof) and put it in a right place in another frame?

Best Answer

If you are using the proof environment, then I am afraid that there's no automatic way to break the text (allowframebreaks won't work here, since we're dealing with a block).

You can define an environment that behaves as proof, but without using the end-mark; you then can use this new environment for the first frames of the proof and then, use the standard proof environment for the last frame; here's an example of the definition of such environment (which I called proofs) and its ussage:

\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{lipsum}

\makeatletter
\newenvironment<>{proofs}[1][\proofname]{%
    \par
    \def\insertproofname{#1\@addpunct{.}}%
    \usebeamertemplate{proof begin}#2}
  {\usebeamertemplate{proof end}}
\makeatother

\begin{document}

\begin{frame}
\begin{proofs}
\lipsum[1]
\end{proofs}
\end{frame}

\begin{frame}
\begin{proofs}[\proofname\ (Cont.)]
\lipsum[1]
\end{proofs}
\end{frame}

\begin{frame}
\begin{proof}[\proofname\ (Cont.)]
\lipsum[1]
\end{proof}
\end{frame}

\end{document}

enter image description here

As requested in a comment, I have defined now three new environments: proofs, which uses a block with title given by \insertproofname (default "Proof") and suppresses the end-mark; proofc, which suppresses both the title and the end-mark, and proofe which suppresses the title but adds the end-mark; the first environment is to be used to start the proof, the second one, to continue the proof, and the third one, to end the proof:

\documentclass{beamer}
\usetheme{Warsaw}
\usepackage{lipsum}

\makeatletter
\newenvironment<>{proofs}[1][\proofname]{%
    \par
    \def\insertproofname{#1\@addpunct{.}}%
    \usebeamertemplate{proof begin}#2}
  {\usebeamertemplate{proof end}}
\newenvironment<>{proofc}{%
  \setbeamertemplate{proof begin}{\begin{block}{}}
    \par
    \usebeamertemplate{proof begin}}
  {\usebeamertemplate{proof end}}
\newenvironment<>{proofe}{%
    \par
    \pushQED{\qed}
    \setbeamertemplate{proof begin}{\begin{block}{}}
    \usebeamertemplate{proof begin}}
  {\popQED\usebeamertemplate{proof end}}
\makeatother

\begin{document}

\begin{frame}
\begin{proofs}
\lipsum[1]
\end{proofs}
\end{frame}

\begin{frame}
\begin{proofc}
\lipsum[1]
\end{proofc}
\end{frame}

\begin{frame}
\begin{proofe}
\lipsum[1]
\end{proofe}
\end{frame}

\end{document}