# Defining a command to close and open environment

While preparing my lectures with beamer, I often find myself having to split a frame into two different ones. For instance, a first version of my slides contains:

\begin{frame}
\begin{block}{Theorem}
Blah, blah, blah
\end{block}
\begin{block}{Corollary}
Etc, etc, etc
\end{block}
\end{frame}

When I complete my slides and add the proofs to these results, I must split it into two different frames

\begin{frame}
\begin{block}{Theorem}
Blah, blah, blah
\end{block}
\begin{block}{Proof}
Blah, blah, blah
\end{block}
\end{frame}

\begin{frame}
\begin{block}{Corollary}
Etc, etc, etc
\end{block}
\begin{block}{Proof}
Etc, etc, etc
\end{block}
\end{frame}

I think that it would be very helpful I if could simply define a command to close and then open the frame environment:

\def\newframe{ \end{frame} \begin{frame} }

\begin{frame}
\begin{block}{Theorem}
Blah, blah, blah
\end{block}
\begin{block}{Proof}
Blah, blah, blah
\end{block}

\newframe

\begin{block}{Corollary}
Etc, etc, etc
\end{block}
\begin{block}{Proof}
Etc, etc, etc
\end{block}
\end{frame}

However, this approach does not work. Does anyone know if there is any way to define such a command?

-
Welcome to TeX.SX! frame is not really like normal LaTeX environments. Beamer determines the contents of a frame by finding what's between \begin{frame} and \end{frame}; with \newframe it wouldn't see the implied \end{frame}, which would show up only when \newframe is "executed" (and probably give errors). –  egreg Oct 3 '12 at 9:30
beamer provides \framebreak in collaboration with the allowframebreaks option to the frame environment, but it breaks overlay support. –  Andrew Swann Oct 3 '12 at 11:53
Thank you for your comments. Unfortunately, I use tikz in my slides, and hence I have to make my frames fragile. This seems to break the \framebreak option... I'll close and open the environment manually. –  Biel Cardona Oct 4 '12 at 12:42
Try if you can use a keyboard shortcut in your editor that inserts \begin{frame} \end{frame} for you (preferably with a line break inbetween). This way your code becomes clearer. –  Hendrik Vogt Oct 5 '12 at 7:24
Thanks Hendrik, I can indeed make such a shortcut (I use emacs, so no problem about that), but I wanted a solution more TeXnical ;) –  Biel Cardona Oct 7 '12 at 15:17