[Tex/LaTex] Show/hide the sections, subsections and subsections that I want from the navigation sidebar (beamer, Berkeley)

beamernavigationsectioningtable of contents

I am using the theme Berkeley, I have lot of sections and subsections, I want to hide certain sections, subsections and subsubsections from the navigation bar, but not from the table of contents.

If I use \usetheme[hideothersubsections]{Berkeley}, then it will hide all the subsections from the navigation bar. I need to hide the the section, subsection, the subsubsection I want. How could I do that?

Best Answer

Use the optional argument of the sectioning commands and leave it empty to not include the unit in the sidebar; the unit will, however, be included in the ToC; an example:

\documentclass{beamer}
\usetheme{Berkeley}

\begin{document}

\begin{frame}
\tableofcontents
\end{frame}

\section{Test Section One}
\begin{frame}test\end{frame}
\subsection[]{Test Subsection One One}
\begin{frame}test\end{frame}
\subsection{Test Subsection One Two}
\begin{frame}test\end{frame}

\section[]{Test Section Two}
\begin{frame}test\end{frame}

\section{Test Section Three}
\begin{frame}test\end{frame}
\subsection[]{Test Subsection Three One}
\begin{frame}test\end{frame}

\end{document}

The ToC:

enter image description here

and one of the frames with hidden units in the sidebar:

enter image description here