[pdftex] problem with hyperref and tables

Todd West twest at ee.washington.edu
Fri Mar 21 14:05:49 CET 2003


I'm using pdfLaTex 1.10b from Cygwin's TeTeX distribution and am having a
problem with hyperref generating incorrect links to tables.

Given something like

\documentstyle[letterpaper,10pt]{article}
\usepackage[pdftex,bookmarks,bookmarksnumbered,bookmarksopen]{hyperref}
%hyperref is last package used; no more after this
\begin{document}
\section{Section One}
\label{sec:One}

blah blah blah

\section{Section Two}
\label{sec:Two}

\subsection{Section Two Point One}
\label{sec:TwoPointOne}

text text see table \ref{TableOne} text

\begin{table}
\label{TableOne}
\begin{tabular}
table & guts \\
\end{tabular}
\caption{Table One}
\end{table}

\end{document}

the resulting PDF hyperref has the number of the section which contains
TableOne and points to some place in SectionTwoPointOne.  So what I get is

text text see table 2.1 text

and a hyperlink pointing to an apparently random position in section 2.1
instead of

text text see table 1 text

and a link pointing to table 1.

Also, if I do

text text see table \ref{TableOne} on page \pageref{TableOne} text

I get

text text see table 2.1 on page 9 text

which is the correct page number, but the link for page 9 actually goes to
page 8.  Sometimes the link for the table and the page go to the same
(wrong) location, but other times they go to different locations.

Section references like \ref{sec:TwoPointOne} are working fine.  I've tried
various variations on hyperref parameters, margin parameters, turning off
other packages I'm using, and so on with no effect, so this seems to be a
pretty straight up hyperref problem.

Any advice how to work around these problems would be appreciated.  Thanks
in advance,

Todd



More information about the pdftex mailing list