How to suppress subsections in the table of contents in latex-beamer?
The same as in the other two answers can also be achieved using \setcounter{tocdepth}{1}
, before (or after) \begin{document}
: try to compile the following code, then delete or comment the line marked with %%%
and compile again (once, or twice if necessary) to see the difference.
\documentclass{beamer}
\usetheme{Goettingen}
\setcounter{tocdepth}{1} %%%
\begin{document}
\frame{\tableofcontents}
\section{First}
\begin{frame}
A
\end{frame}
\section{Second}
\subsection{One only}
\begin{frame}
B
\end{frame}
\end{document}
At the same way as using \tableofcontents[hideallsubsections]
, the subsection
s disappear in the frame
where the \tableofcontents
is, but not in the sidebar (if present in the theme you use). The same, again, with local use of starred \subsection*{Subsection Title}
.
To hide subsections use the pretty self-explanatory:
\tableofcontents[hideallsubsections]
To keep a specific subsection out of the index use:
\subsection*{...}
To remove all subsections from the TOC only, use: \tableofcontents[hideallsubsections]
(added from another answer)