0

How can I obtain something like this in beamer?

enter image description here

7
  • should there be any text in the blue bars? Jan 2, 2019 at 15:34
  • @samcarter yes, there will be text in both of them
    – FlyBob
    Jan 2, 2019 at 15:35
  • 1
    Which text? It would be easier to know what the purpose of the blue bars is to choose the appropriate beamer template to modify. Jan 2, 2019 at 15:37
  • @samcarter The the top bar I would like to put the slide title
    – FlyBob
    Jan 2, 2019 at 15:50
  • At in the bottom one? Jan 2, 2019 at 15:51

1 Answer 1

2

Some custom defined headline, frametitle and footline template to add blue lines:

\documentclass{beamer}

\setbeamercolor{frametitle}{bg=blue,fg=white}
\setbeamercolor{author in head/foot}{bg=blue,fg=white}

\makeatletter
\setbeamertemplate{headline}{%
    \usebeamercolor[bg]{frametitle}\rule{\textwidth}{1cm}
}

\setbeamertemplate{frametitle}{%
    \vskip-1cm%
      \begin{minipage}[c][\headheight][c]{\textwidth}%
        \usebeamerfont{frametitle}%
        \strut\insertframetitle\par
    {%
      \ifx\insertframesubtitle\@empty%
      \else%
      {\usebeamerfont{framesubtitle}\usebeamercolor[fg]{framesubtitle}\strut\insertframesubtitle\par}%
      \fi
    }%      
      \vspace*{-0.1cm}
      \end{minipage}%
  \vskip-0.1em
}
\setbeamertemplate{footline}{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=\paperwidth,ht=4.5ex,dp=3.125ex]{author in head/foot}%
    \usebeamerfont{author in head/foot} bar
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatother

\begin{document}

\begin{frame}[plain]
    \titlepage
\end{frame} 

\begin{frame}
    \frametitle{test}
    abc
\end{frame} 

\begin{frame}
    \frametitle{test}
    \framesubtitle{title}
    abc
\end{frame} 

\begin{frame}
    abc
\end{frame} 

\end{document}

enter image description here

1
  • Thank you. It's pretty the same of what I need but I would like to change the text in the top bar for every slide.
    – FlyBob
    Jan 2, 2019 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .