Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
    
Theres one hitch. Subsubsection which are declared with \subsubsection[]{...} would never be shown in my sidebar. But the point is, the list of subsubsections shall change with the current subsection. –  Marcel Peters Apr 14 '12 at 18:49
1  
Can you provide the simplest example with dummy 2 sections and 2 subsections, subsubsections each etc? It would demonstrate the problem much clearer and would give us a chance to work on it right away. –  percusse Apr 15 '12 at 9:35
    
done, I hope this helps. –  Marcel Peters Apr 16 '12 at 12:30
    
show 1 more comment

1 Answer

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. :)

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.