## LaTeX forum ⇒ Page Layout ⇒ Footnote in figure caption

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

### Re: Footnote in figure caption

My example above should produce the word table, you can verify by clicking on »Open in writelatex« (which is now known as Overleaf).

You can change the size of the tablefootnotes by using any font switch you find in introductory books. In the example below i used Large and made it red, just to emphasize what changes.
\documentclass[11pt, a4paper, oneside, onecolumn, openany]{book}\usepackage{etoolbox}\usepackage{parskip}\usepackage{showframe}\usepackage{mwe}\usepackage{threeparttable}\AtBeginEnvironment{tablenotes}{\Large\color{red}}%Make the%tablenotes red and Large. Or \footnotesize ;-)\newcommand{\species}[1]{\textit{#1}}%Helper command, keep it%flexible\begin{document} \chapter{Test Chapter}\label{chap:testB}Computational models are mathematical models of systems such asare found in biology, physics, weather systems etc. Such modelscan be used to predict the behaviour of these systems in aneffort to develop interventions which help to control ourenvironment. By predicting weather systems we can safeguardourselves against extreme weather conditions or plan our crops toavoid failures. In physics, models serve the purpose ofdiscovering the origins of the universe and predicting what thefuture might hold for us. In biology, computational models serveto provide a better understanding of the way our bodies work aspart of our effort to fight disease and prolonglife\footnote{stuff}. \blindtext[2]\begin{figure}[t]	\centering	\begin{threeparttable}		\begin{tabular}{c}		\includegraphics[width=.9\linewidth]{example-image-b}	\end{tabular}		\caption{From left to right: \species{Caenorhabditis		elegans}\tnote{a}, \species{Drosophila melanogaster}\tnote{b},		\species{Saccharomyces cerevisiae}, \species{Danio rerio}.}		\label{fig:model_organismsB}		\begin{tablenotes}		\item [a] A footnote		\item [b] Another footnote		\end{tablenotes}		\end{threeparttable}\end{figure}\end{document}

Concerning the other boxed stuff. Can you make a minimal working example, so i can see what is going on? The code defines new floating environments for programs and directory listings. Do you need this stuff, or is it rubbish from an old template?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm
I followed the instruction of Johannes_B to get footnotes below an image and to change the resultant "Table" in the caption to "Figure". However, I just noticed that the rewnewcommand also resets the counter. So in stead of Figure 3.4, the figure became Figure 3.1 again. How can I correct this?

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Hi Jannetta,

as far as i can see, there is no renewcommand in my last example, and there is no need at all to redefine anything. Can you show a minimal example of what is going on in your code?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm

The code is below:

	\renewcommand{\tablename}{Figure}	\begin{figure}[H]		\centering		\begin{threeparttable}			\begin{tabular}{c}				\includegraphics[width=.9\linewidth]{graphics/ident_neurons.png}			\end{tabular}			\caption{The red arrow points to features typical of the specific neurons\tnote{a}.}			\label{fig:ident_neurons}			\begin{tablenotes}				\item [a] \footnotesize From the Nadim, Golowasch, Bucher STG website at \url{http://stg.rutgers.edu/resources/Cancer_Guide.pdf}  			\end{tablenotes}		\end{threeparttable}	\end{figure}

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
What do you see exactly copying my example? It should be the same as when clicking on Open in WriteLaTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm
He is my MWE. I get "Table" in the caption, not "Figure", like in yours. I guess some other package must be messing it up but I have no idea how to find it.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Welcome to Overleaf --- just edit your LaTeX on the left,% and we'll compile it for you on the right. If you give% someone the link to this page, they can edit at the same% time. See the help menu above for more info. Enjoy!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\documentclass[11pt, a4paper, oneside, onecolumn, openany]{book}    % Current\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}\usepackage{ae,aecompl,amsbsy,amssymb,eurosym, graphicx, mathptmx, setspace}\usepackage{epsfig, multicol, multirow, paralist}\usepackage{a4wide}\usepackage{acro}\usepackage{helvet}\usepackage{fancyref}\usepackage[skip=2pt,font=scriptsize]{caption}\captionsetup{justification=justified}\usepackage{subfigure}\usepackage{url}\usepackage{etoolbox}\usepackage{threeparttable}\usepackage{parskip}\usepackage{mwe}\usepackage{blindtext}\usepackage{makeidx}\usepackage[pdftex]{hyperref}\usepackage{todonotes}\usepackage{float}\usepackage{sidecap}\usepackage{fixltx2e}\usepackage{listings}\usepackage{color}\usepackage{mathtools} \definecolor{mygreen}{rgb}{0,0.6,0}\definecolor{mygray}{rgb}{0.5,0.5,0.5}\definecolor{mymauve}{rgb}{0.58,0,0.82} \floatstyle{boxed}\floatstyle{ruled}\floatname{figure}{Figure} \hypersetup{         unicode=false,          % non-Latin characters in Acrobat’s bookmarks         pdftoolbar=true,        % show Acrobat’s toolbar?         pdfmenubar=true,        % show Acrobat’s menu?         pdffitwindow=true,      % page fit to window when opened         pdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion},    % title         pdfauthor={Jannetta S. Steyn},     % author         pdfsubject={Subject},   % subject of the document         pdfnewwindow=true,      % links in new window         pdfkeywords={keywords}, % list of keywords         colorlinks=true,       % false: boxed links; true: colored links         linkcolor=cyan,          % color of internal links         linkcolor=blue,         citecolor=red,        % color of links to bibliography         filecolor=green,      % color of file links         urlcolor=blue           % color of external links}   \setstretch{1.5}\setlength{\oddsidemargin}{1.7cm}\setlength{\evensidemargin}{-0.8cm}\setlength{\topmargin}{-0.8cm}\setlength{\textwidth}{15.4cm}\setlength{\textheight}{24cm} \makeindex%\makeglossaries \newcommand{\species}[1]{\textit{#1}}\AtBeginEnvironment{tablenotes}{\Large\color{red}}%\loadglsentries{glossary}\include{abbrevs2}\begin{document}          \begin{figure}[t]                 \centering                 \begin{threeparttable}                         \begin{tabular}{c}                                 \includegraphics[width=.9\linewidth]{example-image-b}                         \end{tabular}                         \caption{From left to right: \species{Caenorhabditis                                         elegans}\tnote{a}, \species{Drosophila melanogaster}\tnote{b},                                 \species{Saccharomyces cerevisiae}\tnote{c}, \species{Danio rerio}\tnote{d}.}                         \label{fig:model_organismsB}                         \begin{tablenotes}                                 \item [a] \footnotesize\species{Caenorhabditis elegans} by Bob Goldstein, UNC Chapel Hill is licensed under CC BY-SA 3.0, \url{http://bio.unc.edu/people/faculty/goldstein/}                                   \item [b] \footnotesize\species{Drosophila Melanogaster} by Andr\'{e} Karwath is licensed under CC BY-SA 2.5, \url{http://upload.wikimedia.org/wikipedia/commons/4/4c/Drosophila_melanogaster_-_side_\%28aka\%29.jpg}                                 \item [c] \footnotesize\species{Saccharomyces cerevisiae} cells by Masur in Public Domain, \url{https://upload.wikimedia.org/wikipedia/commons/d/d9/S_cerevisiae_under_DIC_microscopy.jpg}                                 \item [d] \footnotesize\species{Danio Rerio} by Pogrebnoj-Alexandroff is licenced under CC BY-SA 3.0, \url{https://upload.wikimedia.org/wikipedia/commons/9/91/Danio_rerio_lab_left.JPG}                         \end{tablenotes}                 \end{threeparttable}         \end{figure}  \end{document}

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
It is the caption-package that somehow detects the tabular. My solution is more of a dirty hack than a clean workaround. But here we go, i made some further comments in the code.
\documentclass[11pt, a4paper, oneside, onecolumn, openany]{book}    % Current\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}%\usepackage{ae,aecompl,%very very very obsolete%amsbsy,amssymb,eurosym, graphicx, mathptmx, setspace}%\usepackage{epsfig,%Same here, obsolete%multicol, multirow, paralist}%\usepackage{a4wide}%obsolete as well%\usepackage{acro}%\usepackage{helvet}%\usepackage{fancyref}\usepackage[skip=2pt,font=scriptsize]{caption}%\captionsetup{justification=justified}%\usepackage{subfigure}%obsolete\usepackage{etoolbox}\usepackage{threeparttable}%\usepackage{parskip}%You have set the parskip by hand in line two, now it is overridden\usepackage{mwe}%\usepackage{makeidx}%\usepackage{todonotes}%%\usepackage{float}%\usepackage{sidecap}%\usepackage{fixltx2e}%\usepackage{listings}\usepackage{xcolor}%changed to xcolor%\usepackage{mathtools}%%\definecolor{mygreen}{rgb}{0,0.6,0}%\definecolor{mygray}{rgb}{0.5,0.5,0.5}%\definecolor{mymauve}{rgb}{0.58,0,0.82}%%\floatstyle{boxed}%\floatstyle{ruled}%\floatname{figure}{Figure}\usepackage{hyperref}%Better leave out the optional argument here %\hypersetup{%	unicode=false,          % non-Latin characters in Acrobat’s bookmarks%	pdftoolbar=true,        % show Acrobat’s toolbar?%	pdfmenubar=true,        % show Acrobat’s menu?%	pdffitwindow=true,      % page fit to window when opened%	pdftitle={Analysis and Modelling of the PY Complex in the Pyloric Circuit of the Crab Stomatogastric Ganglion},    % title%	pdfauthor={Jannetta S. Steyn},     % author%	pdfsubject={Subject},   % subject of the document%	pdfnewwindow=true,      % links in new window%	pdfkeywords={keywords}, % list of keywords%	colorlinks=true,       % false: boxed links; true: colored links%	linkcolor=cyan,          % color of internal links%	linkcolor=blue,%	citecolor=red,        % color of links to bibliography%	filecolor=green,      % color of file links%	urlcolor=blue           % color of external links%}%  %\setstretch{1.5}%\setlength{\oddsidemargin}{1.7cm}%\setlength{\evensidemargin}{-0.8cm}%\setlength{\topmargin}{-0.8cm}%\setlength{\textwidth}{15.4cm}%\setlength{\textheight}{24cm}%I would set the stuff using package geometry %\makeindex     %\makeglossaries \newcommand{\species}[1]{\textit{#1}}\AtBeginEnvironment{tablenotes}{\footnotesize\color{red}}     %\loadglsentries{glossary}%\include{abbrevs2}\begin{document} \begin{figure}[t]	\centering	\begin{threeparttable}		\begin{tabular}{c}			\includegraphics[width=.9\linewidth]{example-image-b}		\end{tabular}\makeatletter\def\@captype{figure}\makeatother		\caption{From left to right: \species{Caenorhabditis		elegans}\tnote{a}, \species{Drosophila melanogaster}\tnote{b},		\species{Saccharomyces cerevisiae}\tnote{c}, \species{Danio rerio}\tnote{d}.}		\label{fig:model_organismsB}		\begin{tablenotes}		\item [a] \species{Caenorhabditis elegans} by Bob Goldstein, UNC Chapel Hill is licensed under CC BY-SA 3.0, \url{http://bio.unc.edu/people/faculty/goldstein/}  		\item [b] \species{Drosophila Melanogaster} by Andr\'{e} Karwath is licensed under CC BY-SA 2.5, \url{http://upload.wikimedia.org/wikipedia/commons/4/4c/Drosophila_melanogaster_-_side_\%28aka\%29.jpg}		\item [c] \species{Saccharomyces cerevisiae} cells by Masur in Public Domain, \url{https://upload.wikimedia.org/wikipedia/commons/d/d9/S_cerevisiae_under_DIC_microscopy.jpg}		\item [d] \species{Danio Rerio} by Pogrebnoj-Alexandroff is licenced under CC BY-SA 3.0, \url{https://upload.wikimedia.org/wikipedia/commons/9/91/Danio_rerio_lab_left.JPG}		\end{tablenotes}	\end{threeparttable}\end{figure}

EDIT: Threeparttable is a quirky little package.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

jannetta
Posts: 46
Joined: Mon Dec 22, 2008 12:59 pm
I think it is working now. I commented out as in your example and then had to put a few things back such as acro and listings, some defined colours etc. It still wouldn't work but then I commented out the line "\usepackage[skip=2pt,font=scriptsize]{caption}". Now it seems to work. I'll have to check properly later on, but now I have to get to bed

tquest
Posts: 1
Joined: Thu May 16, 2019 9:24 pm
Simple resolution is here:
https://tex.stackexchange.com/questions/21813/footnote-in-math-mode

David Carlisle solution is brilliantly simple: the key is a footnote counter.
I have two footnotemarks in one caption to the figure. Unfortunately one is within extra math mode , but that's okay.
Caution: This can't be the first counter marker! See code...

CODE:
\documentclass{article}

\begin{document}

\begin{eqnarray} % I have here figure &
foo && foo \footnotemark\\
foo && foo \footnotemark
\end{eqnarray}

\footnotetext{something}
\stepcounter{footnote}
\footnotetext{something else}

\end{document}

In Preamble i have
\usepackage{footmisc}
but I don't know if it's that important.

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Welcome to the LaTeX community.

Please note that you are referring to lockstep's answer. And as egreg noted in his answer, eqnarray is obsolete for years.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.