# Using \footnote in a figure's \caption

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}


! 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.

-
the uk faq has long had an ‘answer’ covering this problem. let me/us know if it works for you! –  wasteofspace Dec 30 '14 at 10:13

\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}

-
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 '11 at 16:16
Another possible problem is, figure environment may not be at the right page of \footnotetext. –  Leo Liu Feb 3 '11 at 16:17
@Matten: could you please read what I wrote ... –  Herbert Feb 3 '11 at 16:19
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 '11 at 16:25
@Matten: choose as optional argument for figure [!htb] and you'll get a better placing of the floats. –  Herbert Feb 3 '11 at 16:48

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}

-
this is the only solution that is really working... thanks –  Tomas Dec 6 '12 at 16:32
For me, both this and Herbert's solution worked, however I needed this one to remove my compilation errors. –  Chris Apr 29 '14 at 16:58
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 at 12:12

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

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

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

-
Does it really? Cause for me \protect\footnote does exactly what \footnotemark alone would do. In other words: no footnote text. –  Christian Nov 26 '12 at 15:21

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:

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

\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}

-
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 '14 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 '14 at 5:12

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}
}

-
worked for me, thanks! –  Vojtech Vrbka May 1 '14 at 13:44
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. –  Sebastian Schmitz Jul 22 '14 at 8:29
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. –  wasteofspace Sep 18 '14 at 14:03

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}


-

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}


-

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.

-

The only way I could get this working, in my case, was using @Leo Liu's answer (in this same topic http://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...

-

This link works perfectly and it helps in making footnotes in figure environment

http://blog.peschla.net/2012/11/latex-footnotes-in-captions/#comment-756

-
This seems better-suited as a comment, as it's a link-only answer that may become invalid in the future. –  Werner Jan 13 at 22:49

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.

-