# Enumeration of footnotes wrong

I have a small table, where I need a footnote and after it a text with another footnote.
So I researched for it and found out, that I shall use \footnotemark in combination with \footnotetext in the table.

But what shall I use after the table?

I have tried \footnotemark and \footnote, but always the enumeration in the footnotes list is wrong. In the text stands for example 1 and 2 and in the list of footnotes 2 and 2.

Also I tried to give numbers, but I don't want to enumerate all footnotes on myself.
Furthermore I set following options plainpages=false, hyperfootnotes=false for hyperref, because I get warnings like

name{Hfootnote.2} has been referenced but does not exist, replaced by a fixed one
pdfTeX warning (dest): name{Hfootnote.1} has been referenced but does not exist


and

destination with the same identifier (name{page.1}) has been already used, duplicate ignored


I used for the table the tabular.

-
Have a look on Is there a reliable footnote command? and tell us if it helps. –  Martin Scharrer Aug 11 '11 at 15:24
See also the UK TeX FAQ: Footnotes in tables. –  Martin Scharrer Aug 11 '11 at 15:26
Without a minimal example it's difficult to know what sort of advice would help you... –  Seamus Aug 11 '11 at 15:40
@Martin Thanks, but I don't get it running. See my edit above. –  CSchulz Aug 11 '11 at 16:01
@Seamus Minimal example is online. –  CSchulz Aug 11 '11 at 16:04

Try this example:

\documentclass{article}

\begin{document}

Some text.\footnote{A text footnote.}

\begin{table}
\centering
\begin{tabular}{ccc}
Me\footnotemark & Myself & And I\footnotemark
\end{tabular}
\caption{A table}
\end{table}

Some text.\footnote{Another text footnote.}

\end{document}


i.e. before the first footnotetext place a \addtocounter{footnote}{-1} (if there are more footnotemarks in the table, you will need -2, -3,...) and then increase it for each following footnotetext with +1.

This does not correct the hyperlinks to the footnotes!

To do this automatically (including the hyperlinks):

• \usepackage{tablefootnote} in the preamble (if rotating package is used: tablefootnote after rotating) and \tablefootnote{text of the footnote} in the table. tablefootnote

From the "Alternatives" section of the tablefootnote-package:

• The longtable package provides the longtable environment as replacement for the combined table and tabular environments. Footnotes are real footnotes (not just tablenotes), are continuously numbered and hyperlinked (when using the hyperref package), and the hyperlinks really work. As drawback the appearance of the caption changes slightly (e. g. distance to the table, width of the caption), which can probably be changed back manually. Furthermore, longtables are meaned to break over more than one page. If that is not wished, it must be prevented by \nopagebreak-commands and by ending the longtable lines with \* instead of \. longtables do not oat. (Therefore using the tablefootnote package and \FloatBarrier from the picins package before and after the table environment is similar - but tablefootnote does not change the table-caption!) sidewaystable does not work with it. http://www.ctan.org/pkg/longtable
• The supertabular package provides the mpsupertabular environment as replace- ment for the combined table and tabular environments. Footnotes are just tablenotes (with working hyperlinks when using the hyperref package), i. e. numbered a, b, c and placed below the table and not at the end of the page. Therefore there is no float problem (because the tablenotes number- ing is not included in the continouse numbering of the footnotes). Placing the supertabular inside of a sidewaystable breaks the hyperlinks to the tablenotes. http://www.ctan.org/pkg/supertabular
• The ctable package has its very own notation for dening tables. It can create tablenotes and sideways-tables. The tablenotes are not automatically hyper- linked. The ctables float. Because the tablenotes numbering is not included in the continouse numbering of the footnotes there is no float problem. http://www.ctan.org/pkg/ctable
• The footnote package provides \makesavenoteenv{table}. After loading the package and using that command in the preamble, in tables \footnote{...} can be used. Using \makesavenoteenv{tabular} and \makesavenoteenv{sidewaystable} is possible, but it neither solves the float problem, nor do the created hyperlinks work (i. e. they aim at wrong locations). The mdwtab from the same bundle is incompatible with other table-related packages (e. g. supertabular, array) and not 100% compatible with the tabular environment. http://www.ctan.org/pkg/footnote
http://www.ctan.org/pkg/mdwtab
• The tabularx package does produce footnotes for sidewaystables, but uses a, b, c instead of 1, 2, 3. The hyperlinks to the footnotes do not work. Because the footnotes numbering is not included in the continouse numbering of the other footnotes there is no float problem. http://www.ctan.org/pkg/tabularx
• Placing a tabular inside a minipage inside a table produces tablenotes. There- fore there is no float problem (because the footnotes are not continousely numbered). The hyperlinks to the table notes indeed work.
• The threeparttable package creates tablenotes again. Therefore there is no float problem (because the tablenotes are not continousely numbered with the footnotes). There are no hyperlinks to the table notes (at least not auto- matically). Using sidewaystable (with table notes) works. http://www.ctan.org/pkg/threeparttable
• The threeparttablex package creates tablenotes again. Therefore there is no float problem (because the tablenotes are not continousely numbered with the footnotes). With option referable the tablenotes are hyperlinked. Use of a sidewaystable (with table notes) did not work for me. When using the referable option according to the example in the threeparttablex manual the longtable package is used, therefore that package could be used directly without threeparttablex (see above). http://www.ctan.org/pkg/threeparttablex
-
Yes it works, but it seems pedestrian. I have a lot of tables with footnotes. Isn't there any package which do that for us? –  CSchulz Aug 12 '11 at 14:18
@H3llGhost: Please see edited answer for automatically accomplishing this. There are packages to do this indeed. –  Stephen Oct 29 '11 at 18:22

Martin Scharrer already pointed you to the TeX FAQ. Here's one way to add footnotes in tables (emphasis added):

Use \footnotemark to position the little marker appropriately, and then put in \footnotetext commands to fill in the text once you’ve closed the tabular environment.

\documentclass{article}

\begin{document}

Some text.\footnote{A text footnote.}

\begin{table}
\centering
\begin{tabular}{ccc}
Me & Myself & And I\footnotemark
\end{tabular}
\caption{A table}
\end{table}

\footnotetext{A table footnote.}

Some text.\footnote{Another text footnote.}

\end{document}

-
It seems that I used the wrong order after the tabular. But the enumeration is also wrong if you used more than one footnotemark and depending on it more footnotetext. In the list both footnotes get the same number. I have tried to give numbers manually, but they disturb the counter. –  CSchulz Aug 12 '11 at 11:50

As the FAQ points out: tables and footnotes don't work well. Use a minipage as advised or rethink your approach to tables.

-