Multiple Footnotes in the same caption/figure/table/equation and using hyperref
This question is very similar on Multiple Footnotes in the same caption/figure/table/equation and using hyperref
Since I want to award a bounty I specify the problem here more clearly with an example which needs to be fixed to get the bounty, without any error and without any warnings.
% !TeX TS-program = pdflatex
% !TeX encoding = UTF-8
% !TeX spellcheck = en_US
% !BIB TS-program = bibtex
%LaTeX=>PDF
\documentclass[a4paper]{report}
\usepackage{lipsum} %enables \lipsum
\renewcommand{\baselinestretch}{1.24}
\usepackage[english]{babel} %enables \lipsum
\usepackage{pdflscape} % enables \begin{landscape}...\end{landscape}
\usepackage{tablefootnote}
\usepackage{hyperref} % enables \href{}{} and \url
\begin{document}
%Problem A1: Multiple footnotes in figurecaption
\begin{figure}[htb]
\caption[123]{A\footnote{\label{first}some footnote}B\tablefootnote{4}
X\footnotemark{} Y\footnotemark{} Z\footnotemark{}}
\end{figure}
\addtocounter{footnote}{-3} %3=n
\stepcounter{footnote}\footnotetext{a}
\stepcounter{footnote}\footnotetext{b}
\stepcounter{footnote}\footnotetext{c}
%Problem A2: Multiple footnotes in tablecaption
\begin{table}[htb]
\caption[123]{A\footnote{\label{table}some footnote}B\tablefootnote{4}
X\footnotemark{} Y\footnotemark{} Z\footnotemark{}}
\begin{tabular}{p{\hsize}}
some table
\end{tabular}
\end{table}
\addtocounter{footnote}{-3} %3=n
\stepcounter{footnote}\footnotetext{a}
\stepcounter{footnote}\footnotetext{b}
\stepcounter{footnote}\footnotetext{c}
%Problem A3: Multiple footnotes in euqation
\begin{eqnarray}
A
&\stackrel{\footnotemark}{=}&
B\cr
&\stackrel{\footnotemark}{=}&
C
\end{eqnarray}
%Problem B: (not working Workaround for A2): multiple footnotes in a table, with workaround tablefoote creates footnote on different page
\begin{landscape}
%some previous pages with landscape
\clearpage
\begin{table}[htb]
\begin{tabular}{p{\hsize}}
\lipsum[1-3]\footnote{test0}\tablefootnote{test1}\footnote{test2}
\end{tabular}
\end{table}\clearpage
%further pages with landscape
\end{landscape}
\end{document}
Problem A1,A2,A3 are the same Problem with hyperrefencing footnotes once for figure, once table and once for equation. Problem B might be suggested as a Workaround with tablefootnote ( table: footnote appears on previous page ), but it shows an example where the tablefootnote does not work.
I get two different warnings:
pdfTeX warning (ext4): destination with the same identifier (name{Hfootnote. }) has been already used, duplicate ignored
and
pdfTeX warning (dest): name{Hfootnote. } has been referenced but does not exist, replaced by a fixed one
Following requirements, for been awarded with a bounty (also I'm interested in other solutions)
- Since it should work on a different computer, changing the binary of LaTeX is not allowed.
- It should to be compiled with pdflatex.
- It has to use hyperref, and the footnotemarks should link to the
footnotetext.
Best Answer
Problem A: Solved
This combination of packages:
works well for me (MWE below). It seems to allow any number of footnotes within
figures
,tables
, andequations
, without having to manually update the footnote counter.Problem B: not solved
The only caveat: Problem B is not solved --
footnotetext
may still appear on a different page thanfootnotemark
. However, this is a well-known but surprisingly unsolved problem. IMHO it is not worth fixing since it occurs so infrequently, and I'm sure the reader will be able to figure it out ;)Problem C: Referencing footnotes in equations.
As shown below, you cannot reference footnotes defined within equations, since the
\label
links to the equation, not the footnote.It seems strange to me to have footnotes within equations, and some people would agree, so I might reconsider if this is absolutely necessary.
MWE
Code
Result