[Tex/LaTex] Footnote with url in caption

captionsfootnotestexmakerurls

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}

Best Answer

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