The method of the previous section to generated
symbolic hyperized links can
easily be extended to external documents
processed by LaTeX2HTML. When LaTeX2HTML
processes a document, it generates a perl file named labels.pl
which contains a list of all the symbolic labels that were defined, along with
their locations. The name of this file is preceeded by
the , to allow different document segments
to share the same directory. Links to an external
document are then possible once a connection is established
to that document's labels.pl file. This connection is
established by the \externallabels
command:
\externallabels{<URL to directory of external document>} {<external document labels.pl file>}
The first argument to externallabels should be a URL to the directory containing the external document. The second argument should be the full pathname to the labels.pl file belonging to the external document. Note that for remote external documents it is necessary to copy the labels.pl file locally so that it can be read when processing a local document that uses it. The command externallabels can be used once for each external document in order to import the external labels into the current document. A warning is given if labels.pl cannot be found.
If a symbolic reference made in either of the commands described in
Section 3.4 is not defined within the document itself,
LaTeX2HTML will look for that reference in one of the external
files.
After any modifications in an external document (sections added/deleted,
segmentation into different physical parts, etc.) a new labels.pl
will be generated. If the externallabels command in another
document contains the correct address
to the labels.pl file, then the cross-references will be realigned
after running the local document through the translator.
There is also a mechanism analogous to the label-ref pairs of LaTeX, which can be used only within a single document. These labels are called internal labels , as opposed to the external labels defined above.
Either type of label is defined with a LaTeX
label command. Labels can be referenced within
a document using a ref command.
When processed by LaTeX, each ref command is replaced by the
section number in which the corresponding label occurred.
When processed by the translator, each ref is replaced by
a hypertext link to the place where the corresponding label
occurred. This mechanism can be extended to external documents
by the \externalref{}
command:
\externalref{<symbolic label in remote document>}
The argument to externalref may be any symbolic label defined in any of the external documents in the same Such references to external symbolic labels are then translated into hyperlinks pointing to the external document.