Index
Go up to Moving information around
Go forward to Links to external information

Cross-references

You can use the \label{label} command to attach a label to a position in your document. This label can be used to create a hyperlink to this position from any other point in the document. This is done using the \link command:
  \link{anchor}{label}
This command typesets anchor, expanding any commands in there, and makes it an active hyperlink to the position marked with label:
   This parameter can be set in the
   \link{configuration panel}{sect:con-panel} to influence ...
The \link command does not do anything exciting in the printed document. It simply typesets the text anchor. If you also want a reference in the LaTeX output, you will have to add a reference using \ref or \pageref. This reference has to be escaped from the Hyperlatex converter. Sometimes you will want to place the reference directly behind the anchor text. In that case you can use the optional argument to \link:
   This parameter can be set in the
   \link{configuration
     panel}[~(Section~\ref{sect:con-panel})]{sect:con-panel} to
   influence ... 
The optional argument is ignored in the HTML-output.

The starred version \link* suppressed the anchor in the printed version, so that we can write

   We will see \link*{later}[in Section~\ref{sl}]{sl}
   how this is done.
It is very common to use \ref{label} or \pageref{label} inside the optional argument, where label is the label set by the link command. In that case the reference can be abbreviated as \Ref or \Pageref (with capitals). These definitions are already active when the optional arguments are expanded, so we can write the example above as
   We will see \link*{later}[in Section~\Ref]{sl}
   how this is done.
Often this format is not useful, because you want to put it differently in the printed manual. Still, as long as the reference comes after the \link command, you can use \Ref and \Pageref.
   \link{Such a file}{ipe-file} is at
   the same time ... a legal \LaTeX{}
   file\texonly{---see Section~\Ref}.
  Note that when you use LaTeX's \ref command, the label does not mark a position in the document, but a certain object, like a section, equation etc. It sometimes requires some care to make sure that both the hyperlink and the printed reference point to the right place, and sometimes you will have to place the label twice. The HTML-label tends to be placed before the interesting object--a figure, say--, while the LaTeX-label tends to be put after the object (when the \caption command has set the counter for the label).

A special case occurs for section headings. Always place labels after the heading. In that way, the LaTeX reference will be correct, and the Hyperlatex converter makes sure that the link will actually lead to a point directly before the heading--so you can see the heading when you follow the link.


otfried@postech.vision.ac.kr

Up Next