1

I am trying to modify the Montpellier theme to match my Institutions colors, insert the logo etc. This is how I customize the footer with the desired colors/information:

\setbeamertemplate{footline}
{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{footlinecolor}%{author in head/foot}%
 \usebeamerfont{author in head/foot}\insertauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{footlinecolor1}%{title in head/foot}%
 \usebeamerfont{title in head/foot}\insertshortdate
 \end{beamercolorbox}%
 \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{footlinecolor1}%{date in head/foot}%
  \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
 \end{beamercolorbox}}%
 \vskip0pt%
 }
 \makeatother

Now I need to do something similar with the header but I can't seem to find the source code to modify it. I want to keep the nice tree structure of the Montpellier theme but add my Institution logo on the right, and change all the colors. Any help is really appreciated!

1

You can find the source code of the headline in beamerouterthemetree.sty, but if you just want to change the colours, add a logo and similar, you don't need the source code.

\documentclass{beamer}

\useoutertheme{infolines}
\usetheme{Montpellier}
\setbeamertemplate{footline}[infolines]

\setbeamercolor{footlinecolor}{fg=black, bg=blue!50!white}
\setbeamercolor{footlinecolor1}{fg=black, bg=blue!20!white}

%%% Footline %%%
\setbeamercolor{title in head/foot}{parent=footlinecolor}
\setbeamercolor{author in head/foot}{parent=footlinecolor1}
\setbeamercolor{date in head/foot}{parent=footlinecolor1}

%%%% headline %%%%
\setbeamercolor{section in head/foot}{bg=green}
\setbeamercolor{subsection in head/foot}{bg=yellow}
\setbeamercolor{separation line}{bg=red}

%%% Logo
\usepackage{tikz}
\addtobeamertemplate{headline}{}{%
\begin{tikzpicture}[remember picture,overlay]
\node at([shift={(5.5,-.6)}]current page.north) {\includegraphics[height=.8\headheight]{example-image}};
\end{tikzpicture}}

\begin{document}

\section{bla}
\begin{frame}
test
\end{frame}
\end{document}

enter image description here


With black background:

enter image description here

  • As I said, I also want to add a logo on the top right, modify spacings and add a custom centered title in some of the pages (which I do in the /makeatletter environment). Thank you for the hint of where to find the code. I will provide comments of the outcome! – ronwelty Apr 18 '17 at 16:12
  • That worked great, thank you so much! The only problem is that by using a black background for the beamercolorbox, white lines appear in-between them making the whole think look very ugly. I don't seem able to take those out. Any ideas? !imgur.com/a/cOe7Z – ronwelty Apr 18 '17 at 17:14
  • @ronwelty I don't see any black lines. Try with another pdf viewer. If this does not help: Can you make a minimal working example (MWE) and ask a question about it? – user36296 Apr 18 '17 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.