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

Is it possible to create hyperlinks in LaTeX that will show up as arbitrarily defined strings in the output (PDF/DVI)?

For example, something like to appear in the output file:

Text text text text text text text text text text.

Here, would direct the reader to a position in the document that would be chosen arbitrarily by the user, e.g. to the end of the 45th paragragh.

share|improve this question
up vote 5 down vote accepted

I think you're looking for the hypertarget and hyperlink commands from the hyperref pacakge.



In the beginning \hyperlink{linkanchorname}{Text text text text text text text text text text.}


\hypertarget{linkanchorname}{Here's our anchor!}

The example I've demonstrated above is very simplistic, but you can do a lot with this idea. For example, you can link questions and answers to and from each other which has been demonstrated in a lot of questions- Adding another answer hyperlinked to the question itself is one such example.

share|improve this answer
Or \hyperref[<label>]{text} and \phantomsection\label{<label>}. – Werner Sep 1 '12 at 17:01
Nice! It's times like these that remind you why you use (La)TeX. – User 17670 Sep 1 '12 at 17:09

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.