0

I would like to show the subsection headings for some, but not all subsections. I found \tableofcontents[hideothersubsections], which will hide the subsections for other sections, but I am not in the section I would like to display so this would fail to display subsections I would like to display. In short, I would like to be able to name a section and hide the subsections for that section in the table of contents.

1

Will a manual approach do?

\documentclass{beamer}

\begin{document}

\begin{frame}
    \tableofcontents[sections=1,hidesubsections]
    \tableofcontents[sections=2]
    \tableofcontents[sections=3,hidesubsections]
\end{frame}

\section{sec1}
\subsection{sub1}
\frame{}

\section{sec2}
\subsection{sub2}
\frame{}

\section{sec3}
\subsection{sub3}
\frame{}

\end{document}

enter image description here

[The vertical spacing is too big, but depending on how many sections you have, some negative vspaces can cure that]

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.