0

I am trying to create an outline section in a beamer presentation.

This outline section is wrapped in an outlinesection environment where the headline (among other things is redefined). In this specific section, I would like to show only the title and the miniframes associated to this specific section.

This answer proposes this for every section, but I would like to restrict this behavior with the outlinesection environment.

The idea is to not show the organization of the presentation while in the outline, but to keep the ability to navigate in the outline.
My initial idea was to make \insertnavigation option sensitive, a bit like \tableofcontents where the sections={<>} option allows to filter displayed sections, but I do not know how to do that at the moment.

\documentclass{beamer}
\usetheme{Frankfurt}

% Start of outline style settings
% -> Conditional display of a summary at the beginning of each section
\usepackage{ifthen}
\newboolean{sectiontoc}
\setboolean{sectiontoc}{true}
\AtBeginSection[]{%
    \ifthenelse{\boolean{sectiontoc}}{%
        \addtocounter{framenumber}{-1}%
        \begin{frame}{Outline}%
            \tableofcontents[currentsection,hideallsubsections,%
                             sectionstyle=show/shaded,firstsection=2,sections={<2->}
                             ]%
        \end{frame}%
    }%
}
% -> outlinesection environment with local redefinintion of the headline
\newenvironment{outlinesection}{%
    \setbeamertemplate{headline}{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=3.75ex,left]{section in head/foot}%
            % This shows only the first section title
            %\usebeamerfont{section in head/foot}\insertsectionhead
            % This shows all sections + miniframes
            \insertnavigation{\paperwidth}
        \end{beamercolorbox}%
    }%
}{%
    % Summary with all sections to close the outline
    \subsection{}
    \begin{frame}
        \frametitle{Outline}
        \tableofcontents[hideallsubsections,firstsection=2,sections={<2->}]
    \end{frame}
}
% End of outline style settings


\begin{document}

\begin{outlinesection}
\setboolean{sectiontoc}{false}
\section{Outline}
\setboolean{sectiontoc}{true}
\begin{frame}{Outline}
  ......
\end{frame}
\end{outlinesection}

\section{section 1}
\subsection{subsection 11}
\begin{frame}
   ......
\end{frame}
\section{section 2}
\subsection{subsection 21}
\begin{frame}
   ......
\end{frame}
\section{section 3}
\subsection{subsection 31}
\begin{frame}
   ......
\end{frame}
\section{section 4}
\subsection{subsection 41}
\begin{frame}
   ......
\end{frame}

\end{document}

This is the current output when showing a slide that is in the outline section enter image description here

The expected output would look like enter image description here

Once in the main part of the presentation, the headline should look like enter image description here

BambOo
  • 8,801
  • 2
  • 20
  • 47

1 Answers1

0

I finally found a solution myself, looking multiple times at the answer liked in my question (and also at the beamer manual). The solution is a two step process :

  1. The other sections must be hidden from the sidebar
  2. The miniframes in other sections must be hidden from the sidebar

The first step is performed by restting the section in head/foot shaded style locally in the outlinesection environment with a 0% opacity with

\setbeamertemplate{section in head/foot shaded}[default][0]

This makes other section names in the sidebar have the same color than the background. Side effect, the liNks are still clickable so if you know your presentation, you can guess where to click on, and it works just as usual.

The second step is done throught the patch proposed in Beamer infolines outer theme with miniframe bullets only for the current section, with

\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection}}{\usebeamertemplate{mini frame in other subsection of current section}}{}{}
\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection}}{\usebeamertemplate{mini frame in other section}}{}{}
\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection of current section}}{\usebeamertemplate{mini frame in other subsection}}{}{}

All in all, the MWE with correct outlinesection style is

\documentclass{beamer}
\usetheme{Frankfurt}

% Start of outline style settings
% -> Conditional display of a summary at the beginning of each section
\usepackage{ifthen}
\newboolean{sectiontoc}
\setboolean{sectiontoc}{true}
\AtBeginSection[]{%
    \ifthenelse{\boolean{sectiontoc}}{%
        \addtocounter{framenumber}{-1}%
        \begin{frame}{Outline}%
            \tableofcontents[currentsection,hideallsubsections,%
                             sectionstyle=show/shaded,firstsection=2,sections={<2->}
                             ]%
        \end{frame}%
    }%
}
% -> outlinesection environment with local redefinintion of the headline
% Patch of the mini frame in other subsection style as per https://tex.stackexchange.com/a/45152/141947 <---------
\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection}}{\usebeamertemplate{mini frame in other subsection of current section}}{}{}
\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection}}{\usebeamertemplate{mini frame in other section}}{}{}
\patchcmd{\slideentry}{\usebeamertemplate{mini frame in other subsection of current section}}{\usebeamertemplate{mini frame in other subsection}}{}{}

\newenvironment{outlinesection}{%
    % Local transparency of the other sections and mini frames
    \setbeamertemplate{section in head/foot shaded}[default][0]% <---------
    \setbeamertemplate{mini frame in other section}[default][0]% <---------
    \setbeamertemplate{headline}{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=3.75ex,left]{section in head/foot}%
            % This shows only the first section title
            %\usebeamerfont{section in head/foot}\insertsectionhead
            % This shows all sections + miniframes
            \insertnavigation{\paperwidth}
        \end{beamercolorbox}%
    }%
}{%
    % Summary with all sections to close the outline
    \subsection{}
    \begin{frame}
        \frametitle{Outline}
        \tableofcontents[hideallsubsections,firstsection=2,sections={<2->}]
    \end{frame}
}
% End of outline style settings


\begin{document}

\begin{outlinesection}
\setboolean{sectiontoc}{false}
\section{Outline}
\setboolean{sectiontoc}{true}
\begin{frame}{Outline}
  ......
\end{frame}
\end{outlinesection}

\section{section 1}
\subsection{subsection 11}
\begin{frame}
   ......
\end{frame}
\section{section 2}
\subsection{subsection 21}
\begin{frame}
   ......
\end{frame}
\section{section 3}
\subsection{subsection 31}
\begin{frame}
   ......
\end{frame}
\section{section 4}
\subsection{subsection 41}
\begin{frame}
   ......
\end{frame}

\end{document}
BambOo
  • 8,801
  • 2
  • 20
  • 47