297

Maybe this is an easy one, but I struggled with this now too long :)

I want to have a footnote in a caption of a figure, see the example.

\begin{figure}[!ht]
  \caption{a figure caption\footnote{where i got it from}}
  \label{somelabel}
  \begin{center}   
    \pgfuseimage{...}
  \end{center}
\end{figure}

The compilation error reads as follows

! Argument of \@caption has an extra }.
<inserted text> 
            \par 
l.192 ...i got it from}}

The actual tex code for my figure with the answer of Leo

\pgfdeclareimage[width=6cm]{aba.medcenter}{aba.medcenter}

\begin{figure}[!ht]
  \begin{minipage}{\textwidth}
    \caption[Medcenter Monthly Medication System]{Medcenter\textsuperscript\textregistered Monthly Medication System\footnote{Quelle Bild: http://www.amazon.com/dp/B000RZPL0M}}
    \label{aba.medcenter}
    \begin{center}
      \pgfuseimage{aba.medcenter}
    \end{center}
  \end{minipage}
\end{figure}

leads to the error

! LaTeX Error: Command \itshape invalid in math mode.

in the same line. If I comment out the foot note, everything compiles fine. \textsuperscript\texttrademark isn't the problem, too.

2

13 Answers 13

185
\documentclass{article}
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
  \centering
  \includegraphics{foo}  ...
  \caption[Caption for LOF]{Real caption\footnotemark}
\end{figure}

Anywhere on the same page where the float appears\footnotetext{blah}
but at least before the next footnote\footnote{the nextone}

\end{document}

The optional argument of \caption should always be used when the list of figures is also being used. Otherwise, you have to \protect the \footnote.

  \caption[Caption without FN]{caption with FN}

A useful alternative is to write a footnote-like comment directly under the caption:

\begin{figure}
  \centering
  \includegraphics{foo}  ...
  \caption[Caption for LOF]{Real caption\textsuperscript{a=}}
  \small\textsuperscript{a=} The footnote-like comment under the caption
\end{figure}
15
  • 14
    I tried \footnotemark and \footnotetext previously, but I ended up having the foot note a page before the figure, which is not very elegant. Any suggestions for this problem?
    – Matten
    Feb 3, 2011 at 16:16
  • 5
    Another possible problem is, figure environment may not be at the right page of \footnotetext.
    – Leo Liu
    Feb 3, 2011 at 16:17
  • 5
    @Matten: could you please read what I wrote ...
    – user2478
    Feb 3, 2011 at 16:19
  • 4
    sorry, now I know why you insisted on placing \footnotetext{} on the same page where the float appears :) This solution involves looking up each figure in the produced document and placing the foot notes afterwards. I'm writing a large document with a lot of figures, many requiring the foot notes. Maybe there is another way? But thank you, this is okay for now. I'll accept your answer if no better solutions come up.
    – Matten
    Feb 3, 2011 at 16:25
  • 8
    I had to put a \protect command right before the \footnotemark. Otherwise, this works. For clarification: I used this answer to put a footnote into the caption of a listing made by lstlistings. Maybe \protect is not necessary in other cases.
    – Dohn Joe
    May 19, 2014 at 13:51
222

The combination of the answers given by Herbert and by Peter worked for me, i.e. the following code:

\documentclass{article}
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}
   \centering
   \includegraphics{foo}  ...
   \caption[Caption for LOF]{Real caption\protect\footnotemark}
\end{figure}

\footnotetext{blah blah blah}

\end{document}
8
  • 23
    this is the only solution that is really working... thanks
    – user219882
    Dec 6, 2012 at 16:32
  • 2
    For me, both this and Herbert's solution worked, however I needed this one to remove my compilation errors.
    – Chris
    Apr 29, 2014 at 16:58
  • 4
    For me, this works but I also need to take care where \footnotetext{blah blah blah} appear - it realle needs to be inserted between text on the the same page as the table appears in compiled document as Herbert stresses out.
    – sup
    Jun 19, 2015 at 12:12
  • 1
    Also works for tables May 14, 2016 at 14:26
  • 2
    This works with the small caveat that If the figure is at the bottom of the page, the footnote will be on the next page.
    – Max N
    Dec 3, 2017 at 20:58
28

One solution:

\begin{figure}
  \begin{minipage}{\textwidth}
    ...
    \caption[Caption for LOF]%
      {Real caption\footnote{blah}}
  \end{minipage}
\end{figure}

See the UK TeX FAQ: Footnotes in captions

3
  • thanks for your answer, but I get another error, then... ! LaTeX Error: Command \itshape invalid in math mode.
    – Matten
    Feb 3, 2011 at 15:50
  • 4
    @Matten: I don't think it is about footnote in caption. Can you provide a full example in the question?
    – Leo Liu
    Feb 3, 2011 at 16:16
  • I added the actual figure. If I comment out the foot note, the error disappears.
    – Matten
    Feb 3, 2011 at 16:22
17

Best way to put the footnote on the same page of the figure:

\usepackage{afterpage}

\afterpage{
  \begin{figure}
    \begin{center}
      \includegraphics[scale=0.75]{images/the_cited.png}
        \caption[The LOF caption]{Lorem ipsum. \tiny{Example\footnotemark}}
    \label{fig:cited_img}
    \end{center}
  \end{figure}
  \footnotetext{Source: \url{http://www.example.com/the_image.png}
}

Fonte: http://blog.peschla.net/2012/11/latex-footnotes-in-captions/

3
  • 3
    It will definitely push figure and footnote on the same page, but use with caution! It can have ugly side effects, like pushing a figure into a new section. Jul 22, 2014 at 8:29
  • 2
    it all works, but believing things such as \tiny{Example\footnotemark}} will come back and bite you sooner or later. it should be {\tiny Example\footnotemark}} -- tiny sets up the “current font”, it doesn’t take an argument in the way you wrote it. Sep 18, 2014 at 14:03
  • 2
    Can someone please explain what afterpage is doing here?
    – einpoklum
    Aug 4, 2015 at 18:04
14

In all these answers, people are expecting the footnote to go at the bottom of the page. Sometimes, one wishes the footnote at the bottom of the table, if the footnote appears in the table. I have several ways of dealing with that, but here is one:

\documentclass[12pt]{article}
\parskip 1em
\usepackage{boxhandler}
\begin{document}

 Here is an example of a table with a footnote:
\bxtable[ht]{Caption goes here}
{\begin{tabular}{l}
%FIRST ROW OF OUTER TABULAR IS THE INNER TABLE
\begin{tabular}{|l|c|c|}
\hline
Title & Column 1 & Column 2\\    \hline
First Test & 1.234 & 5.389$^\dag$\\    \hline
Second Test & 3.894 & 1.586~~\\    \hline
\end{tabular}\\    %SECOND ROW OF THE OUTER TABULAR IS THE FOOTNOTE
\rule{0in}{1.2em}$^\dag$\scriptsize This is the footnote text\\    \end{tabular}
}

If you look at the form as defined in the .tex file, you will see
several things of note.  First, there is a tabular within a tabular.
The outer (first to begin, last to end) tabular uses a single column and
contains two ``rows.''  The first ``row'' is the inner tablular and the
second ``row'' is the footnote Next, we use the \verb,\dag, command for
the footnote symbol, but you can use any symbol you like.  I also added
two hard spaces after the 1.586 so that the column alignment wasn't
messed up by the dagger.  I used the rule command of 0 width and 1.2em
height to set the footnote offset below the table.  Making 1.2 a greater
number will increase the offset and vice versa.  Finally, you will note
that I used {\scriptsize\verb,\scriptsize,} to change the size of the
footnote text.  You could make it {\footnotesize\verb,\footnotesize,} or
even keep it the same size as the table {\small\verb,\small,}.

\end{document}

enter image description here

1
9

To use the usual \footnote command inside \caption and obtain the usual foot notes at the end of page (not just inside the float as using minipages), you can use the package ftnxtra.

Note that in any case, if the float jump to the next page, the foot note will remain in the same place, so this is always a dangerous practice.

Another problem will be the bottom floats with \footnote, since they are placed by default under the foot notes:

MWE2

But this problem can be solved using the fnpos or stfloats packages:

MWE

\documentclass{article}
\usepackage{lipsum} % for dummy text
\usepackage[demo]{graphicx}
\usepackage{ftnxtra}
\usepackage{fnpos} % \makeFNbelow by default 
% or \usepackage{stfloats} \fnbelowfloat
\begin{document}
\lipsum[1-3]
\begin{figure}[b]
\centering
\includegraphics[scale=.2]{image}
\caption{A caption \footnote{A footnote}}
\label{label}
\end{figure}
\lipsum[1-2]
\end{document}
3
  • 1
    I tried you way in your answer, \caption{A caption \footnote{A footnote}} but this no "a footnote" appeared below the page
    – Nax
    Apr 23, 2014 at 3:25
  • May be appeared above the page? Have you read the second paragraph of my answer? Change \lipsum[1-3] by \lipsum[1-4] and after that \lipsum[1-5] in my MWE and check the result in each case. If this is the problem, the solution is move up/down the figure a few paragraphs until the footnote is showed in the same page that the image (or use the approaches of another answers).
    – Fran
    Apr 23, 2014 at 5:12
  • This MWE does not work with \usepackage{tikz}.
    – Mr. Tao
    May 28, 2018 at 18:55
8

As mentioned below, sometimes one wants the footnote under the table, rather that at page bottom. Here is the other way I do it

\documentclass[12pt]{article}
\usepackage{boxhandler}
\begin{document}

This is an alternate way to do a footnote in a table, with the minipage
environment.
  \bxtable[ht]{Caption goes here}
  {\begin{minipage}{187.23183pt}   % GUESS (OR CALCULATE) MINIPAGE WIDTH
  \renewcommand\footnoterule{}     % ELIMINATE LITTLE LINE SEPARATER
  \begin{tabular}{|l|c|c|}
  \hline
  Title & Column 1 & Column 2\\      \hline
  First Test & 1.234 & 5.389\footnote{\scriptsize This is the
   footnote text blah blah blah blahty blah}\\      \hline
  Second Test & 3.894 & 1.586~~\\      \hline
  \end{tabular}
  \vspace{-2ex}                    % SHIFT FOOTNOTE UP
  \end{minipage}
  }
\end{document}

enter image description here

5

I had the same issue with table floats. And the discussion here helped me :)

If you surround the float with a savenotes environment, then the snipped \protect\footnote{foo} works. In some cases where the float is far off, you have to move the whole float in the source to the right place in text where the float mechanism of latex wants to put it. This is a job for the finalisation of a document and it is a workaround for the last open issue which is that the footnote sometimes does not appear on the right page. So for me works:

\begin{savenotes}
\begin{table}[tb]
    \begin{tabular}{...}
    ...
    \end{tabular}
    \caption{foo\protect\footnote{bar}}
\end{table}
\end{savenotes}

Someone should test this with figure floats.

5

I use minipage, with \protect before \footnote. The footnote text appears right below the figure. This combines several solutions above, the result is quite simple and robust.

The optional argument of \caption, viz., [Short caption] is needed if your document also contains a \listoffigures instruction. If your document does not feature a List of Figures, you can omit the optional argument.

\begin{figure}
    \centering
    \begin{minipage}{1.\textwidth}
    %\renewcommand\footnoterule{} % optional removing footnote bar
        \centering
        \includegraphics[width=.7\linewidth]{somefile}
        \caption[Short caption]{Full caption\protect\footnote{Some footnote text}.}
        \label{fig:somefigure}
    \end{minipage}
\end{figure}
2
  • 1
    @Mico yes, a short caption is needed for the list of figure, updated.
    – THN
    Dec 20, 2018 at 9:36
  • 1
    You're absolutely right!
    – Mico
    Dec 20, 2018 at 16:58
4

For what it is worth, I simply used a \protect and the regular \footnote seemed to work OK.

2
  • 9
    Does it really? Cause for me \protect\footnote does exactly what \footnotemark alone would do. In other words: no footnote text.
    – Christian
    Nov 26, 2012 at 15:21
  • 5
    did not work for me as well Aug 12, 2016 at 8:36
4

The only way I could get this working, in my case, was using @Leo Liu's answer (in this same topic https://tex.stackexchange.com/a/10182/35364), plus this workaround to get footnote's numbering ok, for it was displaying a symbol, at first. I got something like this:

\renewcommand\thempfootnote{\arabic{mpfootnote}} %so it will show numbers instead of symbols

\begin{figure}
  \begin{minipage}{\textwidth}
  \setcounter{mpfootnote}{1}  % sets footnote's starting number within this minipage to 1
    ...
    \caption{Caption\footnotemark.}
    \footnotetext{Foot notes}
  \end{minipage}
\end{figure}

This was the only way I was able to have image and footnote on the same page, with desired number. \afterpage solution sent the whole image far away from expected, and the others gave me a footnote text on the page right before my image...

2

The first table in the documentation of the ctable package is a good example, having footnotes in the caption as well as in the table cells. Works for figures, too.

-2

Nothing works fine. The solution is being tricky. Use background colour (white) in the text you wish to hide, i.e., the misplaced footnote number. The problem is fixing the numbering when modifying previous text with more footnotes, you should track numbering.

\begin{figure}[H]
    \centering
    \includegraphics[width=9 cm]{your_figure_file}
    \caption{Your figure's caption$^2$.}{\textcolor{white}{\footnotemark}}
    \label{figure label}
\end{figure}   
\footnotetext{Footnote text.}

Some corections

\begin{figure}[H] 
\centering 
\includegraphics[width=9 cm]{your_figure_file} 
\caption{Your figure's caption$^{footnote corresponding number, you should track}$.}{\textcolor{white}{\footnotemark}} 
\label{figure label} 
\end{figure}
\footnotetext{Footnote text.}

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