The xr package^{∗}

David Carlisle^{†} carlisle@cs.man.ac.uk

1994/05/28

This package implements a system for eXternal References.

If one document needs to refer to sections of another, say aaa.tex, then this package may be loaded in the main file, and the command

\externaldocument{aaa}

given in the preamble.

Then you may use \ref and \pageref to refer to anything which has been given a \label in either aaa.tex or the main document. You may declare any number of such external documents.

If any of the external documents, or the main document, use the same \label then an error will occur as the label will be multiply defined. To overcome this problem \externaldocument has an optional argument. If you declare \externaldocument[A-]{aaa} Then all references from aaa are prefixed by A-. So for instance, if a section of aaa had \label{intro}, then this could be referenced with \ref{A-intro}. The prefix need not be A-, it can be any string chosen to ensure that all the labels imported from external files are unique. Note however that if your style declares certain active characters (: in French, " in German) then these characters can not usually be used in \label, and similarly may not be used in the optional argument to \externaldocument.

∗This file has version number v5.02, last revised 1994/05/28.

†The Author of Versions 1–4 was Jean-Pierre Drucbert