I am trying to add footnotes to the caption of a figure. Just using \footnote did not want to work and was producing several errors. After lots of googling I found something that is almost working but not quite. Rather than trying more solutions it would be great if someone can help me to fix this solution to work as it has, so far, produced the best results. I found the solution here:http://tex.stackexchange.com/questions/ ... c-solution
If I compile the solution on my system it works fine, i.e. just cutting it from the web page and pasting it to a document on my system like this:
Code: Select all
\documentclass{report}
\usepackage{hyperref}% if you want/for demonstration of hyperlinks
\usepackage{tablefootnote}
\makeatletter
\newcommand{\spewfootnotes}{%
\tfn@tablefootnoteprintout%
\global\let\tfn@tablefootnoteprintout\relax%
\gdef\tfn@fnt{0}%
}
\makeatother
\begin{document}
Text\footnote{text1} Text\footnote{text2}
\vbox{%
\begin{itemize}
\item X\tablefootnote{a}
\item Y\tablefootnote{b}
\item Z\tablefootnote{c}
\end{itemize}
}\spewfootnotes
Text\footnote{text7}
\newpage
Just to get another page to demonstrate the hyperlinks.
\end{document}
Code: Select all
%\documentclass{report}
\documentclass[11pt, a4paper, oneside, onecolumn, openany]{book} % Current
\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}
\usepackage{ae,aecompl,amsbsy,amssymb,eurosym, graphics, graphicx, mathptmx, setspace}
\usepackage{epsfig, multicol, multirow, paralist}
\usepackage{a4wide}
\usepackage[printonlyused]{acronym} %Acronyms
\usepackage{helvet}
\usepackage{fancyref}
\usepackage{caption}
\captionsetup{justification=justified}
\usepackage{subfigure}
\usepackage{url}
\usepackage{tablefootnote}
\setstretch{1.5}
\setlength{\oddsidemargin}{1.7cm}
\setlength{\evensidemargin}{-0.8cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\textwidth}{15.4cm}
\setlength{\textheight}{24cm}
\makeatletter
\newcommand{\spewfootnotes}{%
\tfn@tablefootnoteprintout%
\global\let\tfn@tablefootnoteprintout\relax%
\gdef\tfn@fnt{1}%
}
\makeatother
\begin{document}
Text\footnote{text1}
\newpage
Text\footnote{text2} Text\footnote{text3}
\vbox{%
\begin{itemize}
\item X\tablefootnote{a4}
\item Y\tablefootnote{b5}
\item Z\tablefootnote{c6}
\end{itemize}
}\spewfootnotes
\begin{figure}[H]
\begin{center}
\includegraphics[width=15cm]{graphics/model_organisms.png}
\end{center}
\end{figure}\spewfootnotes
Text\footnote{text7}
\newpage
Just to get another page to demonstrate the hyperlinks.
\end{document}
If anyone can shed some light on this problem for me, YOU'LL BE MY HERO.

Code: Select all
\documentclass[11pt, a4paper, oneside, onecolumn, openany]{book} % Current
\setlength{\parskip}{\medskipamount} \setlength{\parindent}{0em}
\usepackage{ae,aecompl,amsbsy,amssymb,eurosym, graphics, graphicx, mathptmx, setspace}
\usepackage{epsfig, multicol, multirow, paralist}
\usepackage{a4wide}
\usepackage[printonlyused]{acronym} %Acronyms
\usepackage{helvet}
\usepackage{fancyref}
\usepackage{caption}
\captionsetup{justification=justified}
\usepackage{subfigure}
\usepackage{url}
\usepackage{tablefootnote}
\setstretch{1.5}
\setlength{\oddsidemargin}{1.7cm}
\setlength{\evensidemargin}{-0.8cm}
\setlength{\topmargin}{-0.8cm}
\setlength{\textwidth}{15.4cm}
\setlength{\textheight}{24cm}
\makeatletter
\newcommand{\spewfootnotes}{%
\tfn@tablefootnoteprintout%
\global\let\tfn@tablefootnoteprintout\relax%
\gdef\tfn@fnt{1}%
}
\makeatother
\input{preamble}
\begin{document}
\chapter{Test Chapter}
\label{chap:test}
Computational models are mathematical models of systems such as are found in biology, physics, weather systems etc. Such models can be used to predict the behaviour of these systems in an effort to develop interventions which help to control our environment. By predicting weather systems we can safeguard ourselves against extreme weather conditions or plan our crops to avoid failures. In physics, models serve the purpose of discovering the origins of the universe and predicting what the future might hold for us. In biology, computational models serve to provide a better understanding of the way our bodies work as part of our effort to fight disease and prolong life\footnote{stuff}.
\begin{figure}[H]
\begin{center}
\includegraphics[width=15cm]{graphics/model_organisms.png}
\caption{From left to right: \textit{Caenorhabditis elegans}\tablefootnote{A footnote}, \textit{Drosophila melanogaster}\tablefootnote{Another footnote}, \textit{Saccharomyces cerevisiae}, \textit{Danio rerio}.}
\label{fig:model_organisms}
\end{center}
\end{figure}\spewfootnotes
\backmatter
\pagestyle{plain}
%\bibliographystyle{newPlain}
\bibliographystyle{plain}
\begin{singlespace}
\bibliography{research}
\end{singlespace}
\end{document}