[Tex/LaTex] Beamer – place text of footnote in footline

beamerheader-footer

I must place footnotes and footcites at the bottom of the frames, like shown in the picture:

The line above the footnotes must always be there, and it must have a minimum distance to the bottom of lets say 2.5em.

So I see two possible solutions:

  1. Add the footnote via \setbeamertemplate to the footline.
  2. Change the format of the footnoteline and let it always appear, even if no footnote was used.

For the last hours, I tried to accomplish point 1, but I had absolutely no success. Can you please help me? Otherwise I have to use *whisper* Powerpoint. 😉


EDIT: Do you know the phenomenon that only after you ask someone, you can get the right ideas? 😉

Here is a MWE of my current solution:

\documentclass[xcolor={dvipsnames}]{beamer}

\usepackage[absolute, overlay]{textpos}
\usepackage{environ}


\usetheme{default}
\setbeamertemplate{navigation symbols}{}%remove navigation symbols


\newcommand{\makemyrule}{%
    \setlength{\unitlength}{14pt}%      minimum distance to bottom
    \ifdim\footnoteheight>\unitlength \setlength{\unitlength}{\footnoteheight} \fi%     check which distance is bigger
    \begin{textblock*}{\linewidth}(0pt,\dimexpr\textheight-\unitlength)%    place with use of textpos
        \textcolor{blue}{\rule{\paperwidth}{.3ex}}
    \end{textblock*}
}


\let\oldfootnote\footnote%      redefine the footnote command
\renewcommand{\footnote}[1]{\Addheight{#1}\oldfootnote{#1}}

\newlength{\footnoteheight}
\newsavebox{\mytext}
\newcommand{\Addheight}[1]%     measure height of the text
        {%
                \savebox{\mytext}{\small\strut\parbox{\textwidth}%
                {\hspace*{2em}\thefootnote#1}\strut}%       approximated by eye, not perfect!
                \addtolength{\footnoteheight}{\ht\mytext}%
                \addtolength{\footnoteheight}{\dp\mytext}%
        }




\NewEnviron{myframe}[1]{%
    \begin{frame}{#1}%
    \setlength{\footnoteheight}{0pt}%
    \BODY%
    \makemyrule%
    \end{frame}%
    }



\renewcommand\footnoterule{}

\begin{document}
\begin{myframe}{}
\frametitle{Beamer example}
using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al and a lot more information to create a linebreak} excessively \footnote{You do not need to read this, this is only blindtext to create even more and more text. Blindtext will go on forever, nobody can stop the allmighty blindtext. I think I am a blindtext author.}
\end{myframe}{}
\begin{myframe}
\frametitle{Beamer example}
using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al}
\end{myframe}{}
\begin{myframe}
\frametitle{Another example}
without footnotes\\
\end{myframe}
\end{document}

What this does: At the beginning of each myframe-environment, the length \footnoteheight is reseted to zero. When a \footnote is placed, the height of the text is added to this length. At the end of each frame, via \makemyrule the bottom rule is created, which is above the footnote texts (my solution is not perfect) or, if there are no footnotes, at least 14pt above the bottom.

My wishes (not real problems, but I want it to work better) are

  1. The height of the footnotetext is only approximated. I would like a solution where you can measure the height of the formatted footnote.
  2. The frame environment needs to be renamed to myframe. I would like a solution which works without changing the document. But it all failed, because I could not execute \makemyrule before \end{frame} automatically.

Best Answer

If you want to use the default \footnote commands then you can consider not using the footline and redefine \footnoterule to display the blue line above the footnotes:

\documentclass[xcolor={dvipsnames}]{beamer}

\mode<presentation> {
    \usetheme{default}
    \setbeamertemplate{navigation symbols}{}%remove navigation symbols
    \renewcommand\footnoterule{\moveleft1cm\vbox{\textcolor{blue}{\rule{\paperwidth}{2pt}}\vskip 1mm}}
}

\begin{document}
\begin{frame}
\frametitle{Beamer example}
using\footnote{Y LUSPIN, et al} footnotes\footnote{P. GHOSEZ, et al}
\end{frame}
\begin{frame}
\frametitle{Another example}
without footnotes
\end{frame}
\end{document}

This looks like the following (some additional customization may be desired): enter image description here