next up previous contents index
Next: Example Up: Special Features Previous: Hyperlinks in LaTeX

Cross-References Between Living Documents

  This section describes a mechanism for establishing cross-references between two or more documents via symbolic labels which are independent of the physical realisation of these documents. The documents involved may reside in remote locations and may be spread across one or more HTML files.

The mechanism is an extension of the simple label-ref pairs which can be used only within a single document. A symbolic label defined with a label command can be referred to 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. The new commands detailed below show how it is possible to refer to symbolic labels defined with label in other external documents. Such references to external symbolic labels are then translated into hyperlinks pointing to the external document.

    Cross-references between documents are established with the commands:

\externallabels{<URL to directory of external document>}
               {<external document labels.pl file>}

\externalref{<label in remote document>}

  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. The file labels.pl associates symbolic labels with physical files and is generated automatically for each translated documentgif. The command externallabels can be used once for each external document in order to import the external labels into the current document. The argument to externalref may be any symbolic label defined in any of the external documents in the same way that the ref command refers to labels defined internally.

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. A warning is given if labels.pl cannot be found.




next up previous contents index
Next: Example Up: Special Features Previous: Hyperlinks in LaTeX



Riichiro Saito
1995年08月30日(水) 09時35分08秒 JST