Document 533

The LaTeX varioref package

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

The varioref package enhances page references with text that varies depending on the relative typeset location of the referenced key. The package uses standard references (using a TeX \ref command) when the command and the key occur on the same page. However, when the command and key vary by a page or more, the package inserts strings such as on the facing page, on the preceding page, on the following page, or on the next page. When the difference is greater than one page, varioref inserts both an enhanced reference and a standard reference. The varioref package supports babel so that the strings produced are customized for different languages. Also, you can customize the text strings as necessary.

How to enhance page references

  1. Add the varioref package to your document.
  2. Place the insertion point where you want the reference to appear.
  3. Enter an encapsulated TeX field.
  4. In the entry area, type one of the varioref commands:
    Command Effect
    \vref{key} Create an enhanced reference.
    \vpageref[text]{key} Create an enhanced page reference.
    \vrefrange{key}{key} Create an enhanced range of references.
    \vpagerefrange[text]{key}{key} Create an enhanced range of page references.

    where key is the key you want to refer to and text is the enhancement text you want to use if the keys and references are on the same page.
  5. Choose OK.

Additionally, a package option is available to aid troubleshooting. The varioref package is installed in the TCITeX/TeX/LaTeX/required/tools directory as part of the Standard LaTeX Tools Bundle.

Last revised 01/20/06

This document was created with Scientific WorkPlace.