2

I have a figure with a relatively long caption that goes over a single line, and within that caption I have a footnote. For some reason, the footnote gets repeated at the bottom. I notice this only happens when the figure caption goes over one line, if I shorten the caption to just one line, there is no duplicate of the footnote.

\documentclass[11pt]{beamer}

\usepackage[gen]{eurosym}
\setbeamerfont{caption}{size=\scriptsize}

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\renewcommand*\footnoterule{}
\setbeamerfont{footnote}{size=\tiny}

\setbeamersize{text margin left=7mm,text margin right=7mm}

\begin{document}

\begin{frame}{Slide Title}
    \addtobeamertemplate{footnote}{}{\vspace{1.5ex}}
    \begin{figure}
        \centering
        \includegraphics[width=0.7\textwidth,keepaspectratio]{example-image-a}
        \vspace*{-3mm}
        \caption{My looooooooooooooooooooooooooonooooooooooooooog figure caption\footnote{Some footnote}\tiny(source: source)}
    \end{figure}
\end{frame}

\end{document}

enter image description here

How do I correct this behavior?

1

From the TeX-FAQ (https://texfaq.org/FAQ-ftncapt):

However, as well as all of the above, one also has to deal with the tendency of the \caption command to produce the footnote’s text twice. For this last problem, there is no tidy solution this author is aware of.

If you’re suffering the problem, a well-constructed \caption command in a minipage environment within a float (as in the example above) can produce two copies of the footnote body “something”. (In fact, the effect only occurs with captions that are long enough to require two lines to be typeset, and so wouldn’t appear with such a short caption as that in the example above.)

A workaround which uses many manual operations:

\documentclass[11pt]{beamer}

\usepackage[gen]{eurosym}
\setbeamerfont{caption}{size=\scriptsize}

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\renewcommand*\footnoterule{}
\setbeamerfont{footnote}{size=\tiny}

\setbeamersize{text margin left=7mm,text margin right=7mm}

\makeatletter
\let\fnsymbolNum\@fnsymbol
\makeatother

\begin{document}

\begin{frame}{Slide Title}
    \begin{figure}
        \centering
        \includegraphics[width=0.5\textwidth]{example-image-a}
        \caption{My looooooooooooooooooooooooooonooooooooooooooog figure\textsuperscript{\fnsymbolNum{1}} caption\textsuperscript{\fnsymbolNum{2}}}
    \end{figure}
    \footnotetext[1]{first footnote}
    \footnotetext[2]{second footnote}
\end{frame}

\end{document}

enter image description here

| improve this answer | |
  • Yea, it seems like \caption doesn't play nice with \footnote, probably best to avoid using the two together – Skyork May 16 at 7:33
  • @Skyork I've updated my answer. Now the footnote symbol is consistent. – muzimuzhi Z May 16 at 8:10
1

Just to show another possibility to show source of image ... without use of \footnote:

\documentclass[11pt]{beamer}

\usepackage[gen]{eurosym}
\usepackage{copyrightbox}

\begin{document}

\begin{frame}
\frametitle{Slide Title}
    \begin{figure}
\copyrightbox[b]{\includegraphics[width=0.7\linewidth]{example-image-duck}}
                {(source: source)}
\caption{My looooooooooooooooooooooooooonooooooooooooooog figure caption}
    \end{figure}
\end{frame}

\end{document}

enter image description here

| improve this answer | |
  • Nice feature, but it doesn't address the footnote issue – Skyork May 16 at 7:31
  • @Skyork, In answer I clearly stated, that it show another possibility. without use of the footnote, i.e. problems with footnotes are avoided. – Zarko May 16 at 7:41
  • @Skyork, regarding use of footnote in caption, your question is duplicate to many similar questions, for example tex.stackexchange.com/questions/10181/…. – Zarko May 16 at 7:46
  • Maybe it wasn't clear from my example, but my use of footnote has more to do with adding info to the description of the image (i.e. the caption itself) than showing the source of the image. I saw the linked question and tried the solution, but it's still not perfect - it got rid of the duplicate but the footnote symbols are inconsistent – Skyork May 16 at 7:49
  • I think it's just too problematic to use \footnote with \caption together, so best to avoid – Skyork May 16 at 7:50
1

The best solution is to not use footnotes in captions, but…

Captions usually try to determine wether the contents fits in one line (and if it does the caption is centered). This measuring is the reason why the footnote gets typeset twice: once during the measuring and once when the caption is actually typeset.

Since you already know that the caption does not fit on one line you can safely turn of the measuring for that caption using the caption package and \captionsetup{singlelinecheck=false}.

\documentclass[11pt]{beamer}
\usepackage{caption}
\usepackage[gen]{eurosym}
\setbeamerfont{caption}{size=\scriptsize}

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\renewcommand*\footnoterule{}
\setbeamerfont{footnote}{size=\tiny}

\setbeamersize{text margin left=7mm,text margin right=7mm}

\begin{document}

\begin{frame}{Slide Title}
  \addtobeamertemplate{footnote}{}{\vspace{1.5ex}}
  \begin{figure}
    \centering
    \captionsetup{singlelinecheck=false}
    \includegraphics[width=0.7\textwidth,keepaspectratio]{example-image-a}
    \caption{My looooooooooooooooooooooooooonooooooooooooooog figure
      caption\footnote{Some footnote}\tiny(source: source)}
  \end{figure}
\end{frame}

\end{document}

enter image description here

| improve this answer | |
  • This explains the cause of the issue and a clean fix. And I agree we should avoid footnote in caption if possible. Thanks. – Skyork May 19 at 18:53

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