5

I make a translation of a 600 pages Book with the beamer class in Latex, so I have lots of Subsections and SubSubsections. I want to show all subsections of the current Section in the sidebar along with all the subsubsections of the CURRENT subsection. I came across a hint and made

\setbeamertemplate{subsubsection in sidebar shaded}
{\vspace*{-\baselineskip}}

But that just hides all subsubsections but the current one. The best solution would be something like

\setbeamertemplate{subsubsection in sidebar shaded}[subsubsectionstyle=show/shaded/hide]

or any other way i can change the subsubsectionstyle. The best idea I had was

\setbeamertemplate{subsubsection in sidebar shaded}
{\tableofcontents[subsubsectionstyle=show/shaded/hide]}

But that just creates over 3000 errors and didn't solved my problem . Is there anybody who has an idea to solve this Problem ?

Here is a MWE to show what i mean:

    \documentclass[9pt]{beamer}

\usetheme[hideothersubsections]{Goettingen}

\begin{document}

\section{Section 1}
\begin{frame}
\frametitle{Section 1}
\end{frame}

\subsection{Subsection 1.1}
\subsubsection{SubSubsection1.1.1}
\begin{frame}
bla
\end{frame}
\subsubsection{SubSubsection 1.1.2}
\begin{frame}
bla
\end{frame}

\subsection{Subsection 1.2}
\subsubsection{SubSubsection1.2.1}
\begin{frame}
bla
\end{frame}
\subsubsection{SubSubsection 1.2.2}
\begin{frame}
bla
\end{frame}

\section{Section 2}
\begin{frame}
\frametitle{Section 2}
\end{frame}

\subsection{Subsection 2.1}
\subsubsection{SubSubsection2.1.1}
\begin{frame}
bla
\end{frame}
\subsubsection{SubSubsection 2.1.2}
\begin{frame}
bla
\end{frame}

\subsection{Subsection 2.2}
\subsubsection{SubSubsection2.2.1}
\begin{frame}
bla
\end{frame}
\subsubsection{SubSubsection 2.2.2}
\begin{frame}
bla
\end{frame}
\end{document}

And one page of the output is: enter image description here

As you can see, with the option [hideothersubsections] in \usetheme[hideothersubsections]{Goettingen} subsections outside the current section are not shown in the sidebar. I want the same effect for the subsubsections with regard to subsections. So Subsubsection1.2.1 and SubSubsection1.2.2 should not be seen in the sidebar, because im in subsection 1.1

Therefore it should looks like this: enter image description here

And when my slides move on and the subsections changes (from subec 1.1 to subsec 1.2), then the displayed subsubsection shall also change. It then should looks like this: enter image description here

Of course the space between subsec 1.1 and subsec 1.2 should disappear.

3

I guess it's enough to use the hideothersubsections option of \usetheme command:

\documentclass{beamer}
\usepackage{multido}

\usetheme[hideothersubsections]{PaloAlto}

\begin{document}
\multido{\i=1+1}{2}{%
  \section{Section}
  \multido{\i=1+1}{5}{%
    \subsection{Subsection}
    \multido{\i=1+1}{3}{%
      \subsubsection{Subsubsection}
      \begin{frame}
        \frametitle{Foo}
        Bar.
      \end{frame}
    }
  }
}
\end{document}
1

I've bumped into the same problem. Here's how I solved it. (an ugly hack, but works quite well for me.)

Locate 'beamerbasenavigation.sty' in the beamer package. Search for the definition of the \insertverticalnavigation command. Copy this code into the preempt part of your document.

Inside the function, change

\def\beamer@subsubsectionentry##1##2##3##4##5##6{%
  \ifnum##1=\c@part%
  \def\insertpartheadnumber{##1}%

to

\def\beamer@subsubsectionentry##1##2##3##4##5##6{%
  \ifnum##1=\c@part%
  \ifnum##2=\c@section
  \ifnum##3=\c@subsection
  \def\insertpartheadnumber{##1}%

This ensures that the subsubsection entry appears only when both section number and subsection number match the current ones.

Hope this helps. :)

  • BTW, don't forget to add the corresponding '\fi' at the end.... – Mong-Jen Kao Jun 26 '12 at 13:22
  • Worked for me too, but I skipped the \ifnum##3=\c@subsection part. – aioobe Mar 11 '13 at 8:04

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.