The following code produces an error when compiling with pdflatex
:
\documentclass[ignorenonframetext]{beamer}
\usepackage{environ}
\NewEnviron{myframe}[1][]{%
\begin{frame}{#1}
\BODY
\end{frame}
}
\begin{document}
This is star mode stuff.
\begin{frame}{First frame}
Some text.
\end{frame}
\mode<presentation>{
\begin{myframe}{title}
Some text.
\end{myframe}
}
\end{document}
Output of pdflatex
:
! LaTeX Error: \begin{myframe} on input line 23 ended by \end{document}.
If i remove the ignorenonframetext
option or use myframe
outside the presentation mode, everything works fine.
Is there a way to make myframe
work within the presentation mode?