[Tex/LaTex] Using \footnote in a figure’s \caption

captionsfloatsfootnotes

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.

Best Answer

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