Next: , Up: Implicit hyperlinks


5.3.1 General hyperlinks: hrefint, hrefext

\href{url}{text} typesets text as a link to url. It basically does what the explicit hyperlink macros do (see Explicit hyperlinks), but is more convenient (at the expense of flexibility).

If url starts with `#', the rest of url is assumed to be a local hyperlink destination name (destination within the same document). Parameters for these links can be set by customizing the `hrefint' linkgroup. For example:

     See \href{#intro}{Introduction}

will make `Introduction' into an internal link, which might have been created, e.g., with \xrdef{intro}.

If url does not start with `#', it is assumed to be a URL link. Parameters for these links can be set by customizing the `hrefext' linkgroup. The special characters (such as `#' and `~') in the URL don't need to be escaped. For example:

     \href{http://tug.org/eplain/doc/eplain.html#Hyperlinks}{Hyperlinks
     in Eplain}

See URL hyperlinks, for another way to create URL hyperlinks.

The text argument of \href can contain verbatim text (see Verbatim listing) or other macros which manipulate character catcodes. For example:

     \href{#WeirdChars}{The weird chars \verbatim #&%$~|endverbatim}

\href does not currently handle other link types, such as `file:' and `run:' links.