[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 RefTeX in a Nutshell

  1. Table of Contents
    Typing C-c = (reftex-toc) will show a table of contents of the document. This buffer can display sections, labels and index entries defined in the document. From the buffer, you can jump quickly to every part of your document. Press ? to get help.
  2. Labels and References
    RefTeX helps to create unique labels and to find the correct key for references quickly. It distinguishes labels for different environments, 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).
  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 the variable reftex-cite-format if you want to insert different macros).
  4. Index Support
    RefTeX helps to enter index entries. It also compiles all entries into an alphabetically sorted ‘*Index*’ buffer which you can use to check and edit the entries. RefTeX knows about the standard index macros and can be configured to recognize any additional macros you have defined (reftex-index-macros). Multiple indices are supported.
  5. 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 in the echo area.
  6. Multifile Documents
    Multifile Documents are fully supported. The included files must have a file variable TeX-master or tex-main-file pointing to the master file. RefTeX provides cross-referencing information from all parts of the document, and across document borders (‘xr.sty’).
  7. 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 and reftex-index are 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, the table of contents buffer, or the index buffer.
  8. AUCTeX
    If your major LaTeX mode is AUCTeX, RefTeX can cooperate with it (see variable reftex-plug-into-AUCTeX). AUCTeX contains style files which trigger appropriate settings in RefTeX, so that for many of the popular LaTeX packages no additional customizations will be necessary.
  9. Useful Settings
    To integrate RefTeX with AUCTeX, use
    (setq reftex-plug-into-AUCTeX t)

    To make your own LaTeX macro definitions known to RefTeX, customize the variables

    reftex-label-alist          (for label macros/environments)
    reftex-section-levels       (for sectioning commands)
    reftex-cite-format          (for \cite-like macros)
    reftex-index-macros         (for \index-like macros)
    reftex-index-default-macro  (to set the default macro)

    If you have a large number of macros defined, you may want to write an AUCTeX style file to support them with both AUCTeX and RefTeX.

  10. Where Next?
    Go ahead and use RefTeX. Use its menus until you have picked up the key bindings. For an overview of what you can do in each of the different special buffers, press ?. Read the manual if you get stuck, or if you are curious what else might be available. The first part of the manual explains in a tutorial way how to use and customize RefTeX. The second part is a command and variable reference.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ralf Angeli on August, 9 2009 using texi2html 1.78.