Footnote in Caption of Figure on latex

Viewed 7739

Although i have tried many code of a footnote in a caption of a figure , it doesn't work , really , where is the problem here

\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\makenomenclature

\usepackage[nottoc]{tocbibind}
\pagenumbering{Roman}


\usepackage{lipsum}

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{4}
\begin{document} 
              
\begin{figure}
      \centering                        
      \includegraphics[width=0.8\textwidth{images/frog.jpg}
      \caption[frog]{frog \footnotemark }
      \label{fig:pic1}
\end{figure}
\footnotetext{frog}

\end{document} 
1 Answers

Two problems:

  • you can't have the \makenomenclature macro in your code with a package which defines it, e.g. nomencl

  • the ] after the optional argument of your graphic is missing

With the split between \footnotetext and \footnotemark there is always the risk that the floating figure and the footnote will end up on different pages. You can lessen the risk by using [htbp] as floating specifier for your figure, this way you at least allowed the figure to be placed where the footnote is.


\documentclass[a4paper,12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{fancyhdr}
%\makenomenclature

\usepackage[nottoc]{tocbibind}
\pagenumbering{Roman}


\usepackage{lipsum}

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{4}
\begin{document} 
              
\begin{figure}[htpb]
      \centering                        
      \includegraphics[width=0.8\textwidth]{example-image-duck}
      \caption[frog]{frog \footnotemark }
      \label{fig:pic1}
\end{figure}
\footnotetext{frog}

\end{document} 

enter image description here

Related