Document 536

The LaTeX xr package

Version: 3.x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

The xr package uses standard TeX \ref and \pageref commands to create cross-references and page references to labels outside the current document. You can declare as many external documents as you want. You must compile your document outside SWP or SW.

How to create cross-references and page references to labels in other documents

  1. Add the xr package to your document.
  2. Declare the external documents:
    1. From the Typeset menu, choose Preamble.
    2. Click the mouse in the entry area.
    3. On a new line, type this command to declare the document for which you want to create a cross-reference: \externaldocument{file} where file is the name of another document.
      Note Don't include the file extension.
    4. Repeat step c for as many files as necessary.
    5. Choose OK.
  3. Place the insertion point where you want the cross-reference to occur.
  4. Enter a TeX field.
  5. In the entry area, type \ref{label} or \pageref{label} where label is the label in the external document.
  6. Choose OK.

No options are available. The xr package is installed in the TCITeX/TeX/LaTeX/required/tools directory as part of the Standard LaTeX Tools Bundle.

Last revised 06/28/06

This document was created with Scientific WorkPlace.