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
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
.A useful alternative is to write a footnote-like comment directly under the caption: