0

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
    \setbeamertemplate{footline}{boo \insertframenumber}
    \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}
\beamertemplatenavigationsymbolsempty
\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}}
\begin{frame}{Frame with adjusted footer}
    Test
\end{frame}
}

\end{document}

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

3

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}

enter image description here

  • 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
  • 3
    @FelixPhl Please don't put your solution into the question, but write your own answer instead – user36296 Jan 21 at 14:29
  • thank you for reminding me, I posted it as an answer – Felix Phl Jan 21 at 14:43
1

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:
\setbeamertemplate{navigation symbols}{
    \parbox{10cm}{
    \textcolor{gray}{\rule{10cm}{.4pt}}\newline
    \vskip1pt
    \textcolor{gray}{%
        \tiny
        \hfill \insertshortauthor~\vline~\inserttitle~\vline~Folie~\insertframenumber\quad
        }
    \vskip3pt
    }
}

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


\begin{document}

\begingroup
\setbeamertemplate{navigation symbols}{}
\maketitle
\endgroup

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

\end{document}

solution

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.