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?
Creating the table of contents in Beamer can be done with the same manner as in standard LaTeX. The first thing that we should do is to structure our presentation using the commands \section{} and \subsection{} ( \section*{} and \subsection*{} , to hide it from table of contents).
Generally, the table of contents includes chapters, sections, and subsection. You are also allowed to add entries manually in LaTeX. This is generally done to add the unnumbered sections. To do so, just add the \addcontentsline command, as shown in the above example.
The brief answer is, \section inserts a new entry into the table of contents at the appropriate tree-level and also inserts a new entry into the navigation bars. But \section* only adds an entry in the navigation bars, not in the table of contents.
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)
To hide subsections use the pretty self-explanatory:
\tableofcontents[hideallsubsections]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With