I need to highlight specific entries of my beamer navigation according to highlighted entries within an overview figure. For this purpose, I need to redraw the navigation from within the frame environment. The problem: The current solution requires a manual adjustment of the alignment. What can be considered as hacky. A cleaner solution for the exact alignment at the original position would be highly appreciated. Big thx in advance for your ideas and suggestions!
\documentclass[t]{beamer}
\usetheme{Singapore}
\useoutertheme{miniframes}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\section{Section}
\subsection{Subsection}
\begin{frame}[c]
\frametitle{Title}
\framesubtitle{Subtitle}
%
\begin{beamerboxesrounded}[]{}
The intention is to redraw the navigation from \emph{within} the frame environment to e.\,g. allow highlights of specific sections. The problem: The current solution needs a manual adjustment of the alignment. What can be considered as hacky. A cleaner solution for the \emph{exact} alignment at the original position would be highly appreciated.
\end{beamerboxesrounded}
%
\begin{tikzpicture}[remember picture,overlay]%
{\node[anchor=north west,text width=\paperwidth] at ($(current page.north west) + (0ex,0ex)$) {%
\begin{beamercolorbox}[ignorebg,wd=\paperwidth]{section in head/foot}%
\usebeamerfont{headline}\insertnavigation{\paperwidth}%
\end{beamercolorbox}};}%
\end{tikzpicture}
%
\end{frame}
\end{document}
Best Answer
Partial solution
The following code reduces the manual spacing to only one dimension, but unless you use some technique like
\tikzmark
to actually record the position of the navigation bar, adjusting the spacing in vertical direction seems necessary, as the original navigation bar is not on the very top of the frame.The original definition of the headline in the miniframe theme is
As you can see, this definition includes
\vskip2pt
This space has to be somehow compensated.