Use beamertemplate for footer

Added possibility to add a custom footer. Usage is shown in the demo slide deck.
This commit is contained in:
davidcorteso 2015-12-21 00:25:09 +00:00 committed by Matthias Vogelgesang
parent 81adcb6a8f
commit 1b0699893d
2 changed files with 17 additions and 3 deletions

View File

@ -17,7 +17,7 @@
\date{\today}
\author{Matthias Vogelgesang}
\institute{Center for modern beamer themes}
% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo/logo}}
\titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}}
\begin{document}
@ -66,7 +66,7 @@
\end{frame}
{
\metroset{titleformat frame=smallcaps}
\metroset{titleformat frame=smallcaps}
\begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} titleformat.
@ -281,6 +281,14 @@ or show \textbf{bold} results.\end{verbatim}
\end{quote}
\end{frame}
{%
\setbeamertemplate{frame footer}{My custom footer}
\begin{frame}[fragile]{Frame footer}
\themename defines a custom beamer template to add a text to the footer. It can be set via
\begin{verbatim}\setbeamertemplate{frame footer}{My custom footer}\end{verbatim}
\end{frame}
}
\begin{frame}{References}
Some references to showcase [allowframebreaks] \cite{knuth92,ConcreteMath,Simpson,Er01,greenwade93}
\end{frame}

View File

@ -116,6 +116,11 @@
% Templates for the frame number. Can be omitted, shown or displayed as a
% fraction of the total frames.
% \begin{macrocode}
\defbeamertemplate{frame footer}{none}{}
\defbeamertemplate{frame footer}{custom}[1]{ #1 }
% \end{macrocode}
%
% \begin{macrocode}
\defbeamertemplate{frame numbering}{none}{}
\defbeamertemplate{frame numbering}{counter}{\insertframenumber}
\defbeamertemplate{frame numbering}{fraction}{
@ -131,8 +136,9 @@
\defbeamertemplate{headline}{plain}{}
\defbeamertemplate{footline}{plain}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\hfill%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}