1

Thanks to the reply (of samcarter) that I received here I can show at the beginning of each section the table of contents highlighting the current section and the subsections of it.

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage{lmodern}
\usetheme{Antibes}
\title{Beamer Class Usetheme Antibes}  
\author{Sascha Frank} 
\date{\today} 

\AtBeginSection{%
\begin{frame}
    \tableofcontents[currentsection, subsectionstyle=show/show/hide]
\end{frame}
}


\begin{document}
%\logo{\includegraphics[scale=0.14]{logo-SF}}
\begin{frame}
\titlepage
\end{frame} 


\begin{frame}
\frametitle{Table of contents}
\tableofcontents[hidesubsections]
\end{frame} 


\section{Section no.1} 
\begin{frame}
\frametitle{frame title} 
Each frame should have a title.
\end{frame}
\subsection{Subsection no.1.1  }
\begin{frame}
Without title somethink is missing. 
\end{frame}


\section{Section no. 2} 
\subsection{Lists I}
\begin{frame}
\frametitle{unnumbered lists}
\begin{itemize}
\item Introduction to  \LaTeX{}  
\item Course 2 
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{itemize} 
\end{frame}

\begin{frame}\frametitle{lists with single pauses}
\begin{itemize}
\item Introduction to  \LaTeX{}  \pause 
\item Course 2 \pause 
\item Termpapers and presentations with \LaTeX{}  \pause 
\item Beamer class
\end{itemize} 
\end{frame}

\begin{frame}\frametitle{lists with pause}
\begin{itemize}[<+->]
\item Introduction to  \LaTeX{}  
\item Course 2
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{itemize} 
\end{frame}



\subsection{Lists II}
\begin{frame}\frametitle{numbered lists}
\begin{enumerate}
\item Introduction to  \LaTeX{}   
\item Course 2 
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{numbered lists with single pauses}
\begin{enumerate}
\item Introduction to  \LaTeX{}  \pause 
\item Course 2 \pause 
\item Termpapers and presentations with \LaTeX{}  \pause 
\item Beamer class
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{numbered lists with pause}
\begin{enumerate}[<+->]
\item Introduction to  \LaTeX{}  
\item Course 2
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{enumerate}
\end{frame}

\end{document}

I want to add now another section at the end of this MWE but this time the TOC will not appear at the beginning of this section.

\section*{Remerciements}
\begin{frame}
\begin{block}{JE VOUS REMERCIE DE VOTRE ATTENTION.}
\end{block}
\end{frame}

creates a section that does not appear to the TOC but nevertheless the TOC appears at the beginning of this section with the rest of the sections unhighlighted. I want to avoid this extra frame.

  • 1
    Side-note: It would be a slightly better practice (i.e. semantically more correct) to use \begin{block}{\MakeUppercase{Je vous remercie de votre attention.}} instead of using full caps in your source code. – ebosi May 10 '17 at 22:33
1

You could add a Boolean variable which toggles the additional toc-frame:

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\usepackage{lmodern}
\usetheme{Antibes}
\title{Beamer Class Usetheme Antibes}  
\author{Sascha Frank} 
\date{\today} 

\newif\ifshowtoc
\showtoctrue% toggles to show the toc

\AtBeginSection{%
\ifshowtoc
\begin{frame}
    \tableofcontents[currentsection, subsectionstyle=show/show/hide]
\end{frame}
\fi
}


\begin{document}
%\logo{\includegraphics[scale=0.14]{logo-SF}}
\begin{frame}
\titlepage
\end{frame} 


\begin{frame}
\frametitle{Table of contents}
\tableofcontents[hidesubsections]
\end{frame} 


\section{Section no.1} 
\begin{frame}
\frametitle{frame title} 
Each frame should have a title.
\end{frame}
\subsection{Subsection no.1.1  }
\begin{frame}
Without title somethink is missing. 
\end{frame}


\section{Section no. 2} 
\subsection{Lists I}
\begin{frame}
\frametitle{unnumbered lists}
\begin{itemize}
\item Introduction to  \LaTeX{}  
\item Course 2 
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{itemize} 
\end{frame}

\begin{frame}\frametitle{lists with single pauses}
\begin{itemize}
\item Introduction to  \LaTeX{}  \pause 
\item Course 2 \pause 
\item Termpapers and presentations with \LaTeX{}  \pause 
\item Beamer class
\end{itemize} 
\end{frame}

\begin{frame}\frametitle{lists with pause}
\begin{itemize}[<+->]
\item Introduction to  \LaTeX{}  
\item Course 2
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{itemize} 
\end{frame}



\subsection{Lists II}
\begin{frame}\frametitle{numbered lists}
\begin{enumerate}
\item Introduction to  \LaTeX{}   
\item Course 2 
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{numbered lists with single pauses}
\begin{enumerate}
\item Introduction to  \LaTeX{}  \pause 
\item Course 2 \pause 
\item Termpapers and presentations with \LaTeX{}  \pause 
\item Beamer class
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{numbered lists with pause}
\begin{enumerate}[<+->]
\item Introduction to  \LaTeX{}  
\item Course 2
\item Termpapers and presentations with \LaTeX{}  
\item Beamer class
\end{enumerate}
\end{frame}

\showtocfalse% toggles to not show the toc
\section*{Remerciements}
\begin{frame}
\begin{block}{JE VOUS REMERCIE DE VOTRE ATTENTION.}
\end{block}
\end{frame}

\end{document}
  • Thank you very much. It works as desired. I learnt a lot of new things today:-)! – Dimitris May 10 '17 at 22:38
2

\AtBeginSection has the option to specify the behaviour for starred sections separately:

\AtBeginSection[<starred section>]{<normal section>}

So if you want to do nothing for the starred section, you could use:

\AtBeginSection[]{%
\begin{frame}
    \tableofcontents[currentsection, subsectionstyle=show/show/hide]
\end{frame}
}

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.