35

I'm making a beamer presentation using the miniframes outer theme, with navigation bullets, and the subsection=false option, meaning the bullets are all on a single row. The problem I have is that, if one section has too many pages, the bullets overflow to the next section:

Section 1 Section 2
oooooooooooooooooooo

I tend to have many frames, some of them just asking a question, leading to the next detailed frame. I don't really need those frames to be represented by navigation bullets, and removing them would fix the problem. Any idea how to do that?

I could cheat by using overlays to have the question and the answer on the same frame, but that would be a mess...

Code example to answer percusse's question: this should give you one circle per frame, not one per subsection. If you add many frames in one subsection, the circles will overflow over the next section.

\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}
\begin{document}
\section{S1}
\subsection{SS1}
\frame{1}
\frame{2}
\frame{3}
\subsection{SS2}
\frame{1}
\frame{2}
\frame{3}
...
\end{document}
  • I am still trying to get the problem. When I put everything inside a subsection there is no circle added due to the frames. I get only one circle per subsection and the frame number doesn't change it. Can you include a small compilable MWE? – percusse Dec 6 '11 at 21:09
  • I edited the question to include an example – Alexis L. Dec 6 '11 at 23:16
37

The mini frames are generated using the \beamer@framepages entries in the auxiliary .nav file. If you remove these for certain frames, they don't appear in the navigation1. To do so, you have to patch the \beamer@writeslidentry macro responsible for writing the commands to the .nav file:

\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry
\def\beamer@writeslidentry@miniframesoff{%
  \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
  {%else
    % removed \addtocontents commands
    \clearpage\beamer@notesactions%
  }
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\makeatother

Include this code in your document, then you can switch between the original implementation and the modified one not generating any mini frames by using \miniframeson and \miniframesoff.

1This may, however, have some unwanted consequences I'm not aware of!

Full example code:

\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}
\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry
\def\beamer@writeslidentry@miniframesoff{%
  \expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
  {%else
    % removed \addtocontents commands
    \clearpage\beamer@notesactions%
  }
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\makeatother
\begin{document}
\section{S1}
\subsection{SS1}
\frame{1}
\miniframesoff
\frame{2}
\miniframeson
\frame{3}
\subsection{SS2}
\miniframesoff
\frame{1}
\miniframeson
\frame{2}
\frame{3}
\end{document}

Resulting headline (only four of six mini frames are displayed):

headline produced by the example code, showing only four (of originally six) mini frames

  • 2
    Note that this only works when you enable the compress option. Otherwise, the miniframes will still take up space. – Tim van Dalen Mar 20 '15 at 20:24
  • @TimvanDalen, what do you mean that the miniframes will still take up space? I tried it without the compress option and it seemed to work fine for me. – nukeguy Mar 31 '17 at 18:41
  • One small issue with this approach is that the navigation bullets are all empty/open (similar to the appearance on a title slide that is inserted before the first section). It would have been nice if the last 'active' bullet would remain filled until the bullets are switched back on. – Marijn Jun 12 at 11:00

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.