# Footnote with url in caption?

I try to put a url as a reference in a caption of a figure. But it seem to give all kinds of errors like:

! Argument of \@caption has an extra }.
! Paragraph ended before \contentsline was complete.


Is there a way to make this work?

\begin{figure}[]
\centering
\includegraphics[width=0.65\textwidth]{image}
\caption{
\footnote{\url{test.com}}
}
\label{fig:label1}
\end{figure}

• Footnotes to captions don't really make sense. Why not simply set the URL in the caption? – egreg May 3 '14 at 16:59
• I think it is kind of ugly, a long url with signs in (not as short as the example). – Lennart May 5 '14 at 15:59
• It will be uglier in a footnote. – egreg May 5 '14 at 16:10

You can use combination of footnotemark and footnotetext. Here is MWE:

\documentclass[11pt]{article}
\usepackage[demo]{graphicx}
\usepackage{hyperref}
\begin{document}
\begin{figure}[htp]
\centering
\includegraphics[width=0.65\textwidth]{image}
\caption[Caption for LOC]{Real caption\footnotemark}
\label{fig:label1}
\end{figure}
Anywhere on page where float appears\footnotetext{\url{test.com}}
\end{document}

• This doesn't guarantee that the footnote will appear in the same page as the figure. – egreg May 5 '14 at 16:11
• @egreg No it does not. But if you put it close it will not happen often, and in rare occasions when it happen you can move footnotetext before figure or move it around so it is on the same page. – Tahtisilma May 5 '14 at 16:45
• It did not work in the image code that I had already. But removing it and using this worked! – Lennart May 6 '14 at 17:17
• For me, this did not work too if I put the code suggested by @Tahtisilma but not if I do it myself in a subfigure environment. What I was missing was the [ brackets before the Real caption\footnotemark – kalmanIsAGameChanger Mar 19 '18 at 9:26