\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{theorem}
text here
\end{frame}
\begin{frame}
and rest here
\end{theorem}
\end{frame}
\end{document}
Is there some work-around?
> \begin{frame}
> \begin{theorem}
> \end{frame}
Hi, this is a feature of LaTeX it insists you end any environment
before the
environment it's in.
\begin{x} \begin{y} \end{x} % not allowed.
Regards,
Marc van Dongen
Yes, use \only.
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{theorem}
\only<1>{text here}
\only<2>{and rest here}
> Hi, this is a feature of LaTeX it insists you end any environment
> before the
> environment it's in.
>
> \begin{x} \begin{y} \end{x} % not allowed.
Perhaps I should have been suggested a solution: why not introduce a
new environment for continued
Regards,
Marc van Dongen
Understood! But then why don't the allowframebreaks option to the
frame environment, and the \framebreak command, work? That is, I
tried:
\begin{frame}[allowframebreaks]
\begin{theorem}
many lines of text here...
\framebreak
more text here
\end{theorem}
\end{frame}
That doesn't quite do it: The "Theorem" heading appears again on the
2nd overlay.
And if I have enough lines of text as argument to \only<1> to fill a
slide and then use the [allowframebreaks] option and the \framebreak
command, I don't see the 2nd overlay at all.
you can also use \only to change the theorem headings, as in
\begin{theorem}[\only<1>{blablabla}\only<2>{blablabla (cont'd)]
or do any other number of similar things.
Unfortunately, that does NOT get rid of the "Theorem" heading on the
2nd slide, even if you use, say:
\begin{theorem}[\only<1>{}\only<2>{}]
Rather, now both slides begin with "Theorem()".
I need to get rid of the "Theorem" entirely on the 2nd slide. (Why:
because what I need to say is long. Actually, it's a \begin{proof|...
\end{proof} environment, and other math-like environments, where I
need more lines than will fit on one screen, so every line I can free
up counts.)
Christoph
\begin{frame}
\begin{thmn}\label{momgennormthm}
The moment-generating function of the normal distribution is given by
\[
M_X(t)=\exp\biggl\{\mu t+\frac{1}{2}\sigma^2t^2\biggr\}
\]
\end{thmn}
\begin{proof}\mbox{}
By definition of the moment-generating function
\begin{eqnarray*}
M_X(t)&=&\int_{-\infty}^\infty\exp\bigl\{xt\bigr\}\frac{1}{\sigma
\sqrt{2\pi}}\exp\Bigl\{-\frac{1}{2}\Bigl(\frac{x-\mu}{\sigma}
\Bigr)^2\Bigr\}\rd x\\
&=&\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^\infty\exp\Bigl\{-\frac{1}
{2\sigma^2}\Bigl[-2xt\sigma^2-(x-\mu)^2\Bigr]\Bigr\}\rd x
\end{eqnarray*}
One verifies directly that (a technique known as ``completing the
square'')
\[
-2xt\sigma^2+(x-\mu)^2=[x-(\mu+t\sigma^2)]^2-2\mu t\sigma^2-
t^2\sigma^4
\]
\renewcommand{\qedsymbol}{}
\end{proof}
\end{frame}
\begin{frame}
\begin{proof}[Proof ctd.]
Hence, we can write
\[
M_X(t)=\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^\infty\exp\Bigl\{-
\frac{1}{2\sigma^2}\Bigl[[x-(\mu+t\sigma^2)]^2-2\mu t\sigma^2-
t^2\sigma^4\Bigr]\Bigr\}\rd x
\]
We can then simplify and factor out all terms not involving $x$ to get
\[
M_X(t)=\exp\Bigl\{\mu t+\frac{1}{2}t^2\sigma^2\Bigr\}\int_{-\infty}^
\infty\frac{1}{\sigma\sqrt{2\pi}}\exp\Bigl\{-\frac{1}{2}\Bigl[\frac{x-
(\mu+t\sigma^2)}{\sigma}\Bigr]^2\Bigr\}\rd x
\]
Since the term inside the integral is a normal density with parameters
$\mu+t\sigma^2$ and $\sigma$, it integrates to 1, as shown in
\eqref{normdensint1}. Hence,
\begin{equation}\label{momgennorm}
M_X(t)=\exp\Bigl\{\mu t+\frac{1}{2}t^2\sigma^2\Bigr\}
\end{equation}
\end{proof}
\end{frame}
Your work-around is simple and effective in this situation. Thanks!
I guess I was trying too hard to maintain logical structure by keeping
a whole proof within a single \begin{proof}...\end{proof} environment.