RefTeX in a Nutshell
====================
1. Table of Contents
Typing `C-c =' (`reftex-toc') will show a table of contents of the
document. From that buffer, you can jump quickly to every part of
your document. Press `?' to get help.
2. Labels and References
RefTeX distinguishes labels for different environments. It knows
about all standard environments (and many others), and can be
configured to recognize any additional labeled environments you
have defined yourself (variable `reftex-label-alist').
Creating Labels
Type `C-c (' (`reftex-label') to insert a label at point. RefTeX
will either
- derive a label from context (default for section labels)
- prompt for a label string (default for figures and tables) or
- insert a simple label made of a prefix and a number (all other
environments)
This is configurable with the variable `reftex-insert-label-flags'.
Referencing Labels
To make a reference, type `C-c )' (`reftex-reference'). This
shows an outline of the document with all labels of a certain type
(figure, equation,...) and some label context. Selecting a label
inserts a `\ref{LABEL}' macro into the original buffer.
3. Citations
Typing `C-c [' (`reftex-citation') will let you specify a regular
expression to search in current BibTeX database files (as
specified in the `\bibliography' command) and pull out a list of
matches for you to choose from. The list is *formatted* and
sorted. The selected article is referenced as `\cite{KEY}' (see
variable `reftex-cite-format').
4. Viewing Cross-References
When point is on the KEY argument of a cross-referencing macro
(`\label', `\ref', `\cite', `\bibitem', `\index', and variations)
or inside a BibTeX database entry, you can press `C-c &'
(`reftex-view-crossref') to display corresponding locations in the
document and associated BibTeX database files.
When the enclosing macro is `\cite' or `\ref' and no other message
occupies the echo area, information about the citation or label
will automatically be displayed.
5. Multifile Documents
Multifile Documents are fully supported. RefTeX provides
cross-referencing information from all parts of the document, and
across document borders (`xr.sty').
6. Document Parsing
RefTeX needs to parse the document in order to find labels and
other information. It does it automatically once and updates its
list internally when `reftex-label' is used. To enforce
reparsing, call any of the commands described above with a raw
`C-u' prefix, or press the `r' key in the label selection buffer
or the table of contents buffer.
7. Useful Settings
To make RefTeX faster for large documents, and to integrate with
AUCTeX, try these:
(setq reftex-enable-partial-scans t)
(setq reftex-save-parse-info t)
(setq reftex-use-multiple-selection-buffers t)
(setq reftex-plug-into-AUCTeX t)