I intend to extend a beamer frame to save some overhead when making slides.
I've followed an answer here after another answer involving NewEnviron
didn't work for me. The beamer user guide has some details on re-defining an environment:
So I defined a "pictureframe" to have slide with two columns and a picture in the right column:
\newcommand\startcolumns{\begin{columns}}
\newcommand\stopcolumns{\end{columns}}
\newcommand\startleftcolumn{\begin{column}{0.55\textwidth}}
\newcommand\startrightcolumn{\begin{column}{0.39\textwidth}}
\newcommand\stopcolumn{\end{column}}
\newenvironment{pictureframe}[2]{%
\newcommand\mypic{#2}
\begin{frame}[environment=pictureframe]{#1}
\startcolumns
\startleftcolumn
}{
\stopcolumn
\startrightcolumn
\centering\includegraphics{\mypic}
\stopcolumn
\stopcolumns
\end{frame}
}
Then, I can make a slide like this:
\begin{pictureframe}{Picture Frame}{example-image-a}
\begin{itemize}
\item Foo
\item Bar
\end{itemize}
\end{pictureframe}
Now, I want to be able to use 1) overlays and 2) labels, i.e.
\begin{pictureframe}<1>[label=picture,noframenumbering]{Picture Frame}{example-image-a}
\begin{itemize}
\item Foo
\item Bar
\end{itemize}
\end{pictureframe}
However, it doesn't compile:
! LaTeX Error: File `1' not found.
My question is: How do I properly "inherit" the frame environment, so that overlays and optional arguments are passed on, much like with a "real" frame?
Best Answer
Here is an environment overlay specification-aware. But you didn't write what these specifications should be used for (#4)...
The
\typeout{...}
shows the parameters.