Prev Up Next
Go backward to 8.2 Links to external information
Go up to 8 Moving information around
Go forward to 8.4 Bibliography and citation

8.3 Links into your document

The Hyperlatex converter automatically partitions your document into HTML-nodes. These nodes are simply numbered sequentially. Obviously, the resulting URL's are not useful for external references into your document--after all, the exact numbers are going to change whenever you add or delete a section, or when you change the htmldepth.

If you want to allow links from the outside world into your new document, you will have to give that HTML node a mnemonic name that is not going to change when the document is revised.

This can be done using the \xname{name} command. It assigns the mnemonic name name to the next node created by Hyperlatex. This means that you ought to place it in front of a sectioning command. The \xname command has no function for the LaTeX-document. No warning is created if no new node is started in between two \xname commands.

The argument of \xname is not expanded, so you should not escape any special characters (such as _). On the other hand, if you reference it using \xlink, you will have to escape special characters.

Here is an example: This section "Links into your document" in this document starts as follows.

   \xname{hyperlatex_extlinks}
   \subsection{Links into your document}
   \label{sec:into-hyperlinks}
   The Hyperlatex converter automatically...
This HTML-node can be referenced inside this document with
   \link{External links}{sec:into-hyperlinks}
and both inside and outside this document with
   \xlink{External links}{hyperlatex\_extlinks.html}

If you want to refer to a location inside an HTML-node, you only need to make sure that the label you place with \label is a legal URL. In other words, it should only contain characters in the set

   a-z A-Z 0-9 $ - _ . + ! * ' ( ) ,
(All labels that contain other characters are replaced by an automatically created numbered label by Hyperlatex.)

The previous paragraph starts with

   \label{label_urls}
   \cindex[label]{\verb+\label+}
   If you want to refer to a location \emph{inside} an \Html-node,... 
You can therefore refer to that position from any document using
   \xlink{refer to that position}{hyperlatex\_extlinks.html\#label\_urls}
(Note that # and _ have to be escaped in the \xlink command.)
Otfried Schwarzkopf, September 2, 1997

Prev Up Next