2

I would like to define a new environment in Beamer that creates a frame containing only an itemize (and maybe some other stuff once I this basic case to work). The following

\newenvironment{itemizeframe}
{
\begin{frame}
\begin{itemize}
}
{
\end{itemize}
\end{frame}
}

called as

\begin{itemizeframe}
\item test
\end{itemizeframe}

does not compile and outputs

Runaway argument? \let \AtEndDocument \@firstofone \@enddocumenthook \@checkend {docume\ETC.

Any idea on what's happening? I am no specialist but I guess this has to do with the internal machinery of beamer.

1
  • See the documentation of the environment-key on page 61 of the beamer documentation. Commented Nov 25, 2014 at 10:16

1 Answer 1

3

This might do the trick.

\newenvironment{itemizeframe}
{
  \begin{frame}[fragile,environment=itemizeframe]
   \begin{itemize}
 }
 {
   \end{itemize}
  \end{frame}
}

Here a little explanation from the user guide:

The environment name (itemizeframe) is used to determine the end of the scanning when gathering the frame contents. Normally, the frame ends when a line reading \end{frame} is reached. However, if you use \begin{frame} inside another environment, you need to use this option. The environment option is useful only in conjunction with the fragile option.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .