Beamer – Frame with Options

beamer

If I want to use a "fragile" frame in a presentation I have to write

\begin{frame}[fragile]{FRAME TITLE}


\end{frame}

Is there a way using the

\frame{
  \frametitle{FRAME TITLE}
} 

syntax?

Best Answer

Short answer: no, or at least not using the documented interfaces. This can be verified with an example such as

\documentclass{beamer}
\begin{document}
\frame[fragile]{% Fails
  \frametitle{FRAME TITLE}
} 
\end{document}

However, using some code which is there purely for compatibility you may be OK:

\documentclass{beamer}
\begin{document}
\frame[containsverbatim]{
  \frametitle{FRAME TITLE}
  \begin{verbatim}
    Hello % # &
  \end{verbatim}
} 
\end{document}

Reading over the code, it's clear that the \frame approach for collecting frames is there mainly for historical reasons. The environment-based approach has more flexibility, particularly as without 'trickery' collecting verbatim material inside an argument is much more awkward/risky than within an environment.

Whilst the current maintenance team are committed to avoiding breaking beamer or altering 'defined' behaviours, that does not mean all of them are equally sensible! Speaking personally, I would not recommend using \frame... for new beamer slides at all.