beamer add tag
Dr. Manuel Kuehner
* This is a follow-up to [this comment](https://topanswers.xyz/transcript?room=347&id=138567&year=2022#c138567).
* I want to use the very nice looking `metropolis` beamer theme.
* With the help of user `samcarter`, I managed to create the following MWE.
* **Goal:** My goal is to have (only) the current section and subsection bold in the navigation (`\insertsectionnavigationhorizontal` and `\insertsubsectionnavigationhorizontal`). All other items should be normal (not bold).
* Currenty, it seems like all entries are bold (current and other).

![Screenshot 2022-04-12 202742.png](/image?hash=831bf791622438b1d46319d93edc486ed51494f4f1922bab30fc687d7f39f197)

--- --- 
    \documentclass{beamer}

    \usetheme[
    	background = dark
    ]{metropolis}

	\usepackage{noto}

    % @samcarter: \makeatletter does not seem to be needed.
    %\makeatletter
    \setbeamertemplate{headline}{%
      \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
      \end{beamercolorbox}
      \begin{beamercolorbox}{section in head/foot}
        \vskip1pt\strut \insertsectionnavigationhorizontal{\paperwidth}{}{} \vskip1pt % @samcarter: I inserted \strut to reserve the space for a fill line width
        \vskip1pt\strut \insertsubsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll} \vskip3pt
      \end{beamercolorbox}%
      \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
      \end{beamercolorbox}
    }
    %\makeatother

	% My attempts to make it happen
    % ---
    \setbeamerfont{section in head/foot}{family=\bfseries}
    \setbeamerfont{section in head/foot shaded}{}

    \setbeamerfont{subsection in head/foot}{family=\bfseries}
    \setbeamerfont{subsection in head/foot shaded}{}

    \setbeamercolor{section in head/foot}{bg=normal text.bg, fg=structure.fg}
    \setbeamercolor{subsection in head/foot}{bg=normal text.bg, fg=structure.fg}
     % ---

    \begin{document}

    \section{section 1}
    \subsection{subsection}
    \begin{frame}
    \frametitle{blub}
        abc
    \end{frame} 
    \begin{frame}
    \frametitle{blub}
        abc
    \end{frame} 

    \section{section 2}
    \subsection{subsection 1}
    \begin{frame}
    \frametitle{blub}
        abc
    \end{frame} 

    \subsection{subsection 2}
    \begin{frame}
    \frametitle{blub}
        abc
    \end{frame} 

    \section{section 3}
    \begin{frame}
    \frametitle{blub}
        abc
    \end{frame}     

    \end{document}
Top Answer
samcarter
By default, beamer does not have separate font templates for the current and inactive (sub-)sections, but you can add them like this:


```
\documentclass{beamer}

\usetheme[
	background = dark
]{moloch}% modern fork of the metropolis theme

\usepackage{noto}

% @samcarter: \makeatletter does not seem to be needed.
%\makeatletter
\setbeamertemplate{headline}{%
  \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
  \end{beamercolorbox}
  \begin{beamercolorbox}{section in head/foot}
    \vskip1pt\strut \insertsectionnavigationhorizontal{\paperwidth}{}{} \vskip1pt % @samcarter: I inserted \strut to reserve the space for a fill line width
    \vskip1pt\strut \insertsubsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll} \vskip3pt
  \end{beamercolorbox}%
  \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
  \end{beamercolorbox}
}
%\makeatother



\makeatletter
\def\sectionentry#1#2#3#4#5{% section number, section title, page
  \beamer@xpos=0\relax%
  \beamer@ypos=1\relax%
  \beamer@ypos@offset=0\relax%
  \ifnum#5=\c@part%
  \beamer@section@set@min@width%
  \box\beamer@sectionbox\hskip1.875ex plus 1fill%
  \setbox\beamer@sectionbox=
  \hbox{\def\insertsectionhead{#2}%
    \def\insertsectionheadnumber{#1}%
    \def\insertpartheadnumber{#5}%
    {%
%      \usebeamerfont{section in head/foot}
      \usebeamercolor[fg]{section in head/foot}%
      \ifnum\c@section=#1%
        \usebeamerfont{section in head/foot}%
        \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot}}}%
      \else%
        \usebeamerfont{section in head/foot shaded}%
        \hyperlink{Navigation#3}{{\usebeamertemplate{section in head/foot shaded}}}%
      \fi}%
  }%
  \ht\beamer@sectionbox=1.875ex%
  \dp\beamer@sectionbox=0.75ex%
  \fi\ignorespaces}
  
\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%
      \beamer@currentsubsection=##2%
      \box\beamer@sectionbox\hskip1.875ex plus1fill%
      \setbox\beamer@sectionbox=
      \hbox{\def\insertsubsectionhead{##5}%
         \def\insertsectionheadnumber{##1}%
         \def\insertsubsectionheadnumber{##2}%
         \def\insertpartheadnumber{##6}%
         \ifnum\c@subsection=##2%
        \beamer@link(##4){{\usebeamerfont{subsection in head/foot}\usebeamertemplate{subsection in head/foot}}}\else%
        \beamer@link(##4){{\usebeamerfont{subsection in head/foot shaded}\usebeamertemplate{subsection in head/foot shaded}}}\fi}%
      \ht\beamer@sectionbox=1.875ex%
      \dp\beamer@sectionbox=0.75ex%
      \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

% My attempts to make it happen
% ---
\setbeamerfont{section in head/foot}{series=\bfseries}
\setbeamerfont{section in head/foot shaded}{series=\normalfont}

\setbeamerfont{subsection in head/foot}{series=\bfseries}
\setbeamerfont{subsection in head/foot shaded}{series=\normalfont}

\setbeamercolor{section in head/foot}{bg=normal text.bg, fg=structure.fg}
\setbeamercolor{subsection in head/foot}{bg=normal text.bg, fg=structure.fg}
 % ---

\begin{document}

\section{section 1}
\subsection{subsection}
\begin{frame}
\frametitle{blub}
    abc
\end{frame} 
\begin{frame}
\frametitle{blub}
    abc
\end{frame} 

\section{section 2}
\subsection{subsection 1}
\begin{frame}
\frametitle{blub}
    abc
\end{frame} 

\subsection{subsection 2}
\begin{frame}
\frametitle{blub}
    abc test
\end{frame} 

\section{section 3}
\begin{frame}
\frametitle{blub}
    abc
\end{frame}     

\end{document}
```

![Screenshot 2022-04-13 at 14.23.36.png](/image?hash=be7a556060931b192c00799771a957e4f2dabbaea291fa38f5ef2a9b86d4b371)

(instead of redefining the macros, one could also patch them, but given that changes need to be made a several different places, I think redefining makes it easier to see what's going on)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.