# Include links for certain paragraphs

I would like to include links/reference points in my latex document, e.g.

The situation is the following:

There is a certain paragraph on, say page 11, and on page 13 there is a link and when the reader clicks this link (which does not necessarily have to be blue) then the reader is taken to the desired paragraph on page 11.

And I imagined my code to look like this:

Lie groups are smooth manifolds
...
Lie algebra.

Lie groups play an enormous role in modern geometry,
...
and are studied in representation theory.

In the 1940s–1950s, Ellis Kolchin, Armand Borel
...
in number theory.

On a "global" level, whenever a
...
analysis on the manifold.  (see \LinkTo{LabelLie})


Is such a construction possible?

-

There are several methods in hyperref:

• \hypertarget and \hyperlink can be used to create an anchor and a link to that anchor.
• \phantomsection\label{foo} can be referenced with arbitrary text as \hypererf[foo]{arbitrary text}.
• The following example uses \refstepcounter that automatically sets an anchor. By redefining \the<counter> the text is setup for later use with \ref:

The example file:

\documentclass{article}
\usepackage{lipsum}
\usepackage{hyperref}

\newcounter{partextdummy}
\begingroup
\renewcommand*{\thepartextdummy}{#2}%
\ifhmode
% raise the anchor above the base line in horizontal mode
\raisebox{2ex}[0pt][0pt]{%
\refstepcounter{partextdummy}%
\label{#1}%
}%
\else
\refstepcounter{partextdummy}%
\label{#1}%
\fi
\endgroup
\ignorespaces
}

\begin{document}
\lipsum[1]

\refstepcounter{<counter>} advances the counter by one and \label will use \the<counter> for the referenced number that \ref refers to. \renewcommand*{\the<counter>}{#2} replaces that number with #2. – Heiko Oberdiek Feb 23 '13 at 17:29
\CreateLink is defined by \newcommand that complains, if the command already exists. The redefinition of \thepartextdummy is local (because of \begingroup and \endgroup) and the command belongs to the counter partextdummy. – Heiko Oberdiek Feb 23 '13 at 20:14