Cross-Referencing Example

To understand this mechanism better consider how you would maintain a link to this section (of the hypertext version of this document) from one of your documents, without using labels. Sure enough you can get the name of the physical file that this section is in. This however is quite likely to change, and any links to it would become invalid. To update your link, the name of the new file must be found and your link changed by hand. Also there is no general updating mechanism, so the only way to find out if your document is pointing to the right place is by actually following the link, then doing a manual update41.


Next consider how it could be done with symbolic labels. First you have to import the labels used in this document by copying the file , saving it in /tmp/labels.pl say, then adding anywhere in your document:

\externallabels{http://cbl.leeds.ac.uk/nikos/tex2html/doc/manual}%
               {/tmp/labels.pl}
After that you can use the label `crossrefs' defined at the beginning of this section42 as follows:
\externalref{crossrefs}
This will be translated into the appropriate hyper-link to this page. If there are any changes in this document and you would like to bring your document up-to date, you have to copy again and rerun the translator on your document. Of course if I move the directory containing the HTML files for this document somewhere else, then you would have to make a change in the argument of the \externallabels command to reflect this.

It is obvious that some level of collaboration is required between authors trying to maintain cross-references between different documents. Using symbolic labels makes this a lot easier (especially for documents written by the same author).


Ross Moore
1999-03-26