How can I obtain something like this in beamer?
-
should there be any text in the blue bars?– samcarter_is_at_topanswers.xyzJan 2, 2019 at 15:34
-
@samcarter yes, there will be text in both of them– FlyBobJan 2, 2019 at 15:35
-
1Which text? It would be easier to know what the purpose of the blue bars is to choose the appropriate beamer template to modify.– samcarter_is_at_topanswers.xyzJan 2, 2019 at 15:37
-
@samcarter The the top bar I would like to put the slide title– FlyBobJan 2, 2019 at 15:50
-
At in the bottom one?– samcarter_is_at_topanswers.xyzJan 2, 2019 at 15:51
1 Answer
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}
-
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.– FlyBobJan 2, 2019 at 15:52