I'm trying to create a myframe environment which wraps a Beamer frame environment but sets a default title. Additionally, I want to be able to pass optional arguments to myframe which should then forward these arguments to frame (particularly, I need the fragile argument to work).
I thought the following would work, but it doesn't. How do I fix this code?
\documentclass{beamer}
\newenvironment{myframe}[1][]{
\begin{frame}[#1]{Default Title}
}{
\end{frame}
}
\begin{document}
\begin{myframe}
Hello world
\end{myframe}
\begin{myframe}[fragile]
\begin{verbatim}
Hello world
\end{verbatim}
\end{myframe}
\end{document}
\end{frame}to do their thing, and when it is hidden like this it is never seen. – daleif Aug 28 '19 at 07:28\end{frame}behind a custom environment is an exceptionally bad idea - in many situations the code looks for the verbatim string\end{frame}. – samcarter_is_at_topanswers.xyz Sep 24 '22 at 13:31