Added option to change the footer of the slides

This commit is contained in:
davidcorteso 2015-12-21 00:25:09 +00:00
parent fe28e21fcb
commit a07d069d49
3 changed files with 35 additions and 2 deletions

View File

@ -20,6 +20,9 @@
\begin{document}
% Set a custom footer text for all the slides
\metroset{footer={custom=My footer}}
\maketitle
\begin{frame}{Table of contents}
@ -65,7 +68,7 @@
\end{frame}
{
\metroset{titleformat frame=smallcaps}
\metroset{titleformat frame=smallcaps}
\begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} titleformat.

View File

@ -367,6 +367,10 @@ option on every sub-package accordingly.
}
\subsubsection{Outer theme}
\DescribeOption{footer}{none, custom}{none}{
In the bottom left corner of each frame, a frame footer text (the section name by default) can be
displayed using (|custom|). This can be set to any text as footer={custom=My text}
}
\DescribeOption{numbering}{none, counter, fraction}{counter}{
In the bottom right corner of each frame the current frame number is
displayed. This can be disabled or the total framenumber can be added

View File

@ -43,6 +43,25 @@
%
% \subsubsection{Options}
%
% \begin{macro}{footer}
% This option controls the page left footer text.
% The default custom footer is the section name.
% We can change it with:
% \metroset{footer={custom=Some text}}
% Maybe this is not the optimal solution, but it works for now
% A possible nice way to do it is using this
% \href{http://tex.stackexchange.com/questions/149982/how-do-i-pass-an-unknown-value-to-a-choice-key-in-pgfkeys}{solution}
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/footer/.cd,
.is choice,
none/.code=\setbeamertemplate{frame footer}[none],
custom/.code=\setbeamertemplate{frame footer}[custom]{#1},
custom/.default=\insertsection
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{numbering}
% This option controls the page numbering.
% \begin{macrocode}
@ -158,6 +177,11 @@
% 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}{
@ -169,8 +193,10 @@
\defbeamertemplate{headline}{plain}{}
\defbeamertemplate{footline}{plain}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\hfill%
\usebeamerfont{page number in head/foot}%
\makebox[0pt][l]{}
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}