2

I'm using the beamer miniframes theme (with subsection=false) and the compress option. Currently the navigation shows the dots for each subsection side-by-side. I would prefer if there would be a horizontal space (e.g. with the width of a dot) between the dots of each subsection. Is this possible?

Right now it looks like:

Section 1

oooooo

And I would prefer it to look like:

Section 1

ooo ooo

MWE:

\documentclass[compress]{beamer}  
\useoutertheme[subsection=false]{miniframes}  
\begin{document}  
\section{Sec 1}  
\subsection{}  
\begin{frame}[t]  
  hi  
\end{frame}
\subsection{}  
\begin{frame}[t]  
  hi  
\end{frame}
\end{document}`

1 Answer 1

4

You need to modify the definition of \slideentry. You can see this command in the .nav file. This file is used to generate the dots.

The original definition is in beamerbasenavigation.sty. I add only three lines: those contain %%%.

\documentclass[compress]{beamer}
\useoutertheme[subsection=false]{miniframes}

\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%
      \ifnum1=#3                        %%% NOTICE
        \advance\beamer@xpos by1\relax% %%% THESE
      \fi                               %%% LINE
    \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%
            \ifnum\c@subsection=#2%
              \usebeamercolor[fg]{mini frame}%
              \ifnum\c@subsectionslide=#3%
                \usebeamertemplate{mini frame}%\beamer@minislidehilight%
              \else%
                \usebeamertemplate{mini frame in current subsection}%\beamer@minisliderowhilight%
              \fi%
            \else%
              \usebeamercolor{mini frame}%
              %\color{fg!50!bg}%
              \usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
            \fi%
          \else%
            \usebeamercolor{mini frame}%
            %\color{fg!50!bg}%
            \usebeamertemplate{mini frame in other subsection}%\beamer@minislide%
          \fi%
        }}}\hskip-10cm plus 1fil%
  }\fi\fi%
  \else%
  \fakeslideentry{#1}{#2}{#3}{#4}{#5}{#6}%
  \fi\ignorespaces
}

\begin{document}
    \section{1}
        \subsection{1-1}
            \frame{}
            \frame{}
            \frame{}
        \subsection{1-2}
            \frame{}
            \frame{}
            \frame{}
        \subsection{1-3}
            \frame{}
            \frame{}
            \frame{}
    \section{2}
        \subsection{2-1}
            \frame{}
            \frame{}
            \frame{}
        \subsection{2-2}
            \frame{}
            \frame{}
            \frame{}
        \subsection{2-3}
            \frame{}
            \frame{}
            \frame{}
    \section{3}
        \subsection{3-1}
            \frame{}
            \frame{}
            \frame{}
        \subsection{3-2}
            \frame{}
            \frame{}
            \frame{}
        \subsection{3-3}
            \frame{}
            \frame{}
            \frame{}
\end{document}
3
  • 2
    The answer is almost perfect. I now understood the generation of the dots quite well. I just changed a little bit: \ifnum1=#3 %%% NOTICE \ifnum1=#2\else \advance\beamer@xpos by1\relax% %%% THESE \fi \fi %%% LINE to remove the white space before the dots of the very first subsection. Commented Jan 20, 2016 at 19:13
  • 1
    Slightly better: \ifnum#2>1\ifnum#3=1\advance\beamer@xpos by 1\relax\fi\fi.
    – Zxcvasdf
    Commented Feb 9, 2023 at 10:36
  • One addition: If there is a \AtBeginSubsection[] frame with disabled miniframe dots is present, the line \ifnum1=#3 must be changed to \ifnum2=#3 as the additional space must be placed on the second slide of each new subsection. Commented Feb 17 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .