[Tex/LaTex] Customize beamer template to vary field for each slide

beamer

I would like to use the lower left corner normally reserved for "author (institution)" (I am using the Boadilla template) to include additional text (like references/sources for figures) specific to that slide. Is this easy to customize? If so… how can I go about changing that for individual slides?

Best Answer

In the following example I defined a \MyText command which simply redefines de footline template by putting the argument in the field reserved for short author and institution. You have to use the command before the \begin{frame} command and use some grouping mechanism (\begingroup, \endgroup, for example) to keep the change local:

\documentclass{beamer}
\usetheme{Boadilla}

\author{The author}
\institute{The Institute}
\title{The date}

\makeatletter
\newcommand\MyInfo[1]{%
\setbeamertemplate{footline}
{
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}#1
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
      \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{date in head/foot}%
    \usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex} 
  \end{beamercolorbox}}%
  \vskip0pt%
}
}
\makeatother

\begin{document}

\begingroup
\MyInfo{Some text}
\begin{frame}
\frametitle{A frame with modified footline}
Test frame
\end{frame}
\endgroup

\begin{frame}
\frametitle{A frame with standard footline}
Test frame
\end{frame}

\begingroup
\MyInfo{Some other text}
\begin{frame}
\frametitle{Another frame with modified footline}
Test frame
\end{frame}
\endgroup

\end{document}