[Tex/LaTex] How to insert text into the footline of a specific slide in Beamer


I'm trying to insert references into a beamer footline. These references are different for each slide, so I cannot include them in the footline template – unless there is then some way to later define them per-slide.

I have tried to simply include the after a \vfill, but the location of the line then varies with each slide, and this is not what I want.

How do I insert references (or really, just any custom text) into the footline of a specific slide in beamer?

Best Answer

This provides a new template/font/color footline extra and a macro \footlineextra to add text to the footline.

\title{Adding extra text to footline}
\institute{University of St. Anford}

\useoutertheme{infolines}% for example, ymmv

% add a macro that saves its argument

% add a beamer template that sets the saved argument in a box.
% The * means that the beamer font and color "footline extra" are automatically added. 
\defbeamertemplate*{footline extra}{default}{
    \begin{beamercolorbox}[ht=2.25ex,dp=1ex,leftskip=\Gm@lmargin]{footline extra}

    % set the box with the extra footline material but make it add no vertical space
    \setbox\footlineextrabox=\vbox{\usebeamertemplate*{footline extra}}
    \vskip -\ht\footlineextrabox
    \vskip -\dp\footlineextrabox

% patch \begin{frame} to reset the footline extra material

\setbeamercolor{footline extra}{fg=structure.fg}% for instance



\item one
\item two
\item three
\footlineextra{Source: ``Mr. Lee'' by the Bobbettes}

\item Able
\item Baker
\item Charlie
\footlineextra{Source: \emph{What do People Do All Day?} by Richard Scarry}

No footlineextra here


Having spent an hour on this I must quit but a nice addition would be to make \footlineextra overlay-specification aware.

Related Question