0

I want to change the color of the box in header containing the sections from white to the color of the word "Outline", and to change the color of the name of the sections in this box from red to be the color of the background of the frametitle. This is my current output

enter image description here

My code

\documentclass{beamer}
\mode<presentation>
{
  \usetheme{Madrid}      % or try Darmstadt, Madrid, Warsaw, ...
  \usecolortheme{beaver} % or try albatross, beaver, crane, ...
  \usefonttheme{serif}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
} 

 \usepackage[english]{babel}
 \usepackage[utf8x]{inputenc}
 \usepackage{xcolor}
 \usepackage{listings}
 \lstset
 {
 language=[LaTeX]TeX,
 breaklines=true,
 basicstyle=\tt\scriptsize,
 %commentstyle=\color{green}
 keywordstyle=\color{blue},
 %stringstyle=\color{black}
 identifierstyle=\color{magenta},
}

\title[latex in collaboration]{latex in collaboration}
\author{Alexandre Bernardino}
\institute{ISR/IST}
\date{March 9, 2015}

\AtBeginSection[]
 {
 \begin{frame}<beamer>
 \frametitle{Outline}
 \tableofcontents[currentsection,currentsubsection]
 \end{frame}
 }
 \makeatother
 \setbeamertemplate{footline}{\hspace*{.2cm}\scriptsize{\insertshorttitle
 \hspace*{3.5cm} \insertframenumber / \inserttotalframenumber}
 \vspace{4pt}} 
 \makeatletter
 \setbeamertemplate{navigation symbols}{}
  \makeatletter
  \setbeamertemplate{headline}{%
 \leavevmode%
 \hbox{%
 \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette 
   quaternary}%               
  \insertsectionnavigationhorizontal{\paperwidth}{}{}
  \end{beamercolorbox}%
  }
  }

 \makeatother
 \begin{document}

  \begin{frame}
  \titlepage
   \end{frame}

   % Uncomment these lines for an automatically generated outline.
   \begin{frame}{Outline}
    \tableofcontents
    \end{frame}

    \section{Introduction}
    \section{Some History}
    \section{First Steps}
     \section{\LaTeX{} Basics}

     \end{document}

Thank you in advance.

3
1

You can control the colours of the navigation bar with

\setbeamercolor{section in head/foot}{bg=gray!10!white, fg=gray!10!white}
\setbeamercolor{palette quaternary}{bg=darkred}

The first command changes the colour of the current section and the other sections, the second one the background colour.

MWE:

\documentclass{beamer}

\usetheme{Madrid}      
\usecolortheme{beaver} 
\setbeamercolor{section in head/foot}{bg=gray!10!white, fg=gray!10!white}
\setbeamercolor{palette quaternary}{bg=darkred}

\title[latex in collaboration]{latex in collaboration}
\author{Alexandre Bernardino}
\institute{ISR/IST}
\date{March 9, 2015}

\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex]{palette 
     quaternary}%               
            \insertsectionnavigationhorizontal{\paperwidth}{}{}
        \end{beamercolorbox}%
    }
}

\begin{document}

\begin{frame}
\titlepage
\end{frame}

\section{Introduction}
\begin{frame}
\frametitle{test}
content...
\end{frame}

\section{Some History}
\begin{frame}
content...
\end{frame}


\section{First Steps}
\begin{frame}
content...
\end{frame}

\section{\LaTeX{} Basics}

\begin{frame}
content...
\end{frame}

\end{document}

enter image description here

6
  • Thank you for your answer, but I want instead of orange, to have the color of the word "Outline", and instead of the blue to have the color of the background of the frametitle. In other word to reverse the colors of the navigation bar and the frametitle
    – Farah Mind
    Feb 20 '17 at 15:05
  • @FarahMind please see my edit Feb 20 '17 at 15:19
  • Thank you for you update. I think the colors are not the same, can't we get the exact colors used in the template
    – Farah Mind
    Feb 20 '17 at 15:25
  • @FarahMind Its the exact colour from beaver colour theme. Feb 20 '17 at 15:37
  • ok, now th problem is the current section, it is not highlighted in the navigation bar
    – Farah Mind
    Feb 20 '17 at 15:43

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.