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

The showlabels package can show labels (made with \label) in the margin of the resulting document (simply by loading the package). I'm looking for similar functionality but for \hypertarget (from the hyperref package). That is, I want every hyper target in a document to be shown. I'm asking for this to ease development of documents with hyper targets.

It would also be nice to be able to show every \hyperlink in the margin (I know that this can be done by decorating links).

To illustrate what I want let me compare the functionality of showlabels to what I want. The following example puts the names of labels in the margin:







It looks like this:

Label's name is shown in the margin

What I'm asking for is a way to put the name of hyper targets in the margin. If "text" is the name of a hyper target what I'm asking for is for something like the following code to produce a result like the image above:


\usepackage{showhypertargets}% This is just an example, this package does not exist




share|improve this question
up vote 7 down vote accepted

The following answer may surprise you:

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.