# Show hyper targets in resulting document

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:

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}

-
\usepackage{showlabels}