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:
or
Best Answer
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: