Download RefTEX User Manual

Transcript
Chapter 3: Labels and References
19
of having your favorite referencing macro preselected and if cycling through the macros
seems inconvenient to you.2
In former versions of RefTEX only support for varioref and fancyref was included.
varioref is a LaTEX package to create cross-references with page information. fancyref
is a package where a macro call like \fref{fig:map-of-germany } creates not only the
number of the referenced counter but also the complete text around it, like ‘Figure 3 on
the preceding page’. In order to make it work you need to use label prefixes like ‘fig:’
consistently – something RefTEX does automatically. For each of these packages a variable
could be configured to make its macros to take precedence over \ref. Those were reftexvref-is-default and reftex-fref-is-default respectively. While still working, these
variables are deprecated now. Instead of setting them, the variable reftex-ref-styledefault-list should be adapted now.
3.7 xr: Cross-Document References
The LaTEX package xr makes it possible to create references to labels defined in external
documents. The preamble of a document using xr will contain something like this:
\usepackage{xr}
\externaldocument[V1-]{volume1}
\externaldocument[V3-]{volume3}
and we can make references to any labels defined in these external documents by using the
prefixes ‘V1-’ and ‘V3-’, respectively.
RefTEX can be used to create such references as well. Start the referencing process
normally, by pressing C-c ). Select a label type if necessary. When you see the label
selection buffer, pressing x will switch to the label selection buffer of one of the external
documents. You may then select a label as before and RefTEX will insert it along with the
required prefix.
For this kind of inter-document cross-references, saving of parsing information and the
use of multiple selection buffers can mean a large speed-up (see Section 7.7 [Optimizations],
page 36).
2
You could e.g. bind reftex-varioref-vref to C-c v and reftex-fancyref-fref to C-c f.