Assume I have some sections within my latex-beamer presentation. Some of these sections contain subsections, others do not. So it looks very weird in the table of contents.
How can I suppress subsections in the table of contents?
Assume I have some sections within my latex-beamer presentation. Some of these sections contain subsections, others do not. So it looks very weird in the table of contents.
How can I suppress subsections in the table of contents?
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}
.