TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
When do I need invoke \phantomsection?
Incorrect link produced by hyperref

I want to reference a page containing a certain sentence. If I add a label to the sentence and use \pageref{ref}, then this refers/links to the page containing the section title. Is there anyway to force the reference to stay near the sentence in which it is placed?

share|improve this question

marked as duplicate by Ignasi, lockstep, barbara beeton, Marco Daniel, Stefan Kottwitz Jun 25 '12 at 10:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

you need to define an acnchor for the label. try to use \phantomsection before the \label{sentence} – Martin H Jun 20 '12 at 8:56
Thanks, this works perfectly. I didn't know about \phantomsection. If you formulate it as an answer, I can mark it as an answer. – nvcleemp Jun 20 '12 at 9:12
up vote 7 down vote accepted

As explained here \phantomsection is required by hyperref to find an anchor to jumpt to. Chapters, sections, figures, tables, and other environments set this automatically, but for random labels you need to write \phantomsection\label{mylabel}.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.