[texhax] Hyperref pointer misses the correct page
Alan T Litchfield
alan at alphabyte.co.nz
Thu Jul 5 07:31:22 CEST 2012
Further,
I have tried the following approach:
1. I add the counter \newcounter{hyperfixer} into the preamble
2. I add the target \refstepcounter{hyperfixer}\label{theLabel} into the
text
3. I reference the target with \hyperref[theLabel]{\pageref*{theLabel}}
somewhere else in the text.
Page numbers are linking and displaying consistently now.
The problem seems to be that \refstepcounter{hyperfixer} is
indiscriminate. While the page numbers are now correctly linking,
section numbering is affected. That is, a section (e.g. 8.3) is
displayed as 109 instead of 8.3 because, I think, it is the 109th anchor
in the document. However, it links to the correct anchor. Garrrgh.
Fix one, break one,...
Alan
On 5/07/12 3:16 PM, Alan T Litchfield wrote:
> Hi all, and particularly the hyperref package maintainers.
>
> With Uwe's help, my previous issues have have resolved nicely. However,
> in the process I have found a new problem. I shall try to summarise:
>
> 1. Create a standard label in a document.
> 2. Somewhere earlier in the document, a pageref is entered that points
> at the label created.
> 3. PDFLaTeX the document and page reference is created correctly (p. 106)
> 4. hyperref is loaded and links are created, but the hyperlink points to
> page 104 and not 106.
>
> Further investigation shows that hyperref might be pointing at the
> \section text and not the actual page the label is on. In this case, the
> section head is on page 104. There are other instances where the section
> text is on the same page as the label and the hyperlink points to the
> right page.
>
> \ref works as expected.
>
> Yes, the hyperref package is loaded in the correct sequence.
>
> Your help will be appreciated
>
> Alan Litchfield
--
AlphaByte
PO Box 1941, Auckland
http://www.alphabyte.co.nz
More information about the texhax
mailing list