Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

1  
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

1 Answer 1

up vote 5 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.