You can set the headline
template appropriately. The separation line
color allows you to define the background color for the new bar; I set it to myred
, where I used
\definecolor{myred}{RGB}{225,0,76}
Of course, use the color that best suits your needs. I also defined a \Ulogo
command that allows you to introduce the University logo centered in this bar; the usage of this command is similar to that of \titlegraphic
:
\Ulogo{\includegraphics[height=2ex,width=3cm]{<image file>}}
A complete example (since no information was provided about dimensions of the new bar and position of the logo, I used some sensible values, but you can change those according to your needs):
\documentclass{beamer}
\beamertemplatenavigationsymbolsempty
\mode<presentation>
{
\usetheme{dshsbeamer}
\setbeamercovered{transparent}
\setbeamertemplate{items}[circle]
}
\usepackage{fontspec}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}
% color definitions
\usepackage{xcolor}
\definecolor{spohoblue}{RGB}{0, 83, 146}
\definecolor{black}{RGB}{0, 0, 0}
\definecolor{myred}{RGB}{225,0,76}
\setbeamercolor{separation line}{bg=myred}
\newcommand\Ulogo[1]{\def\insertUlogo{#1}}
\makeatletter
\setbeamertemplate{headline}
{
\@tempdima=\textwidth%
\advance\@tempdima by\beamer@leftmargin%
\advance\@tempdima by\beamer@rightmargin%
\begin{beamercolorbox}[colsep=1.5pt,wd=\the\@tempdima,ht=4ex,dp=0ex]{separation line}
\vbox{}\vskip-10pt
\hfill\insertUlogo\hfill\null
\vskip0.5ex
\end{beamercolorbox}%
}
\makeatother
\title[Short title]{An unofficial beamer template for the German Sport University Cologne}
\author[Short author]{Magnus Metz}
\institute[The Institute of Advanced Study]
{Institute of Sport Economics and Sport Management \\
German Sport University Cologne \\
}
\Ulogo{\includegraphics[height=2ex,width=3cm]{example-image-a}}
\date{\today}
\begin{document}
\begin{frame}
\frametitle{First slide}
A test frame
\end{frame}
\end{document}
Add the following to your preamble.
\definecolor{lightgr}{rgb}{0.7 0.7 0.7}
\makeatletter
\newcount\beamer@sectionstartframe
\newcount\beamer@sectionendframe
\beamer@sectionstartframe=1
\apptocmd{\beamer@section}{\addtocontents{nav}{\protect\headcommand{%
\protect\beamer@sectionframes{\the\beamer@sectionstartframe}{\the\c@framenumber}}}}{}{}
\apptocmd{\beamer@section}{\beamer@sectionstartframe=\c@framenumber\advance\beamer@sectionstartframe by1\relax}{}{}
\AtEndDocument{\immediate\write\@auxout{\string\@writefile{nav}%
{\noexpand\headcommand{\noexpand\beamer@sectionframes{\the\beamer@sectionstartframe}{\the\c@framenumber}}}}}{}{}
\def\beamer@startframeofsection{1}
\def\beamer@endframeofsection{1}
\def\beamer@sectionframes#1#2{%
\ifnum\c@framenumber<#1%
\else%
\ifnum \c@framenumber>#2%
\else%
\gdef\beamer@startframeofsection{#1}%
\gdef\beamer@endframeofsection{#2}%
\fi%
\fi%
}
\newcommand\insertsectionstartframe{\beamer@startframeofsection}
\newcommand\insertsectionendframe{\beamer@endframeofsection}
\def\beamertextwidth{\dimexpr 0.875 \textwidth\relax}
\makeatother
\addtobeamertemplate{footline}{%
\color{lightgr}% to color the progressbar
\rlap{\rule{\numexpr (\insertframenumber-\insertsectionstartframe)+1 \dimexpr \beamertextwidth/(\insertsectionendframe -\insertsectionstartframe+1) \relax}{3pt}}%
}%
The above code should create a section progressbar in the footline of each slide. Note that the above code does work properly if you create new frames inside the AtBeginSection
environment.
Best Answer
The quickest fix seems to be finding the lines
in the first one and changing it to