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.

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:

\documentclass{article}

\usepackage{showlabels}

\usepackage{lipsum}

\begin{document}

\lipsum[1]\label{text}

\end{document}

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:

\documentclass{article}

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

\usepackage{lipsum}

\begin{document}

\hypertarget{text}{\lipsum[1]}

\end{document}
share|improve this question

1 Answer 1

up vote 6 down vote accepted

The following answer may surprise you:

\usepackage{showlabels}
\usepackage{hyperref}
\showlabels{hypertarget}
share|improve this answer

Your Answer

 
discard

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.