(eplain.info)Explicit hyperlinks


Next: Implicit hyperlinks Prev: Introduction to hyperlinks Up: Hyperlinks
Enter node , (file) or (file)node

5.2 Explicit hyperlinks
=======================

Explicit hyperlinks are created by you, in the source of your document.
The simplest command is '\hldest', which marks the current position in
your document as a destination:

     \hldest{TYPE}{OPTIONS}{LABEL}

Here TYPE is one of the destination types supported by the hyperlink
driver (Note: Hyperlink drivers), OPTIONS is a comma-separated list of
option assignments, and LABEL is the hyperlink label to associate with
this destination. This label will identify the destination when creating
links pointing to this destination. For example, with the 'pdftex'
driver, the command

     \hldest{xyz}{zoom=2000}{index}

creates a destination of type 'xyz' ("the current position"), sets the
magnification ratio for this destination to be 200%, and associates the
label 'index' with the destination.

   Another command, '\hlstart', paired with '\hlend', turns all
intervening material into a link:

     \hlstart{TYPE}{OPTIONS}{LABEL} ... \hlend

Here TYPE, OPTIONS and LABEL have the same meaning as for '\hldest'.
Continuing the previous example,

     \hlstart{name}{bstyle=U,bwidth=2}{index} Index\hlend

typesets the word 'Index' as a link with underline border of
width 2 PostScript points, pointing to the named destination 'index'
defined in the previous example. (The other options, like highlight mode
and border color, are determined by the defaults, Note: Setting default
types and options).

   The LABEL argument of both '\hldest' and '\hlstart' can contain
special characters (such as '#', '%', '&', '~', etc.) without any
escaping. This is especially important for URL links supported by some
drivers (Note: Hyperlink drivers).

   Both '\hldest' and '\hlstart' ignore following spaces.

   Both '\hldest' and '\hlstart' expand the first token of OPTIONS once,
so you can save a list of options in a macro and pass it for the
OPTIONS. For example:

     \def\linkopts{bstyle=U,bwidth=2}
     \hlstart{name}{\linkopts}{index}Index\hlend

is functionally equivalent to the previous example.

   *Note Hyperlinks (xhyper.tex)::, for a demonstration of the usage of
explicit hyperlinks.


automatically generated by info2www version 1.2.2.9