6

I'm writing a presentation using the Beamer class, I wonder if it is possible to keep the navigation dots filled (using the outertheme miniframes or smoothbars) once I've passed that slide.

An example (I've picked the Frankfurt theme at random, any other theme will do):

\documentclass{beamer}
\usetheme{Frankfurt}
\useoutertheme{miniframes}
\usepackage{remreset}

\makeatletter
\@removefromreset{subsection}{section}
\makeatother

\setcounter{subsection}{1}

\begin{document}
\section{Test}
\frame{one}
\frame{two}
\frame{three}
\end{document}

As you can see, in the first slide the first dot is full while the others are blank, in the second one the middle dot is full, on the last slide the last dot is full.

I would like the first slide to have the first dot full, the second one to have the first two dots full, etc..

  • Do you mean like a progress bar? – percusse Jul 10 '13 at 11:25
  • I've edited my questions and made myself clearer (I hope). – uldi Jul 10 '13 at 12:01
6

To highlight all the mini frames of slides already seen, you can use the following code:

\documentclass[compress]{beamer}

\usetheme{Ilmenau}

\makeatletter
\def\slideentry#1#2#3#4#5#6{%
  %section number, subsection number, slide number, first/last frame, page number, part number
  \ifnum#6=\c@part\ifnum#2>0\ifnum#3>0%
    \ifbeamer@compress%
      \advance\beamer@xpos by1\relax%
    \else%
      \beamer@xpos=#3\relax%
      \beamer@ypos=#2\relax%
    \fi%
  \hbox to 0pt{%
    \beamer@tempdim=-\beamer@vboxoffset%
    \advance\beamer@tempdim by-\beamer@boxsize%
    \multiply\beamer@tempdim by\beamer@ypos%
    \advance\beamer@tempdim by -.05cm%
    \raise\beamer@tempdim\hbox{%
      \beamer@tempdim=\beamer@boxsize%
      \multiply\beamer@tempdim by\beamer@xpos%
      \advance\beamer@tempdim by -\beamer@boxsize%
      \advance\beamer@tempdim by 1pt%
      \kern\beamer@tempdim
      \global\beamer@section@min@dim\beamer@tempdim
      \hbox{\beamer@link(#4){%
          \usebeamerfont{mini frame}%
          \ifnum\c@section>#1%
            %\usebeamercolor[fg]{mini frame}%
            %\usebeamertemplate{mini frame}%
            \usebeamercolor{mini frame}%
            \usebeamertemplate{mini frame in other subsection}%
          \else%
            \ifnum\c@section=#1%
              \ifnum\c@subsection>#2%
                \usebeamercolor[fg]{mini frame}%
                \usebeamertemplate{mini frame}%
              \else%
                \ifnum\c@subsection=#2%
                  \usebeamercolor[fg]{mini frame}%
                  \ifnum\c@subsectionslide<#3%
                    \usebeamertemplate{mini frame in current subsection}%
                  \else%
                    \usebeamertemplate{mini frame}%
                  \fi%
                \else%
                  \usebeamercolor{mini frame}%
                  \usebeamertemplate{mini frame in other subsection}%
                \fi%
              \fi%
            \else%
              \usebeamercolor{mini frame}%
              \usebeamertemplate{mini frame in other subsection}%
            \fi%
          \fi%
        }}}\hskip-10cm plus 1fil%
  }\fi\fi%
  \else%
  \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
  \fi\ignorespaces
  }
\makeatother

\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}
\subsection{Subsection 2}
\frame{}\frame{}
\section{Section 2}
\subsection{Subsection 1}
\frame{}
\subsection{Subsection 2}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\section{Section 3}
\subsection{Subsection 1}
\frame{}\frame{}\frame{}\frame{}\frame{}\frame{}
\end{document}

Result

mini frames navigation, with highlighted mini frames for slides already presented (only in current section)

Explanation

The question is very similar to Beamer: how to change the mini frames coloring: You have to rewrite the internal macro \slideentry responsible for generating the mini frames so that it checks whether the mini frame which is currently produced was already presented or not. This is achieved by a series of conditional statements in ll. 29-56.

  • This works just fine and it does exactly what I've asked. Is it possible to tweak it a little bit more, such that the highlighted dots are only the ones referring to the section I'm actually seeing? Referring to your example result just the dots under Section 2 would be highlighted and the ones under Section 1 and 3 would be equally blank. – uldi Jul 10 '13 at 18:37
  • @uldi Sure, no problem, you just have to adapt l. 30 f. of the example. I updated the answer accordingly :-) – diabonas Jul 10 '13 at 19:14
  • Your new code behaves a little funny now: this is the output I get !Example. – uldi Jul 11 '13 at 8:15
  • @uldi I'm very sorry, I somehow confused the code in my update :-( The latest version should work correctly and match the headline displayed in the image. – diabonas Jul 11 '13 at 13:30

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.