I was wondering how I can customize the sidebar such that it only shows the current section and subsections that I am currently presenting and how can I remove the navigation bar from the title slide.

• Which beamer theme(s) are you using? Can you please add to your question a little document showing the relevant settings? – Gonzalo Medina Jul 12 '14 at 22:11

Hiding other subsections is easy: it's enough to use the hideothersubsections option (either for the theme or for the sidebar outer theme). Hiding other sections is not so simple; it involves a redefinition of \insertverticalnavigation as implemented in beamerbasenavigation.sty. Hiding the navigation bar from the title frame can be achieved using the plain option for the frame. The following example code contains the required code:

\documentclass{beamer}
\usetheme[hideothersubsections]{PaloAlto}

\makeatletter
\vbox{%
\def\sectionentry##1##2##3##4##5{%
\ifnum##5=\c@part%
\hbox{{%
\usebeamerfont{section in sidebar}\usebeamercolor[fg]{section in sidebar}%
\ifnum\c@section=##1%
\ifnum\c@subsection=0\relax%
{\usebeamertemplate{section in sidebar}}%
\else%
\ifx\beamer@nav@css\beamer@hidetext%
{\usebeamertemplate{section in sidebar}}%
\else%
\fi%
\fi%
\else
\fi}}}%
\beamer@currentsubsection=0\relax\fi}%
\def\slideentry##1##2##3##4##5##6{}%
\def\beamer@subsectionentry##1##2##3##4##5{%
\ifnum##1=\c@part%
\beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi}%
{\hbox{{%
\usebeamerfont{subsection in sidebar}\usebeamercolor[fg]{subsection in sidebar}%
\ifnum\c@section=##2%
\ifnum\c@subsection=##3%
\ifnum\c@subsubsection=0\relax%
{\usebeamertemplate{subsection in sidebar}}%
\else%
\fi%
\else%
\fi%
\else%
\fi}}}%
}%
\fi}%
\def\beamer@subsubsectionentry##1##2##3##4##5##6{%
\ifnum##1=\c@part%
\beamer@tocifnothide{\ifnum\c@section=##2\ifnum\c@subsection=##3\beamer@nav@css\else\beamer@nav@oss\fi\else\beamer@nav@ooss\fi}%
{\hbox{{%
\usebeamerfont{subsubsection in sidebar}\usebeamercolor[fg]{subsubsection in sidebar}%
\ifnum\c@section=##2%
\ifnum\c@subsection=##3%
\ifnum\c@subsubsection=##4%
{\usebeamertemplate{subsubsection in sidebar}}%
\else
\fi%
\else%
\fi%
\else%
\fi}}}%
}%
\fi}%
%\beamer@currentsubsection=0\relax%
}%
}
\makeatother

\title{The Title}
\author{The Author}
\institute{The Institute}

\begin{document}

\begin{frame}[plain]
\maketitle
\end{frame}

\section{Test section one}
\begin{frame} test frame for section one\end{frame}
\subsection{Test subsection one one}
\begin{frame} test frame for section one\end{frame}
\subsection{Test subsection one two}
\begin{frame} test frame for section one\end{frame}

\section{Test section two}
\begin{frame} test frame for section two\end{frame}
\subsection{Test subsection two one}
\begin{frame} test frame for section two\end{frame}
\subsection{Test subsection two two}
\begin{frame} test frame for section two\end{frame}

\end{document}


• If hiding sections is quite hard, is there a way to make the navigation sidebar adjust to when I get to future sections. Basically I have way too many sections and subsections and not all of them are visible. – emka Jul 12 '14 at 23:41
• @emka I don't understand your question. Please elaborate. Besides, even though hiding sections is a little harder my answer already shows how to do it. – Gonzalo Medina Jul 12 '14 at 23:43
• I have about one dozen sections in my presentation and each section has anywhere between 1 and 5 subsections. The navigation sidebar does not show all of the sections. I am using the PaloAlto theme. – emka Jul 13 '14 at 0:00
• @emka Did you try my code? Using it, when you are, say, in section 3 just that section and its subsections will show in the navigation bar. Isn't that what you wanted? – Gonzalo Medina Jul 13 '14 at 0:15
• Thanks! I really appreciate this. The code seems quite complex. – emka Jul 13 '14 at 0:49