The vertical scroll position after navigating to a \hypertarget from a \hyperlink (described in the hyperref manual) seems to be too low. The scroll position is at the baseline of the \hypertarget, so the target cannot be seen after clicking a \hyperlink.

If I run latex -output-format pdf document.tex twice on Mac OS X 10.8.2 to create a PDF from this document—


—all the \hyperlinks in the resulting document navigate to the baselines of their respective \hypertargets.

The example using \Hy@raisedlink is taken from hypertarget seems to aim a line too low. The example using \raisebox is taken from the same question, but I’ve commented it out because it shows different (but still unexpected) behavior.

This question is related to Certain hyperlinks (memoir+hyperref) placed too low and hypertarget seems to aim a line too low, but I am asking it as a new question because I am not using memoir, and neither of the solutions described in hypertarget seems to aim a line too low seem to work for me.

This issue seems to be the very thing that the hyperref option raiselinks is intended to address, but that option appears to have no effect on the example document.

How should one make a \hypertarget (or equivalent) that is above the baseline?

One could, I suppose, use \Hy@raisedlink with an empty \hypertarget (that is, a \hypertarget with no associated text), but I’m hoping there’s a better way.

1 Answer 1


The baseline is well known in TeX, but not the height of the current line. Only TeX knows this at a later time, after paragraph breaking. Measuring the height via boxing looses line breaking. \vadjust pre of pdfTeX was (is?) not stable enough, some circumstances causes segmentation faults. To some degree LuaTeX's attributes might help at the cost of a complete different non-trivial implementation. Back to the question, the current workaround is already mentioned (e.g. \Hy@raisedlink with empty \hypertarget).

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.