I'm using the hyperref package to create links and targets between citations in the main text and references at the end of my document.

Clicking on one of these hyperlinks leads to displaying the hypertarget, although shifted by one line, i.e. I cannot see the first line of the hypertarget. Does anyone know this issue?


\usepackage[linktocpage]{hyperref} % interactive bookmarks
  • 1
    This is typical if you're using the low-level commands. There's a need to raise the link targets so you land with a visual of the target, rather than on the baseline. Regardless, in order to help you, we need a document that could replicate the problem. We need to copy-and-paste-and-compile and see exactly what you're seeing.
    – Werner
    Aug 3 '15 at 4:51
  • Thank you for the code edit Jesse, appreciate the help to new users
    – user222552
    Aug 3 '15 at 15:46

The target is set at the current baseline in horizontal mode. TeX does not provide the means to get the height of the current line.

  • pdfTeX provides the keyword pre for \vadjust to insert something before the current line:

    \vadjust pre{\hypertarget{...}{}}
  • \raisebox can be used to shift the target, e.g.:

  • \vadjust pre{\hypertarget{...}{}} did the trick for me. Quick and easy, thank you!
    – user222552
    Aug 3 '15 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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