This is an alternative approach that tries to embed the actual mini frame navigation from the Frankfurt theme into the Cambridge theme. It requires major surgery and I'd suggest to make a custom theme with it.
First we need to set the miniframes color, I picked the darkred
color from the beaver
theme to match the rest of the theme.
\setbeamercolor{mini frame}{fg=darkred}
Now the tricky part: we are going to take the code from \insertsubsectionnavigationhorizontal
, remove its own \slideentry
macro and add the one taken from the beamerbasenavigation.sty
file. Since my etoolbox
fu is not good enough I'll just post the whole modified \slideentry
. For code readability etc. this should be placed in another file or done with etoolbox
.
\def\insertsubsectionnavigationhorizontal#1#2#3{%
\hbox to #1{{%
\usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}
\beamer@currentsubsection=0%
\def\sectionentry##1##2##3##4##5{}%
\def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
\ifnum##2>\beamer@currentsubsection%
\box\beamer@sectionbox\hskip1.875ex plus1fill%
\hbox to 0pt{%
\global\beamer@section@min@dim\beamer@tempdim
\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\fi\ignorespaces
}%
#2\hskip.3cm\setbox\beamer@sectionbox=\hbox{}%
\hskip-1.875ex plus-1fill\dohead%
\box\beamer@sectionbox\hfil\hskip.3cm%
#3
}}
}
The last step is to re-set the headline template so that it calls our customized horizontal miniframes navigation:
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}\bfseries\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}\setbeamercolor{section in head/foot}{fg=black,bg=white}
\vspace*{.01cm}\insertsubsectionnavigationhorizontal{0cm}{\hskip-.1cm}{}
\end{beamercolorbox}}%
\vskip0pt%
}
Result.
It works exactly as the Frankfurt miniframe nav. since it actually is the Frankfurt miniframe nav.
Full MWE.
\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamercolor{mini frame}{fg=darkred}
\makeatletter
\def\insertsubsectionnavigationhorizontal#1#2#3{%
\hbox to #1{{%
\usebeamerfont{subsection in head/foot}\usebeamercolor[fg]{subsection in head/foot}
\beamer@currentsubsection=0%
\def\sectionentry##1##2##3##4##5{}%
\def\slideentry##1##2##3##4##5##6{\ifnum##6=\c@part\ifnum##1=\c@section%
\ifnum##2>\beamer@currentsubsection%
\box\beamer@sectionbox\hskip1.875ex plus1fill%
\hbox to 0pt{%
\global\beamer@section@min@dim\beamer@tempdim
\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\fi\ignorespaces
}%
#2\hskip.3cm\setbox\beamer@sectionbox=\hbox{}%
\hskip-1.875ex plus-1fill\dohead%
\box\beamer@sectionbox\hfil\hskip.3cm%
#3
}}
}
\makeatother
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,right]{section in head/foot}%
\usebeamerfont{section in head/foot}\bfseries\insertsectionhead\hspace*{2ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,left]{subsection in head/foot}%
\usebeamerfont{subsection in head/foot}\setbeamercolor{section in head/foot}{fg=black,bg=white}
\vspace*{.01cm}\insertsubsectionnavigationhorizontal{1cm}{\hskip-.1cm}{}
\end{beamercolorbox}}%
\vskip0pt%
}
\begin{document}
\section{Section 1}
\subsection{Subsection1}
\frame{S1s1f1}
\frame{S1s1f2}
\subsection{Subsection2}
\frame{S1s2}
\subsection{Subsection3}
\frame{S1s3}
\section{Section 2}
\subsection{Subsection1}
\frame{S2s1}
\subsection{Subsection2}
\frame{S2s2}
\subsection{Subsection3}
\frame{S2s3}
\subsection{Subsection4}
\frame{S2s4}
\end{document}
