Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Answer to the problem below: I was using latex c.tex; dvipdf c.dvi to compile the pdf, instead I should use pdflatex c.tex, it also showed up that \begin{savenotes} will create links to the top of the page instead of the footnote, so instead of \begin{savenotes} and \footnote I should use \tablefootnote, credit to @cgnieder. Below the original question:

I'm trying achieve footnotes in tables that are hyperlinked (so that you can click on the footnote marker to get to the footnote text. The following example enables me to add footnotes in tables:

\documentclass[12pt]{article}

\usepackage{footnote}

\begin{document}
\begin{savenotes}
    \begin{table}[ht]
        \centering
        \begin{tabular}{|l|c|c|}
            \hline
            A & 1 & 2 \footnote{This is the first footnote.} \\
            \hline
            B & 2 & 1 \\
            \hline
            C & 3\footnote{This is the second footnote.} & 3 \\
            \hline
        \end{tabular}
        \caption{A table caption.}
        \end{table}%
    \end{savenotes}
Text\footnote{This footnote is hyperlinked.}
\end{document}

However the footnotes markers inside the table are not hyperlinked. Only the last one, outside the table is. Now, when I instead use

...
\usepackage{hyperref}
\usepackage{footnote}
...

That is:

\documentclass[12pt]{article}

\usepackage{hyperref}
\usepackage{footnote}

\begin{document}
\begin{savenotes}
    \begin{table}[ht]
        \centering
        \begin{tabular}{|l|c|c|}
            \hline
            A & 1 & 2 \footnote{This is the first footnote.} \\
            \hline
            B & 2 & 1 \\
            \hline
            C & 3\footnote{This is the second footnote.} & 3 \\
            \hline
        \end{tabular}
        \caption{A table caption.}
        \end{table}%
    \end{savenotes}
Text\footnote{This footnote is hyperlinked.}
\end{document}

I get closer, the footnote markers are not hyperlinked with a underline, however the hyperlink marker of the last footnote is hyperlinked with a box. I would like all footnote markers to be hyperlinked with a box. How can I achieve this?

Note that the question is not whether or not the footnote and footnote marker appear. I use \begin{savenotes} to do that. Rather the question is why the links are formatted as underscores and not boxes:

enter image description here or Example2

share|improve this question
    
tablefootnote can do this kind of thing... –  cgnieder May 24 '12 at 7:41
    
I substituted footnote with tablefootnote but it is in fact the same output: The problem is not weather or not the footnote marker and footnote apears but rather how the links are build: Inside the table the link is only an underscore, outside the table it is a box. It is very difficult to click on only the underscore... –  Konrad Eisele May 24 '12 at 9:49
    
Funny! Your code runs with a warning and all the links are boxed for me. Please note that your code does not produce the table in your image (but something else). May be you have to give more details. –  Harish Kumar May 24 '12 at 10:29
    
@Harish the links are boxed for me, too, but footnote one does not get hyperlinked (that's what the warning is about) and footnote two links to footnote one. –  cgnieder May 24 '12 at 10:53
1  
@Konrad I get the empty boxes, too, if I compile latex + dvips + ps2pdf. Maybe you should just try pdflatex c.tex? –  cgnieder May 24 '12 at 11:16
show 8 more comments

2 Answers 2

As we found out in the comments to the question if compiled with pdflatex the links are rectangles, i.e. the foodnote marks are inside the link boxes. latex + dvips leads to empty link boxes below the table footnotes instead.

The savenotes environment produces wrong hyperlinks, though. tablefootnote gets them right:

\documentclass[12pt]{article}

\usepackage{tablefootnote}
\usepackage{hyperref}
\begin{document}
\begin{table}[ht]
  \centering
  \begin{tabular}{|l|c|c|}
    \hline
     A & 1 & 2 \tablefootnote{This is the first footnote.} \\
    \hline
     B & 2 & 1 \\
    \hline
     C & 3\tablefootnote{This is the second footnote.} & 3 \\
    \hline
  \end{tabular}
  \caption{A table caption.}
\end{table}%

Text\footnote{This footnote is hyperlinked.}

\end{document}

enter image description here

share|improve this answer
    
I tried your example but I still get the underscore version : i.stack.imgur.com/xggYv.jpg . I'm using a debian-wheezy installation with texlive-latex-extra package. It should be the latest setup... On a old slackware using tablefootnote was not possible... –  Konrad Eisele May 24 '12 at 10:16
    
Maybe I should switch OS, what OS and distribution do you use to get that the above output? –  Konrad Eisele May 24 '12 at 10:21
    
@Konrad I have TeX Live 2011 and compiled with pdflatex. The screenshot is taken from the view in Okular but it looks the same in Acrobat Viewer –  cgnieder May 24 '12 at 10:32
    
Is it Win, Linux or MaxOSX? I guess the easiest way is maybe that I try it under Windows, which installer can I use for TeX Live 2011, is there some distribution that is most popular? I'm not that familiar with Tex... –  Konrad Eisele May 24 '12 at 11:03
1  
@Konrad the OS (openSUSE 12.1) should really have nothing to do with it... –  cgnieder May 24 '12 at 11:11
show 1 more comment

In case you're willing to consider using table notes instead of footnotes, the referable option of threeparttablex would provide a suitable command, \tnotex. While the package is originally designed to work with longtable, it also extends threeparttable environment by some commands, among them \tnotex.

 

\documentclass[12pt]{article}

\usepackage[referable]{threeparttablex}
\usepackage{footnote}
\usepackage{hyperref}

\begin{document}
    \begin{table}[ht]       
    \centering            
    \begin{threeparttable}  
        \begin{tabular}{|l|c|c|}
            \hline
            A & 1 & 2 \tnote{1} \\
            \hline
            B & 2 & 1 \\
            \hline
            C & 3\tnotex{tn:2} & 3 \\
            \hline
            Line & producing & space. \\
            \hline
        \end{tabular}
        \begin{tablenotes}
            \item[1] This is the first note.
            \item[2] \label{tn:2} This is the hyperlinked note.
        \end{tablenotes}      
    \end{threeparttable}
    \caption{A table caption.}
    \end{table}%    
Text\footnote{This footnote is hyperlinked.}
\end{document}

enter image description here

share|improve this answer
    
I tried your example but the output doesnt have any links. Only the footnote and footnote marker. My problem is that I dont get the right link: Inside the table it is only an underscore, outside the table it is a box... I want a box also inside the table. –  Konrad Eisele May 24 '12 at 9:51
    
I've added a screenshot of what I get on compilation. Did you copy and compile the entire code? –  dgs May 24 '12 at 10:24
    
The answer from cgnieder indicates that I have some delta in the latex system I use. His setup outputs i.stack.imgur.com/5lpGN.png , my setup i.stack.imgur.com/xggYv.jpg ... what kind of setup do you use? –  Konrad Eisele May 24 '12 at 10:27
    
Yes, I compiled the entire code, but (on my system) when using your \tnotex I get a "3??" as output and no red link at all... –  Konrad Eisele May 24 '12 at 10:32
    
I suppose you did compile multiple times to allow the references to be updated? You could try if latex=>PS=>PDF works on your system. Should indeed your platform cause the issue, I can't provide any help since I'm mostly on Windows/MikTeX. –  dgs May 24 '12 at 11:07
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.