[Tex/LaTex] \pageref points to wrong page number

cross-referencinghyperref

I'm having a small problem with \pageref{} in LaTeX. I have a quite a large document, and towards the end I point to specific pages in the text. Using hyperref, the link jumps to the correct part of the document, but the actual page number is incorrect.

This is slightly similar (but kind of opposite) to this problem:

LaTeX hyperref link goes to wrong page

I implemented the solution there (\refstepcounter{dummy}), but to no avail. The targets of the \pagerefs are generally text. One such example is:

...these\refstepcounter{dummy}\label{s82:rclass} classifications are....

later referenced by:

\S\ref{s82:richness}, p.\pageref{s82:rclass}

Where the first ref is the section the text lives in. I'm using the following (if this helps), in addition to hyperref:

\documentclass[11pt]{book}

\usepackage[round]{natbib}

I should note that this works correctly towards the start of the document (where I reference forwards rather than backwards, though I'm not sure if that's significant or not). That said, it also does not work when I attempt a reference forwards in the same chapter (document is a thesis)

Many thanks in advance for your help. I would like to include a minimal working example, but the referencing works as expected for the small document I tested. I would be keen to solicit suggestions as to what the problem could be, however.

Best Answer

I assume you did the obvious checks:

  • there is no Rerun to get cross references right in the log file,
  • and no warnings about duplicate labels.

Do you use \pagenumbering{..}? (It should still work). Rerun LaTeX as indicated. Theoretically it is possible that you never reach a fix point but that is very unlikely. I am not sure, but at most three runs of pdflatex after bibtex should suffice.