[Tex/LaTex] Footer in Beamer

beamerformattingheader-footer

I found in this related topic Add Footer Text to All Slides in Beamer a nice code for footer in beamer with the Frankfurt theme.

\setbeamertemplate{footline}[text line]{%
\parbox{\linewidth}{\vspace*{-8pt}some text\hfill\insertshortauthor\hfill\insertpagenumber}}
\setbeamertemplate{navigation symbols}{}

That is exactly what I need. But when I add it to my presentation I lost default "navigation" icons.

So my questions are:

  • Is it possible to have footer with these icons?
  • How to change background color of this footer?

Thank you very much!

Best Answer

In this case, I propose you a more sophisticated definition for the footline template:

\documentclass{beamer}
\usetheme{Frankfurt}

\newcommand\mytext{some text}

\makeatother
\setbeamertemplate{footline}
{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{author in head/foot}%
  \mytext
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor\hfill\insertpagenumber
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatletter

\author[JD]{John Doe}

\begin{document}

\begin{frame}
Test
\end{frame}

\end{document}

enter image description here

I used two beamercolorboxes (one for the additional text, the other one for the short author and page number) to give you the possibility to customize each one separately, but of course, you could only use one and distribute the information to suit your needs.

To change the color used for the beamerboxes, set a beamer color and then use it in the mandatory argument for beamercolorbox; for example:

\documentclass{beamer}
\usetheme{Frankfurt}

\setbeamercolor{footlinecolor}{bg=black!70,fg=white}

\newcommand\mytext{some text}

\makeatother
\setbeamertemplate{footline}
{%
  \leavevmode%
  \hbox{\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm]{footlinecolor}%
  \mytext
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{footlinecolor}%
    \usebeamerfont{author in head/foot}\insertshortauthor\hfill\insertpagenumber
  \end{beamercolorbox}}%
  \vskip0pt%
}
\makeatletter

\author[JD]{John Doe}

\begin{document}

\begin{frame}
Test
\end{frame}

\end{document}

enter image description here