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

When I label an equation and later have a reference to it, then by clicking the corresponding link the pdf I jump to that equation, with the equation being exactly at the top of the page. Same goes for footnotes.

But when I just insert a label in the text (for example near a theorem for the purpose to have a link to that theorem in my text) and later in the text have a reference to it and then click on the corresponding link in the pdf, I don't jump exactly to the place where the label was (meaning it isn't at the top of the page like equations ans footnotes anymore), just to right page - with the place where the label was being somewhere around the middle.

What can I do so that the link will send me to the place where the label was, with it being at the top of the page (like for equations) ?

P.S. I use LxY 2.

share|improve this question
Have you used \usepackage[all]{hypcap} loaded after hyperref package? – kiss my armpit Mar 10 '12 at 11:38
Do you still get to exactly the beginning of the theorem? – Andrey Vihrov Mar 10 '12 at 11:48
@DamienWalters Didn't work. But the accepted answer did. – user10324 Mar 16 '12 at 17:46
up vote 11 down vote accepted

Links jump to the last anchor. Normally hyperref inserts such anchors at sensible places, but if you want a specific location you must do it yourself.




A: \ref{A} to section title

B: \ref{B} to ANCHOR
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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