36

At the end of a Beamer presentation, I want a "Thank you for your attention"-slide that is not part of the sections in my presentation. More specifically, I want no section in the navigation bar to be highlighted when I am on that slide. So is there a way to end a section, such that the following slide is not part of that section?

Alternatively, I figured I could make a section that does not appear in the ToC nor in the navigation bar. But I cannot manage to get this done. On this page, it is proposed that one can use

\section[]*{Starred section}

but this gives a "*" in the ToC and adds an extra, parasitic slide. An example is

\documentclass{beamer}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Sec1}
\begin{frame}
\frametitle{Frame1}
\end{frame}

\section{Sec2}
\begin{frame}
\frametitle{Frame2}
\end{frame}

\section[]*{Sec3}
\begin{frame}
\frametitle{Frame3}
\end{frame}

\end{document}

The last section, Sec3, rightly does not appear in the navigation, but appears as a "*" in the ToC.

Any suggestions?

  • You have to write \section*{...} and not \section[]*{...}. – Thorsten Aug 10 '12 at 12:00
  • To follow-up on @Thorsten's comment, I think I get exactly what you want by writing \section*{}. – Loop Space Aug 10 '12 at 12:03
  • You're right; \section*{} (note: No dots between the curly brackets!) produces a section that does not appear in the ToC nor in the navigation bar. Post an answer, and then I'll give you credit. Could someone edit the post I linked to above? – user15272 Aug 10 '12 at 12:06
  • @user15272 The dots are just a placeholder for your title ... – Thorsten Aug 10 '12 at 12:09
  • @Thorsten: I know, but if I put a title, it does not work: The title goes into the navigation bar. That's why I emphasized that there should be nothing between the curly brackets. – user15272 Aug 10 '12 at 12:11
42

To effectively get a no section section, use:

\section*{} or \section{}

as in the following variant of your code:

\documentclass{beamer}
%\url{http://tex.stackexchange.com/q/66628/86}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{Sec1}
\begin{frame}
\frametitle{Frame1}
\end{frame}

\section{Sec2}
\begin{frame}
\frametitle{Frame2}
\end{frame}

\section{} % or \section*{}
\begin{frame}
\frametitle{Frame3}
\end{frame}

\end{document}

This produces the following:

Beamer frame with no section

As far as I can tell by experimenting, the section command is a bit strange in what it can and cannot accept. The most general form is \section<*>[Optional]{Mandatory}. However, it appears that the * and the Optional are incompatible (even if the Optional is empty). So you can have a star or an optional argument, but not both. With that proviso, the possible combinations are:

  • \section{Text}: Text is in the TOC and the navigation.
  • \section{}: omitted completely from TOC and navigation (not even allocated space)
  • \section[Text]{Long Text}: Long Text is used in TOC, Text in navigation.
  • \section[]{Text}: Text is in the TOC, nothing in navigation.
  • \section[]{}: Nothing in either place.
  • \section*{}: omitted completely from TOC and navigation
  • \section*{Text}: Nothing in TOC, Text used in navigation

Here's some test code:

\documentclass{beamer}
%\url{http://tex.stackexchange.com/q/66628/86}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}
\tableofcontents
\end{frame}

\section{NNT}
\begin{frame}{No Star, No Optional, Text}
\end{frame}

\section{}
\begin{frame}{No Star, No Optional, Empty}
\end{frame}

\section[NOT(S)]{NOT}
\begin{frame}{No Star, Optional, Text}
\end{frame}

\section[NOE]{}
\begin{frame}{No Star, Optional, Empty}
\end{frame}

\section[]{NET}
\begin{frame}{No Star, Empty Optional, Text}
\end{frame}

\section[]{}
\begin{frame}{No Star, Empty Optional, Empty}
\end{frame}

\section*{SNT}
\begin{frame}{Star, No Optional, Text}
\end{frame}

\section*{}
\begin{frame}{Star, No Optional, Empty}
\end{frame}

\section*[SOT(S)]{SOT}
\begin{frame}{Star, Optional, Text}
\end{frame}

\section*[SOE]{}
\begin{frame}{Star, Optional, Empty}
\end{frame}

\section*[]{SET}
\begin{frame}{Star, Empty Optional, Text}
\end{frame}

\section*[]{}
\begin{frame}{Star, Empty Optional, Empty}
\end{frame}
\end{document}

That seems to allow for every possibility except that you want to have a section with a proper title which appears neither in the TOC nor in the navigation. Fortunately, that isn't the case here. The best I can come up with in that situation is to temporarily disable \addtocontents as this inhibits writing to the toc file (for the ... wait for it ... table of contents) and the nav file (for the navigation bar) but allows everything else to go through. Looking at the code, at least one of these files is written to if the \section command is given any argument whatsoever so this seems to be the only way. It could be wrapped up a bit more fancily, but in essence it boils down to:

\let\origaddtocontents=\addtocontents
\def\dontaddtocontents#1#2{} % or \@gobbletwo if in \makeatletter ... \makeatother

...

\let\addtocontents=\dontaddtocontents
\section{Invisible Section}
\let\addtocontents=\origaddtocontents
  • Good job! One question: When should you want a section with a proper title that is displayed nowhere? Do the sections play a role anywhere, except in the ToC and in the navigation bar? – user15272 Aug 10 '12 at 12:40
  • @user15272 I freely admit that I cannot conceive of such a circumstance, unless perhaps the same tex file is being used for both the beamer and the article mode - but then you can put \mode<article>{\section{whatever}}, though that will mess up the section numbering. There is also the issue of numbered and unnumbered sections which I've not touched on here. – Loop Space Aug 10 '12 at 12:48
  • 1
    Any update on this answer for TexLive 2017 and up? \section*{} does not work as expected now. See tex.stackexchange.com/questions/441816/… – DaniCee Jul 16 '18 at 8:56
1

You can simply use the standout frame at the end:

\begin{frame}[standout]
Thank you\\ 
for your time!
\end{frame}
  • I got the following message using 'standout' frame: 'Error: standout' undefined in families beamerframe'' – jotagah Aug 2 '17 at 10:53
  • 5
    This is no option which is available per default, but a special feature defined by the metropolis theme. – user36296 Aug 2 '17 at 11:06
  • Welcome to TeX.Stackexchange! – user36296 Aug 2 '17 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.