# How to add the source of the current page to the footer in a beamer theme?

So, I am using the beamer-theme metropolis (if that matters), that has only the slide number in the footer by default. I added the author with the following:

\usetheme{metropolis}
\setbeamertemplate{frame footer}{\insertshortauthor~(\insertshortinstitute)}


Additionally, I would like to add the source of the data that I am showing on the slides. Currently I am working with this solution (Best way to give sources of images used in a beamer presentation):

\newcommand{\source}[1]{\begin{textblock*}{4cm}(8.7cm,8.6cm)
\begin{beamercolorbox}[ht=0.5cm,right]{framesource}
\usebeamerfont{framesource}\usebeamercolor[fg]{framesource} Source: {#1}
\end{beamercolorbox}
\end{textblock*}}


It's quite nice, but I'd like the source to appear in the footer. A work-around could be to change \setbeamertemplate{frame footer}{...} on every page as suggested here: https://stackoverflow.com/questions/3103989/how-do-i-change-the-footer-footline-of-a-single-frame-in-beamer

{ % these braces make the change local to the single frame
\begin{frame}[t]{Frame 2}
B
\end{frame}
}


But I would like to have a command like \source{} that I can add within a frame and that adds the text to the footer. Anyone knows a solution?

Here is a full MWE with the default theme:

\documentclass{beamer}

\usetheme{default}
\author{Jane Doe}

\usepackage[absolute,overlay]{textpos}
\setbeamercolor{framesource}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}

%Standard footer definition:
\setbeamertemplate{footline}[text line]{%
\parbox{\linewidth}{\vspace*{-8pt}some text\hfill\insertshortauthor\hfill\insertpagenumber}}

%Source definition
\newcommand{\source}[1]{\begin{textblock*}{4cm}(8.7cm,8.6cm)
\begin{beamercolorbox}[ht=0.5cm,right]{framesource}
\usebeamerfont{framesource}\usebeamercolor[fg]{framesource} Source: {#1}
\end{beamercolorbox}
\end{textblock*}}

\begin{document}

\begin{frame}{Standard frame}
Test
\end{frame}

\begin{frame}{Frame with source}
Test
\source{Jane et. al (2019)}
\end{frame}

{ % these braces make the change local to the single frame
\setbeamertemplate{footline}[text line]{%
\parbox{\linewidth}{\vspace*{-8pt}Here I want my data source to appear, but automatically !\hfill\insertshortauthor\hfill\insertpagenumber}}
Test
\end{frame}
}

\end{document}


The last frame is what I want to achieve, but with the code of the frame before.

Instead of modifying the footline for every frame, I would place such information in a footnote. This way you can also use bibliography tools, for example \footcite from biblatex to generate the information automatically.

\documentclass{beamer}

\usetheme{metropolis}
\author{Jane Doe}
\setbeamertemplate{frame footer}{some text\hfill\insertshortauthor}
\renewcommand{\footnoterule}{}
\setbeamercolor{framesource}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}

\defbeamertemplate{footnote}{unnumbered}{%
\usebeamercolor[fg]{framesource}%
\usebeamerfont{framesource}%
\hfill\insertfootnotetext%
}

\newcommand{\source}[1]{%
\setbeamertemplate{footnote}[unnumbered]%
\footnotetext{Source: #1}%
}

\begin{document}

\begin{frame}{Standard frame}
Test
\end{frame}

\begin{frame}{Frame with source}
Test
\source{Jane et. al (2019)}
\end{frame}

\end{document}


• Thank you very much for taking your time to find a solution for my problem. It was not quite what I was looking for, but your idea of using \footnote{} inspired my to find another solution. I edit the initial question and add my solution. – Felix Phl Jan 21 at 14:26
• thank you for reminding me, I posted it as an answer – Felix Phl Jan 21 at 14:43

Being inspired by samcarter I found a solution that uses footnotes. It's quite what I was looking for, the only disadvantage is that I have to suppress the navigation symbols on the title and section pages as well as the "outstanding frames" of the metropolis theme, but maybe there are solutions available to suppress them automatically.

\documentclass{beamer}

\usetheme[progressbar=frametitle]{metropolis}
\author{Jane Doe}
\title{Dummy title}

\setbeamertemplate{footline}{}
\setbeamercolor{framesource}{fg=gray}
\setbeamercolor{footnote}{fg=gray}
\setbeamerfont{framesource}{size=\tiny}
\setbeamerfont{footnote}{size=\tiny}
\renewcommand{\footnoterule}{}

%Standard footer definition:
\parbox{10cm}{
\textcolor{gray}{\rule{10cm}{.4pt}}\newline
\vskip1pt
\textcolor{gray}{%
\tiny
}
\vskip3pt
}
}

%New command for footnotes without counter
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\endgroup
}

\begin{document}

\begingroup
\maketitle
\endgroup

\begin{frame}{Standard frame}
Test  \blfootnote{that's pretty much what I am looking for}
\end{frame}

\end{document}