# Clickable Table Footnote

I'm trying to have some clickable footnotes within tables. I tried using \footnote{}, it does create a link but there's no footnote text associated with it. \footnotemark[number] along with \footnotetext[]{} does create a fotenote but then there's no hyperlink. (I would like to make it clear that I'm trying to have footnotes at the bottom of the page and not footnotes within the table.)

Here's a small code snippet:

\documentclass{report}
\usepackage{hyperref}
\begin{document}

\begin{table}[h!]
\centering
\begin{tabular}{|r|r|r|}
\hline
A\footnote{Test!} & B\footnotemark[4] & C\footnotemark[5]\\
\hline
123 & Tim & Jane\\
\hline
456 & Tom & Jung\\
\hline
\end{tabular}
\caption{A table}
\end{table}

This is a clickable footnote\footnote{You clicked me!}.

\footnotetext[4]{This is B}
\footnotetext[5]{This is C}

\end{document}

-
Footnotes in floats are not really a good idea. You better create table notes with »threeparttable«. –  Thorsten Donig Nov 28 '10 at 13:13
Do any of the answers here help? tex.stackexchange.com/questions/1583/footnotes-in-tables –  Seamus Nov 28 '10 at 14:49
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count. This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). Also upvoting an answer or two is appreciated. –  Stephen Mar 22 '12 at 19:23

From the hyperref README, Section 8 "Hints", p. 26:

The footnote support is rather limited. It is beyond the scope to use \footnotemark and \footnotetext out of order or reusing \footnotemark. Here you can either disable hyperref’s footnote support by "hyperfootnotes=false" or fiddle with internal macros [...]

P. 26-27 give some "nasty examples"; I've used the second one as groundwork to modify your code example. This is what I came up with:

\documentclass{report}

\usepackage{hyperref}

\begin{document}
\makeatletter

\begin{table}[h!]
\centering
\begin{tabular}{|r|r|r|}
\hline
A & B\footnotemark\global\let\saved@Href@B\Hy@footnote@currentHref & C\footnotemark\global\let\saved@Href@C\Hy@footnote@currentHref \\
\hline
123 & Tim & Jane\\
\hline
456 & Tom & Jung\\
\hline
\end{tabular}
\caption{A table}
\end{table}

\let\Hy@footnote@currentHref\saved@Href@B
\footnotetext{This is B}
\let\Hy@footnote@currentHref\saved@Href@C
\footnotetext{This is C}

This is a clickable footnote\footnote{You clicked me!}.

\end{document}


By the way I agree with Thorsten Donig that footnotes in floats are not a good idea.

-

You can use the tablefootnote package (loaded after hyperref) and in the table \tablefootnote instead of \footnote. There is no optional parameter to the command, but you do want automatic numbering if I understand your question right.

\documentclass{report}
\usepackage{hyperref}
\usepackage{tablefootnote}
\begin{document}

This is a clickable footnote\footnote{You clicked me!}.

\begin{table}[h!]
\centering
\begin{tabular}{|r|r|r|}
\hline
A\tablefootnote{Test!} & B\tablefootnote{This is B} & C\tablefootnote{This is C}\\
\hline
123 & Tim & Jane\\
\hline
456 & Tom & Jung\\
\hline
\end{tabular}
\caption{A table}
\end{table}

This is a another clickable footnote\footnote{Now you clicked me!}.

\newpage

To test the hyperlinks it is very useful to have a second page in the document!

\end{document}

-
Already i have given the solution for this in the title: "footnote in the column name of a table" –  Mu30 Mar 22 '12 at 10:54
@S.Murugan: Your answer tex.stackexchange.com/questions/46602/… is dated Mar 9 2012 at 14:49, but my answer here was given Feb 12 2012 at 14:38, and in my humble opinion 2012/02/12 is before 2012/03/09. Or do I misunderstand your comment? –  Stephen Mar 22 '12 at 19:19
@S.Murugan: "By chance" at the same time you gave your comment my answer was downvoted. In case you are the downvoter, I do not understand this: You are using this approach in an answer of your own, tex.stackexchange.com/questions/46602/…, but downvote another, earlier answer with this approach? It would be nice if you could explain this. –  Stephen Mar 22 '12 at 19:40
@S.Murugan and your answer at tex.stackexchange.com/questions/46602/… is obviously copied from my answer tex.stackexchange.com/a/35328 of Nov 18 '11. –  Stephen Mar 22 '12 at 20:41