I'm following the advice in the Beamer user guide to produce slides and printed material from the same source using the beamerarticle package. The user guide recommends using the class option ignorenonframetext
, so that text living outside of a frame environment will be rendered only in the article format but not in the slideshow — a way to include notes in handouts that you don't want to show onscreen.
I've also been using this to divide the presentation visibly into sections:
\AtBeginSection[] % Do nothing for \section*
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}
The trouble is, \AtBeginSection[]
and its associated curly braces are outside of a frame environment, so they are ignored, and I don't get the table of contents at the beginning of every section (with highlighting).
Is there any way to get these to work together?
I don't want to reproduce the whole preamble and contents, but here's where the \AtBeginSection
bit is stuffed in:
\begin{document}
\begin{frame}\maketitle\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\AtBeginSection[] % Do nothing for \section*
{
\begin{frame}<beamer>
\frametitle{Outline}
\tableofcontents[currentsection]
\end{frame}
}
\section{Introduction}
.... blah blah ......
Thanks!
hjh
Best Answer
If you move
\AtBeginSection
declaration to the preamble, it will work even withignorenonframetext
option.I've could not find any explicit reference in
beameruserguide
about where to place\AtBeginSection
commands. But on section 3 "Tutorial: Euclid's Presentation" a conference presentation example (conference-ornate-20min.en.tex
) is detailed. In it,\AtBeginSection
command is placed before\begin{document}
so I always used this way without any problem.