GeneralOdd cross reference result.

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Odd cross reference result.

Post by tripwire45 »

In a line of text, I want to be able to refer back to another line of text on a previous page where the subject being discussed is also mentioned. These aren't really sections, chapters, figures or such, so I'm not using the "classic" label keys such as \label{sec:this} or \label{chap:that}. I'm trying to be unique, so to label the overview on users, I've created a label, \label{ov:users} and for the page about users locked out of their accounts, I've created \label{page:lock}. I use the \pageref{} tag to create the references to the page numbers where the labels occur.

When I compile, I get a warning the first time about labels having been changed and advising me to compile again. I compile again and the warnings go away. I view the references in the compiled PDF document and the appropriate page numbers have printed (in this case, pages 27 and 34, respectively). The problem is that when I hover over both reference links, they both say page 27. When I click on either link, they both take me to page 27. Why won't the link that prints 34, take me to page 34?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
tripwire45
Posts: 129
Joined: Thu Apr 10, 2008 4:35 am

Re: Odd cross reference result.

Post by tripwire45 »

Nevermind. I solved the problem by using the \phantomsection tag where I want to put the label. Here's where I found it:

http://en.wikibooks.org/wiki/LaTeX/Labe ... tomsection
Post Reply