0

I have too many sections in my presentation such that the left-hand-side navigation bar is full and only shows the first sections in Fig. 2, initial situation in Fig. 1. Pseudocode

  • clean the left-hand-hand side navigation bar when exceed the threshold and start a new one there when on sufficient page
  • this feature occurs with Beamer Berkeley appendix so it is possible also with the main document

Code which problem shown in Fig. 2

\documentclass{beamer}
\usetheme{Berkeley} 
\logo{\includegraphics{logo.png}}
\usepackage{hyperref}
% https://tex.stackexchange.com/a/346486/13173
\newenvironment{slide}[1]
{\begin{frame}[environment=slide,allowframebreaks]
\frametitle{\insertsection-#1}
}
{\end{frame}}
% fragile only if code
% allowframebreaks not by default 

\begin{document} 
\title{Sensory system. Primary sensory modalities. Cortical modalities. Kinds of sensory disturbances. Spinal cord disorders. Spinal cord transverse and partial lesion. Cauda equina damage.}
\author{Leo}

\section{Cortical modalities}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 2}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 3}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\section{Cortical modalities 4}
\begin{slide}{basics} 
    More refined aspects of sensation ...
\end{slide}

\end{document}

Fig. 1 Situation at the first page, Fig. 2 Situation at Section 6 wheere the navbar has not changed, Fig. 3 Samcarter's answer output + one slide addition but without \part{} - fails on sufficient page count

enter image description here enter image description here enter image description here

Output: the left-hand-side navigation bar is not refreshed when the amount of sections exceed its capacity on suffcient enough page

Testing Samcarter's proposal

I include one slide before Samcarter's body so I get the wrong output in Fig. 3. Solution: Eventually correct output by just adding \part{} in the place where the new navbar is wanted.

TeXLive: 2016
OS: Debian 8.7

  • 1
    Your code cannot be compiled. Please make a compilable document that does not rely on files we don't have access to. – samcarter_is_at_topanswers.xyz Jun 01 '17 at 16:08
  • 1
    Why do you list the headlines of all the sections in the title? Just leave the title away if you don't use a title slide. – Tiuri Jun 01 '17 at 16:11
  • 1
    Well, but by having all the sections in your document, you already get a full list of sections in the sidebar. Plus, it is displayed properly. – Tiuri Jun 01 '17 at 16:18

1 Answers1

2

You could manually split the sidebar into smaller chunks that fit in the available space using \part{}.

\documentclass{beamer}

\usetheme{Berkeley} 
\logo{\includegraphics[width=1cm]{example-image}}
%\usepackage{hyperref}

\usepackage{xpatch}
\makeatletter
\patchcmd\beamer@@tmpl@frametitle{\insertframetitle}{\insertsection-\insertframetitle}{}{}
\makeatother

\begin{document} 
\title{Sensory system. Primary sensory modalities. Cortical modalities. Kinds of sensory disturbances. Spinal cord disorders. Spinal cord transverse and partial lesion. Cauda equina damage.}
\author{Leo}

\section{Cortical modalities}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 1}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 2}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\part{}
\section{Cortical modalities 3}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\section{Cortical modalities 4}
\begin{frame}{basics} 
    More refined aspects of sensation ...
\end{frame}

\end{document}

enter image description here

(don't load hyperref, beamer already does this for you)