aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc/reftex.texi
diff options
context:
space:
mode:
authorRalf Angeli2012-09-30 22:30:13 +0200
committerRalf Angeli2012-09-30 22:30:13 +0200
commit4f595e1504dfbb6f81e04fb98aa4b033dd5398a4 (patch)
treeaf1c0792865deb6b2a1e986f65ea5a5930f31099 /doc/misc/reftex.texi
parent440ba3959311c5085a04d40ce778039b37246fef (diff)
downloademacs-4f595e1504dfbb6f81e04fb98aa4b033dd5398a4.tar.gz
emacs-4f595e1504dfbb6f81e04fb98aa4b033dd5398a4.zip
Merge from standalone RefTeX repository.
Here is the ChangeLog of the standalone version of RefTeX without information about Makefiles and other auxiliary files. The differences to the Emacs repository are documented in the respective ChangeLog files. 2010-11-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-create-bibtex-file): Make sure that entries with whitespace at various places are found. (reftex-extract-bib-entries-from-thebibliography): Remove superfluous backslash. 2010-10-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries-from-thebibliography): Use `with-current-buffer'. 2010-09-14 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-do-citation): Make it possible again to insert non-existent entries. 2010-01-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-syntax-table-for-bib, reftex-mode): Do not derive `reftex-syntax-table-for-bib' from `reftex-syntax-table' because parens have to retain their paren syntax in order for parsing of BibTeX entries like @book(...) to work. 2009-09-12 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-label-alist): Doc fix. * lisp/reftex-toc.el (reftex-re-enlarge): Call `enlarge-window' only if there is something to do because in Emacs the horizontal version throws an error even if the parameter is 0. 2009-08-08 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-dcr.el: Suppress byte-compiler warnings. Move provide statement to end of file. * lisp/reftex-auc.el: Suppress byte-compiler warnings. * doc/reftex.texi (Imprint): Mention Wolfgang in list of contributors. * lisp/reftex-vars.el (reftex-plug-into-AUCTeX): Doc fix. 2009-07-05 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Creating Citations): Give a hint about how to auto-revert the BibTeX database file when using external editors. * lisp/reftex-cite.el (reftex-do-citation): Save match data when asking for optional arguments. 2009-04-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Do not error out if `comment-start-skip' is not set. 2009-03-01 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-cite.el (reftex-all-used-citation-keys): Fix regexp to correctly extract all citations in the same line. 2008-12-29 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-vref-is-default) (reftex-fref-is-default): Adapt doc string. (reftex-ref-style-default-list): New name for `reftex-ref-style-active-list'. Use :set instead of :repeat. (reftex-vref-is-default, reftex-fref-is-default): Adapt to new name. * lisp/reftex-base.el (reftex-tie-multifile-symbols): Add doc string. (reftex-tie-multifile-symbols): Initialize `reftex-ref-style-list'. (reftex-untie-multifile-symbols): Add doc string. (reftex-add-index-macros): Doc fix. (reftex-ref-style-activate, reftex-ref-style-toggle) (reftex-ref-style-list): New functions. (reftex-mode-menu): Use them. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Use `reftex-ref-style-list' function. * lisp/reftex-ref.el (reftex-reference): Use `reftex-ref-style-list' function. * doc/reftex.texi (Referencing Labels): Simplify section about reference macro cycling. (Reference Styles, Options (Referencing Labels)): Adapt to changed implementation. 2008-12-18 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-in-comment): Deal correctly with escaped comment characters. 2008-11-30 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Change structure so that it is not possible to use multiple different package names within a style. (reftex-ref-style-active-list): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-sel.el (reftex-select-cycle-active-ref-styles): Remove. (reftex-select-cycle-ref-style-internal): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-ref.el: Adapt creation of `reftex-<package>-<macro>' functions to new structure of `reftex-ref-style-alist'. (reftex-reference): Adapt to new structure of `reftex-ref-style-alist'. * lisp/reftex-base.el (reftex-mode-menu): Adapt to new structure of `reftex-ref-style-alist'. * doc/reftex.texi (Options (Referencing Labels)): Adapt to new structure of `reftex-ref-style-alist'. 2008-10-16 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Referencing Labels, Reference Styles): Document changes in the referencing functionality. 2008-10-15 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-alist): Remove the symbols for symbols for macro type distinction. Add characters for macro selection. (reftex-ref-macro-prompt): New variable. * lisp/reftex-sel.el (reftex-select-cycle-ref-style-internal): Remove code for testing macro type. (reftex-select-toggle-numref-pageref): Remove. (reftex-select-label-map): Remove binding for `reftex-select-toggle-numref-pageref'. * lisp/reftex-ref.el (reftex-reference): Prompt for a reference macro if `reftex-ref-macro-prompt' is non-nil. * lisp/reftex-base.el (reftex-select-with-char): Kill the RefTeX Select buffer when done. 2008-06-07 David Kastrup <dak@gnu.org> * lisp/reftex-base.el (reftex-remove-if): Improve performance. 2008-06-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-get-string-refs): Use a regexp alternative for better performance. * doc/reftex.texi (Commands): Mention options for definition of header and footer in BibTeX files. (Options (Creating Citations)): Document `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. * lisp/reftex-cite.el (reftex-stringref-p): Remove. (reftex-get-string-refs): Do without `reftex-stringref-p' and use `reftex-remove-if' instead of the cl-based `remove-if'. (reftex-create-bibtex-file): Doc fix. * lisp/reftex-base.el (reftex-remove-if): New function. 2008-06-07 Wolfgang Mayer <wmayer7@gmail.com> * lisp/reftex-vars.el (reftex-create-bibtex-header) (reftex-create-bibtex-footer): New variables. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Accept additional optional argument `raw' and keep quotes or braces if it is non-nil. (reftex-stringref-p, reftex-get-string-refs): New functions. (reftex-create-bibtex-file): Include entries that are cross-referenced from cited entries. Include @String definitions in the resulting bib file. Add header and footer defined in `reftex-create-bibtex-header' and `reftex-create-bibtex-footer'. 2008-05-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-parse-from-file): Move backward one char if a `\' was matched after a section macro. * lisp/reftex-global.el (reftex-isearch-switch-to-next-file): Use `reverse' instead of `nreverse' and `copy-list' in order to make the byte compiler happy. Get rid of unused `orig-flist' variable. * lisp/reftex-base.el (reftex-compile-variables): Revert last change. Match `\' after a section macro. (reftex-mapconcat-with-predicate): Remove. 2008-04-13 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-mapconcat-with-predicate): New function. (reftex-compile-variables): Use it. Treat environments and macros differently in the regexp for section matching. * lisp/reftex-parse.el (reftex-parse-from-file): Use beginning of match instead of end as bound. * lisp/reftex-sel.el (reftex-select-label-map): Changing binding of reference style toggling to "s" which is not already taken. * doc/reftex.texi (Reference Styles): Reflect change in key binding for toggling reference styles. Some minor changes. 2008-03-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el: Some whitespace, doc and checkdoc fixes. 2008-03-16 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-selection-or-word): Use `reftex-region-active-p'. (reftex-index-show-entry) (reftex-index-initialize-phrases-buffer) (reftex-index-phrases-apply-to-region): Sync with Emacs trunk. * lisp/reftex-dcr.el (reftex-start-itimer-once): Silence the byte compiler. * lisp/reftex-auc.el: Move `provide' call to bottom of file. * lisp/reftex-base.el: Require easymenu and define autoloads earlier to avoid compiler warnings. (reftex-region-active-p, reftex-select-with-char) (reftex-show-commentary): Sync with version in Emacs trunk. (reftex-make-overlay, reftex-overlay-put, reftex-move-overlay) (reftex-delete-overlay): Define in a way which hides the XEmacs symbols from the byte compiler. (reftex-info): Silence the byte compiler. Use `reftex.info' instead of `reftex' in order to get the correct file. 2008-03-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-extract-bib-entries): Check if BibTeX file changed on disk and ask if it should be reread in case it did. 2008-03-02 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Lots of small fixes. (Reference Styles): New section. (varioref (LaTeX package), fancyref (LaTeX package)): Remove. (Options (Referencing Labels)): Remove descriptions of deprecated variables `reftex-vref-is-default' and `reftex-fref-is-default'. Add descriptions for `reftex-ref-style-alist' and `reftex-ref-style-active-list'. (Referencing Labels): Update regarding reference styles. 2008-02-17 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-ref.el (reftex-format-special): Add third argument for refstyle possible to be passed, making the byte compiler happy. (reftex-reference): Pass refstyle to `reftex-format-special'. * lisp/reftex-vars.el (reftex-ref-style-active-list): Make creation of type compatible with Emacs 21. (reftex-format-ref-function): Mention third argument of special format function. * lisp/reftex-base.el (reftex-mode-menu): Make creation of Reference Style menu compatible with Emacs 21. * doc/reftex.texi: Fix some typos. 2008-01-27 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-ref-style-active-list): Doc fix. * lisp/reftex-base.el (reftex-erase-all-selection-and-index-buffers) (reftex-access-parse-file): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-ref.el (reftex-offer-label-menu): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-sel.el (reftex-select-item, reftex-select-unmark): Use `mapc' instead of `mapcar' where return value is not used. * lisp/reftex-vars.el (reftex-ref-style-alist) (reftex-ref-style-active-list): New variables. (reftex-vref-is-default, reftex-fref-is-default): Adapt doc string to new implementation. Mark as obsolete. Add compatibility code for honoring the variable values in case they are set. * lisp/reftex-base.el (reftex-mode-menu): Reference styles are now computed from `reftex-ref-style-alist'. Fix typo. * lisp/reftex-ref.el (reftex-reference): Determine reference macro by looking at `reftex-ref-style-active-list' and `reftex-ref-style-alist'. Use only one special format function. (reftex-varioref-vref, reftex-fancyref-fref) (reftex-fancyref-Fref): Remove definitions. The functions are now generated from `reftex-ref-style-alist'. (reftex-format-vref, reftex-format-Fref, reftex-format-fref): Remove. (reftex-format-special): New function. * lisp/reftex-sel.el (reftex-select-toggle-varioref) (reftex-select-toggle-fancyref): Remove. (reftex-select-cycle-active-ref-styles) (reftex-select-cycle-ref-style-internal) (reftex-select-cycle-ref-style-forward) (reftex-select-cycle-ref-style-backward) (reftex-select-toggle-numref-pageref): New functions. (reftex-select-label-map): Use `v' and `V' for general cycling through reference styles. Add `p' for switching between number and page reference types. 2008-01-06 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el (reftex-pop-to-bibtex-entry) (reftex-extract-bib-entries-from-thebibliography): Match \bibitem entries with spaces or tabs in front of arguments. (reftex-insert-bib-matches): Use `mapc' instead of `mapcar' because return value is not used. 2008-01-05 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-toc.el (reftex-make-separate-toc-frame): Hide non-operational call to `focus-frame' in Emacs for the compilers's sake. 2008-01-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-dcr.el (reftex-mouse-view-crossref): Explain why point is set. * lisp/reftex-toc.el (reftex-toc-do-promote): Use `mapc' instead of `mapcar' because return value is not used. (reftex-toggle-auto-toc-recenter): Fix typo. * lisp/reftex-cite.el (reftex-do-citation): Use `mapc' instead of `mapcar' because return value is not used. 2007-10-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-format-builtin) (reftex-bibliography-commands): Add support for ConTeXt. * doc/reftex.texi (Citation Styles): Mention support for ConTeXt. 2007-08-23 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Options (Defining Label Environments)): Fix typo. 2007-07-22 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el (reftex-set-cite-format): Autoload. (reftex-access-parse-file): Create parse file in a way that does not interfere with recentf mode. (reftex-access-parse-file): Do not risk destroying an existing buffer. 2007-07-07 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-parse.el (reftex-nth-arg): Use `forward-comment' instead of `comment-forward'. The latter is not always available and the former is sufficient for LaTeX. (reftex-nth-arg): Revert last change since moving over whitespace and comments is done by `reftex-move-to-next-arg'. 2007-05-20 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi (Citation Styles): Correct some mistakes. 2007-04-03 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-cite.el: Delete trailing whitespace. (reftex-pop-to-bibtex-entry, reftex-extract-bib-entries) (reftex-parse-bibtex-entry, reftex-create-bibtex-file): Match entries containing numbers and symbol constituents. 2007-03-28 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Replace BibTeX by @BibTeX{} throughout the file. 2007-03-12 John Paul Wallington <jpw@pobox.com> * lisp/reftex-vars.el (reftex-format-ref-function) (reftex-format-cite-function): Fix custom type. 2007-03-10 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-base.el: Remove information in comment already in imprint or cluttering output of `finder-commentary'. Require reftex.el. * lisp/reftex.el: Remove. Now generated from reftex.el.in. * lisp/reftex-dcr.el: Remove version info in header. Add maintainer info. * lisp/reftex-global.el Remove version info in header. Add maintainer info. * lisp/reftex-index.el Remove version info in header. Add maintainer info. * lisp/reftex-parse.el Remove version info in header. Add maintainer info. * lisp/reftex-ref.el Remove version info in header. Add maintainer info. * lisp/reftex-sel.el Remove version info in header. Add maintainer info. * lisp/reftex-toc.el Remove version info in header. Add maintainer info. * lisp/reftex-vars.el Remove version info in header. Add maintainer info. 2007-03-08 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Include macros.texi and version.texi. Change maintainer and version information. Express TeX, LaTeX, AUCTeX and RefTeX with macros. (Imprint): Change maintainer information. 2007-03-04 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex.el: Update. * lisp/reftex-base.el (reftex-show-commentary): Look in reftex-base.el. (reftex-report-bug): New function. * lisp/reftex.el: Move original content to reftex-base.el. Add new header and automatically generated autoloads. * lisp/reftex-base.el: New file. Insert original content of reftex.el. Remove autoload for `reftex-index-phrases-mode'. Delete trailing whitespace. 2007-02-26 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-visit-phrases-buffer): Set marker when visiting buffer. This allows for returning from the phrases file to the file one was just editing instead of the file where the last phrases was added from. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-index.el (reftex-index-phrases-syntax-table): New variable. Give ?\" punctuation syntax as it usually is not used as string quote in TeX-related modes and may occur unmatched. The change also prevents fontification of quoted content. (reftex-index-phrases-mode): Use it. * lisp/reftex-cite.el (reftex-parse-bibtex-entry): Match fields containing hyphens (besides word constituents). 2007-02-25 David Kastrup <dak@gnu.org> * lisp/reftex.el (reftex-uniquify, reftex-uniquify-by-car): Replace O(n^2) algorithms with O(n log n). Introduce optional argument SORT (not yet used). TODO: figure out callers that can specify SORT, in order to further speed this up. 2007-02-25 Ralf Angeli <angeli@caeruleus.net> * lisp/reftex-vars.el (reftex-cite-key-separator): New variable. * lisp/reftex-auc.el (reftex-arg-cite): Use `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation) (reftex-figure-out-cite-format): Use `reftex-cite-key-separator'. * doc/reftex.texi (Options (Creating Citations)): Document `reftex-cite-key-separator'. * lisp/reftex-cite.el (reftex-do-citation): Return all keys, not just the first one. * lisp/reftex-auc.el (reftex-arg-cite): Correctly handle new value type returned by `reftex-citation'. 2007-02-24 Ralf Angeli <angeli@caeruleus.net> * doc/reftex.texi: Set correct filename for standalone distribution. 2007-02-07 Ralf Angeli <angeli@caeruleus.net> Create `reftex' module.
Diffstat (limited to 'doc/misc/reftex.texi')
-rw-r--r--doc/misc/reftex.texi1279
1 files changed, 738 insertions, 541 deletions
diff --git a/doc/misc/reftex.texi b/doc/misc/reftex.texi
index 69092093af8..c7efa875dc7 100644
--- a/doc/misc/reftex.texi
+++ b/doc/misc/reftex.texi
@@ -6,26 +6,44 @@
6@syncodeindex vr cp 6@syncodeindex vr cp
7@syncodeindex fn cp 7@syncodeindex fn cp
8 8
9@c Version and Contact Info 9@ifnottex
10@set VERSION 4.31 10@macro RefTeX {}
11@set EDITION 4.31 11Ref@TeX{}
12@set DATE February 2006 12@end macro
13@set AUCTEXSITE @uref{http://www.gnu.org/software/auctex/,AUCTeX distribution site} 13@macro AUCTeX {}
14@set MAINTAINERSITE @uref{http://www.gnu.org/software/auctex/reftex.html,Ref@TeX{} web page} 14AUC@TeX{}
15@end macro
16@macro BibTeX {}
17Bib@TeX{}
18@end macro
19@macro ConTeXt {}
20Con@TeX{}t
21@end macro
22@end ifnottex
23@tex
24\gdef\RefTeX{Ref\TeX}
25\gdef\AUCTeX{AUC\TeX}
26\gdef\BibTeX{Bib\TeX}
27\gdef\ConTeXt{Con\TeX t}
28@end tex
29
30@include ../emacs/emacsver.texi
31
32@set VERSION @value{EMACSVER}
33@set AUCTEXSITE @uref{http://www.gnu.org/software/auctex/,@AUCTeX{} web site}
34@set MAINTAINERSITE @uref{http://www.gnu.org/software/auctex/reftex.html,@RefTeX{} web page}
15@set MAINTAINERCONTACT @uref{mailto:auctex-devel@@gnu.org,contact the maintainers} 35@set MAINTAINERCONTACT @uref{mailto:auctex-devel@@gnu.org,contact the maintainers}
16@set MAINTAINER the AUC@TeX{} project 36@set MAINTAINER the @AUCTeX{} project
17@set SUPPORTADDRESS AUC@TeX{} user mailing list (@email{auctex@@gnu.org}) 37@set SUPPORTADDRESS @AUCTeX{} user mailing list (@email{auctex@@gnu.org})
18@set DEVELADDRESS AUC@TeX{} developer mailing list (@email{auctex-devel@@gnu.org}) 38@set DEVELADDRESS @AUCTeX{} developer mailing list (@email{auctex-devel@@gnu.org})
19@set BUGADDRESS AUC@TeX{} bug mailing list (@email{bug-auctex@@gnu.org}) 39@set BUGADDRESS @AUCTeX{} bug mailing list (@email{bug-auctex@@gnu.org})
20@set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site} 40@set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs FTP site}
21@c %**end of header 41@c %**end of header
22 42
23@copying 43@copying
24This file documents @b{Ref@TeX{}}, a package to do labels, references, 44This manual documents @RefTeX{} (version @value{VERSION}), a package
25citations and indices for LaTeX documents with Emacs. 45to do labels, references, citations and indices for LaTeX documents
26 46with Emacs.
27This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for
28@b{Ref@TeX{}} @value{VERSION}
29 47
30Copyright @copyright{} 1997-2012 Free Software Foundation, Inc. 48Copyright @copyright{} 1997-2012 Free Software Foundation, Inc.
31 49
@@ -64,9 +82,9 @@ developing GNU and promoting software freedom.''
64@end macro 82@end macro
65 83
66@titlepage 84@titlepage
67@title Ref@TeX{} User Manual 85@title @RefTeX{} User Manual
68@subtitle Support for LaTeX labels, references, citations and index entries with GNU Emacs 86@subtitle Support for @LaTeX{} labels, references, citations and index entries with GNU Emacs
69@subtitle Edition @value{EDITION}, @value{DATE} 87@subtitle Version @value{VERSION}
70 88
71@author by Carsten Dominik 89@author by Carsten Dominik
72@page 90@page
@@ -79,18 +97,17 @@ developing GNU and promoting software freedom.''
79 97
80@ifnottex 98@ifnottex
81@node Top,,,(dir) 99@node Top,,,(dir)
82@top RefTeX 100@top @RefTeX{}
83 101
84@b{Ref@TeX{}} is a package for managing Labels, References, 102@RefTeX{} is a package for managing Labels, References, Citations and
85Citations and index entries with GNU Emacs. 103index entries with GNU Emacs.
86 104
87Don't be discouraged by the size of this manual, which covers 105This manual documents @RefTeX{} version @value{VERSION}.
88@b{Ref@TeX{}} in great depth. All you need to know to use
89@b{Ref@TeX{}} can be summarized on two pages (@pxref{RefTeX in a
90Nutshell}). You can go back later to other parts of this document when
91needed.
92 106
93@insertcopying 107Don't be discouraged by the size of this manual, which covers @RefTeX{}
108in great depth. All you need to know to use @RefTeX{} can be summarized
109on two pages (@pxref{RefTeX in a Nutshell}). You can go back later to
110other parts of this document when needed.
94 111
95@menu 112@menu
96* Introduction:: Quick-Start information. 113* Introduction:: Quick-Start information.
@@ -106,8 +123,8 @@ needed.
106* Faces:: Fontification of RefTeX's buffers. 123* Faces:: Fontification of RefTeX's buffers.
107* Multifile Documents:: Document spread over many files. 124* Multifile Documents:: Document spread over many files.
108* Language Support:: How to support other languages. 125* Language Support:: How to support other languages.
109* Finding Files:: Included TeX files and BibTeX .bib files. 126* Finding Files:: Included @TeX{} files and @BibTeX{} .bib files.
110* AUCTeX:: Cooperation with AUCTeX. 127* AUCTeX:: Cooperation with @AUCTeX{}.
111* Optimizations:: When RefTeX is too slow. 128* Optimizations:: When RefTeX is too slow.
112* Problems and Work-Arounds:: First Aid. 129* Problems and Work-Arounds:: First Aid.
113* Imprint:: Author, Web-site, Thanks 130* Imprint:: Author, Web-site, Thanks
@@ -123,6 +140,7 @@ The Index
123* Index:: The full index. 140* Index:: The full index.
124 141
125@detailmenu 142@detailmenu
143 --- The Detailed Node Listing ---
126 144
127Introduction 145Introduction
128 146
@@ -136,9 +154,8 @@ Labels and References
136* Builtin Label Environments:: The environments RefTeX knows about. 154* Builtin Label Environments:: The environments RefTeX knows about.
137* Defining Label Environments:: ... and environments it doesn't. 155* Defining Label Environments:: ... and environments it doesn't.
138* Reference Info:: View the label corresponding to a \ref. 156* Reference Info:: View the label corresponding to a \ref.
157* Reference Styles:: Macros to be used instead of \ref.
139* xr (LaTeX package):: References to external documents. 158* xr (LaTeX package):: References to external documents.
140* varioref (LaTeX package):: How to create \vref instead of \ref.
141* fancyref (LaTeX package):: How to create \fref instead of \ref.
142 159
143Defining Label Environments 160Defining Label Environments
144 161
@@ -176,7 +193,7 @@ The Index Phrases File
176AUCTeX 193AUCTeX
177 194
178* AUCTeX-RefTeX Interface:: How both packages work together 195* AUCTeX-RefTeX Interface:: How both packages work together
179* Style Files:: AUCTeX's style files can support RefTeX 196* Style Files:: @AUCTeX{}'s style files can support RefTeX
180* Bib-Cite:: Hypertext reading of a document 197* Bib-Cite:: Hypertext reading of a document
181 198
182Options, Keymaps, Hooks 199Options, Keymaps, Hooks
@@ -202,18 +219,18 @@ Options, Keymaps, Hooks
202@chapter Introduction 219@chapter Introduction
203@cindex Introduction 220@cindex Introduction
204 221
205@b{Ref@TeX{}} is a specialized package for support of labels, 222@RefTeX{} is a specialized package for support of labels, references,
206references, citations, and the index in LaTeX. @b{Ref@TeX{}} wraps 223citations, and the index in @LaTeX{}. @RefTeX{} wraps itself round four
207itself round 4 LaTeX macros: @code{\label}, @code{\ref}, @code{\cite}, 224@LaTeX{} macros: @code{\label}, @code{\ref}, @code{\cite}, and
208and @code{\index}. Using these macros usually requires looking up 225@code{\index}. Using these macros usually requires looking up different
209different parts of the document and searching through BibTeX database 226parts of the document and searching through @BibTeX{} database files.
210files. @b{Ref@TeX{}} automates these time--consuming tasks almost 227@RefTeX{} automates these time-consuming tasks almost entirely. It also
211entirely. It also provides functions to display the structure of a 228provides functions to display the structure of a document and to move
212document and to move around in this structure quickly. 229around in this structure quickly.
213 230
214@iftex 231@iftex
215Don't be discouraged by the size of this manual, which covers @b{Ref@TeX{}} 232Don't be discouraged by the size of this manual, which covers @RefTeX{}
216in great depth. All you need to know to use @b{Ref@TeX{}} can be 233in great depth. All you need to know to use @RefTeX{} can be
217summarized on two pages (@pxref{RefTeX in a Nutshell}). You can go 234summarized on two pages (@pxref{RefTeX in a Nutshell}). You can go
218back later to other parts of this document when needed. 235back later to other parts of this document when needed.
219@end iftex 236@end iftex
@@ -230,51 +247,122 @@ reports or suggestions.
230@section Installation 247@section Installation
231@cindex Installation 248@cindex Installation
232 249
233@b{Ref@TeX{}} is bundled and pre--installed with Emacs since version 250@RefTeX{} has been bundled and pre-installed with Emacs since
23420.2. It was also bundled and pre--installed with XEmacs 19.16--20.x. 251version 20.2. It has also been bundled and pre-installed with XEmacs
235XEmacs 21.x users want to install the corresponding plug-in package 25219.16--20.x. XEmacs 21.x users want to install the corresponding
236which is available from the @value{XEMACSFTP}. See the XEmacs 21.x 253plug-in package which is available from the @value{XEMACSFTP}. See the
237documentation on package installation for details. 254XEmacs 21.x documentation on package installation for details.
238 255
239Users of earlier Emacs distributions (including Emacs 19) can get a copy 256Users of earlier Emacs distributions (including Emacs 19) or people
240of the @b{Ref@TeX{}} distribution from the maintainers web-page. 257craving for new features and bugs can get a copy of the @RefTeX{}
241@xref{Imprint}, for more information. 258distribution from the maintainer's web page. @xref{Imprint}, for more
259information. The following instructions will guide you through the
260process of installing such a distribution.
242 261
243@section Environment 262@subsection Building and Installing
244@cindex Finding files
245@cindex BibTeX database files, not found
246@cindex TeX files, not found
247@cindex @code{TEXINPUTS}, environment variable
248@cindex @code{BIBINPUTS}, environment variable
249 263
250@b{Ref@TeX{}} needs to access all files which are part of a multifile 264Note: Currently installation is supported for Emacs only. XEmacs users
251document, and the BibTeX database files requested by the 265might want to refer to the @RefTeX{} package available through the
252@code{\bibliography} command. To find these files, @b{Ref@TeX{}} will 266package system of XEmacs.
253require a search path, i.e. a list of directories to check. Normally 267
254this list is stored in the environment variables @code{TEXINPUTS} and 268@subsubheading Installation with make
255@code{BIBINPUTS} which are also used by @b{Ref@TeX{}}. However, on some 269
256systems these variables do not contain the full search path. If 270In order to install RefTeX, unpack the distribution and edit the header
257@b{Ref@TeX{}} does not work for you because it cannot find some files, 271of the Makefile. Basically, you need to change the path specifications
258read @ref{Finding Files}. 272for Emacs Lisp files and info files. Also, enter the name of your Emacs
273executable (usually either @samp{emacs} or @samp{xemacs}).
274
275Then, type
276
277@example
278make
279make install
280@end example
281
282to compile and install the code and documentation.
283
284Per default @RefTeX{} is installed in its own subdirectory which might
285not be on your load path. In this case, add it to load path with a
286command like the following, replacing the sample directory with the one
287where @RefTeX{} is installed in your case.
288
289@example
290(add-to-list 'load-path "/path/to/reftex")
291@end example
259 292
260@section Entering @b{Ref@TeX{}} Mode 293Put this command into your init file before other @RefTeX{}-related
294settings.
295
296@subsubheading Installation by Hand
297
298If you want to get your hands dirty, there is also the possibility to
299install by manually copying files.
300
301@enumerate a
302@item
303Copy the reftex*.el lisp files to a directory on your load path. Make
304sure that no old copy of @RefTeX{} shadows these files.
305@item
306Byte compile the files. The sequence of compiling should be:
307reftex-var.el, reftex.el, and then all the others.
308@item
309Copy the info file reftex.info to the info directory.
310@end enumerate
311
312@subsection Loading @RefTeX{}
313
314In order to make the most important functions for entering @RefTeX{}
315mode available add the following line to your init file.
316
317@example
318(require 'reftex)
319@end example
320
321@subsection Entering @RefTeX{} Mode
261 322
262@findex turn-on-reftex 323@findex turn-on-reftex
263@findex reftex-mode 324@findex reftex-mode
264@vindex LaTeX-mode-hook 325@vindex LaTeX-mode-hook
265@vindex latex-mode-hook 326@vindex latex-mode-hook
266To turn @b{Ref@TeX{}} Mode on and off in a particular buffer, use 327To turn @RefTeX{} Mode on and off in a particular buffer, use
267@kbd{M-x reftex-mode}. To turn on @b{Ref@TeX{}} Mode for all LaTeX 328@kbd{M-x reftex-mode @key{RET}}. To turn on @RefTeX{} Mode for all
268files, add the following lines to your @file{.emacs} file: 329LaTeX files, add the following lines to your @file{.emacs} file:
269 330
270@example 331@example
271(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode 332(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
272(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode 333(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
273@end example 334@end example
274 335
336That's all!
337
338To get started, read the documentation, in particular the
339summary. (@pxref{RefTeX in a Nutshell})
340
341In order to produce a printed version of the documentation, use
342@code{make pdf} to produce a reftex.pdf file. Analogously you can use
343the @code{dvi}, @code{ps}, or @code{html} targets to create DVI,
344PostScript or HTML files.
345
346@subsection Environment
347@cindex Finding files
348@cindex BibTeX database files, not found
349@cindex TeX files, not found
350@cindex @code{TEXINPUTS}, environment variable
351@cindex @code{BIBINPUTS}, environment variable
352
353@RefTeX{} needs to access all files which are part of a multifile
354document, and the BibTeX database files requested by the
355@code{\bibliography} command. To find these files, @RefTeX{} will
356require a search path, i.e. a list of directories to check. Normally
357this list is stored in the environment variables @code{TEXINPUTS} and
358@code{BIBINPUTS} which are also used by @RefTeX{}. However, on some
359systems these variables do not contain the full search path. If
360@RefTeX{} does not work for you because it cannot find some files,
361@xref{Finding Files}.
362
275@page 363@page
276@node RefTeX in a Nutshell, , Installation, Introduction 364@node RefTeX in a Nutshell, , Installation, Introduction
277@section @b{Ref@TeX{}} in a Nutshell 365@section @RefTeX{} in a Nutshell
278@cindex Quick-Start 366@cindex Quick-Start
279@cindex Getting Started 367@cindex Getting Started
280@cindex RefTeX in a Nutshell 368@cindex RefTeX in a Nutshell
@@ -289,7 +377,7 @@ can jump quickly to every part of your document. Press @kbd{?} to get
289help. 377help.
290 378
291@item 379@item
292@b{Labels and References}@* @b{Ref@TeX{}} helps to create unique labels 380@b{Labels and References}@* @RefTeX{} helps to create unique labels
293and to find the correct key for references quickly. It distinguishes 381and to find the correct key for references quickly. It distinguishes
294labels for different environments, knows about all standard 382labels for different environments, knows about all standard
295environments (and many others), and can be configured to recognize any 383environments (and many others), and can be configured to recognize any
@@ -300,7 +388,7 @@ additional labeled environments you have defined yourself (variable
300@item 388@item
301@b{Creating Labels}@* 389@b{Creating Labels}@*
302Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. 390Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point.
303@b{Ref@TeX{}} will either 391@RefTeX{} will either
304@itemize @minus 392@itemize @minus
305@item 393@item
306derive a label from context (default for section labels) 394derive a label from context (default for section labels)
@@ -325,7 +413,7 @@ into the original buffer.
325@item 413@item
326@b{Citations}@* 414@b{Citations}@*
327Typing @kbd{C-c [} (@code{reftex-citation}) will let you specify a 415Typing @kbd{C-c [} (@code{reftex-citation}) will let you specify a
328regular expression to search in current BibTeX database files (as 416regular expression to search in current @BibTeX{} database files (as
329specified in the @code{\bibliography} command) and pull out a list of 417specified in the @code{\bibliography} command) and pull out a list of
330matches for you to choose from. The list is @emph{formatted} and 418matches for you to choose from. The list is @emph{formatted} and
331sorted. The selected article is referenced as @samp{\cite@{@var{key}@}} 419sorted. The selected article is referenced as @samp{\cite@{@var{key}@}}
@@ -334,9 +422,9 @@ different macros).
334 422
335@item 423@item
336@b{Index Support}@* 424@b{Index Support}@*
337@b{Ref@TeX{}} helps to enter index entries. It also compiles all 425@RefTeX{} helps to enter index entries. It also compiles all
338entries into an alphabetically sorted @file{*Index*} buffer which you 426entries into an alphabetically sorted @file{*Index*} buffer which you
339can use to check and edit the entries. @b{Ref@TeX{}} knows about the 427can use to check and edit the entries. @RefTeX{} knows about the
340standard index macros and can be configured to recognize any additional 428standard index macros and can be configured to recognize any additional
341macros you have defined (@code{reftex-index-macros}). Multiple indices 429macros you have defined (@code{reftex-index-macros}). Multiple indices
342are supported. 430are supported.
@@ -354,7 +442,7 @@ and enter the arguments with completion.
354@b{The Index Phrases File (Delayed Indexing)}@* 442@b{The Index Phrases File (Delayed Indexing)}@*
355Type @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) to add 443Type @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) to add
356the current word or selection to a special @emph{index phrase file}. 444the current word or selection to a special @emph{index phrase file}.
357@b{Ref@TeX{}} can later search the document for occurrences of these 445@RefTeX{} can later search the document for occurrences of these
358phrases and let you interactively index the matches. 446phrases and let you interactively index the matches.
359 447
360@item 448@item
@@ -366,11 +454,11 @@ all entries.
366 454
367@page 455@page
368@item @b{Viewing Cross-References}@* 456@item @b{Viewing Cross-References}@*
369When point is on the @var{key} argument of a cross--referencing macro 457When point is on the @var{key} argument of a cross-referencing macro
370(@code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem}, 458(@code{\label}, @code{\ref}, @code{\cite}, @code{\bibitem},
371@code{\index}, and variations) or inside a BibTeX database entry, you 459@code{\index}, and variations) or inside a @BibTeX{} database entry, you
372can press @kbd{C-c &} (@code{reftex-view-crossref}) to display 460can press @kbd{C-c &} (@code{reftex-view-crossref}) to display
373corresponding locations in the document and associated BibTeX database 461corresponding locations in the document and associated @BibTeX{} database
374files. @* 462files. @*
375When the enclosing macro is @code{\cite} or @code{\ref} and no other 463When the enclosing macro is @code{\cite} or @code{\ref} and no other
376message occupies the echo area, information about the citation or label 464message occupies the echo area, information about the citation or label
@@ -380,12 +468,12 @@ will automatically be displayed in the echo area.
380@b{Multifile Documents}@* 468@b{Multifile Documents}@*
381Multifile Documents are fully supported. The included files must have a 469Multifile Documents are fully supported. The included files must have a
382file variable @code{TeX-master} or @code{tex-main-file} pointing to the 470file variable @code{TeX-master} or @code{tex-main-file} pointing to the
383master file. @b{Ref@TeX{}} provides cross-referencing information from 471master file. @RefTeX{} provides cross-referencing information from
384all parts of the document, and across document borders 472all parts of the document, and across document borders
385(@file{xr.sty}). 473(@file{xr.sty}).
386 474
387@item 475@item
388@b{Document Parsing}@* @b{Ref@TeX{}} needs to parse the document in 476@b{Document Parsing}@* @RefTeX{} needs to parse the document in
389order to find labels and other information. It does it automatically 477order to find labels and other information. It does it automatically
390once and updates its list internally when @code{reftex-label} and 478once and updates its list internally when @code{reftex-label} and
391@code{reftex-index} are used. To enforce reparsing, call any of the 479@code{reftex-index} are used. To enforce reparsing, call any of the
@@ -394,20 +482,20 @@ commands described above with a raw @kbd{C-u} prefix, or press the
394buffer, or the index buffer. 482buffer, or the index buffer.
395 483
396@item 484@item
397@b{AUCTeX} @* If your major LaTeX mode is AUCTeX, @b{Ref@TeX{}} can 485@b{@AUCTeX{}} @* If your major @LaTeX{} mode is @AUCTeX{}, @RefTeX{} can
398cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). AUCTeX 486cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). @AUCTeX{}
399contains style files which trigger appropriate settings in 487contains style files which trigger appropriate settings in
400@b{Ref@TeX{}}, so that for many of the popular LaTeX packages no 488@RefTeX{}, so that for many of the popular @LaTeX{} packages no
401additional customizations will be necessary. 489additional customizations will be necessary.
402 490
403@item 491@item
404@b{Useful Settings}@* 492@b{Useful Settings}@*
405To integrate RefTeX with AUCTeX, use 493To integrate RefTeX with @AUCTeX{}, use
406@lisp 494@lisp
407(setq reftex-plug-into-AUCTeX t) 495(setq reftex-plug-into-AUCTeX t)
408@end lisp 496@end lisp
409 497
410To make your own LaTeX macro definitions known to @b{Ref@TeX{}}, 498To make your own @LaTeX{} macro definitions known to @RefTeX{},
411customize the variables 499customize the variables
412@example 500@example
413@code{reftex-label-alist} @r{(for label macros/environments)} 501@code{reftex-label-alist} @r{(for label macros/environments)}
@@ -417,15 +505,15 @@ customize the variables
417@code{reftex-index-default-macro} @r{(to set the default macro)} 505@code{reftex-index-default-macro} @r{(to set the default macro)}
418@end example 506@end example
419If you have a large number of macros defined, you may want to write 507If you have a large number of macros defined, you may want to write
420an AUCTeX style file to support them with both AUCTeX and 508an @AUCTeX{} style file to support them with both @AUCTeX{} and
421@b{Ref@TeX{}}. 509@RefTeX{}.
422 510
423@item @b{Where Next?}@* Go ahead and use @b{Ref@TeX{}}. Use its menus 511@item @b{Where Next?}@* Go ahead and use @RefTeX{}. Use its menus
424until you have picked up the key bindings. For an overview of what you 512until you have picked up the key bindings. For an overview of what you
425can do in each of the different special buffers, press @kbd{?}. Read 513can do in each of the different special buffers, press @kbd{?}. Read
426the manual if you get stuck, of if you are curious what else might be 514the manual if you get stuck, or if you are curious what else might be
427available. The first part of the manual explains in 515available. The first part of the manual explains in
428a tutorial way how to use and customize @b{Ref@TeX{}}. The second 516a tutorial way how to use and customize @RefTeX{}. The second
429part is a command and variable reference. 517part is a command and variable reference.
430@end enumerate 518@end enumerate
431 519
@@ -463,10 +551,10 @@ Prefix argument.
463 551
464@tablesubheading{Moving around} 552@tablesubheading{Moving around}
465@item n 553@item n
466Goto next entry in the table of context. 554Goto next entry in the table of contents.
467 555
468@item p 556@item p
469Goto previous entry in the table of context. 557Goto previous entry in the table of contents.
470 558
471@item C-c C-n 559@item C-c C-n
472Goto next section heading. Useful when many labels and index entries 560Goto next section heading. Useful when many labels and index entries
@@ -506,7 +594,7 @@ always show the location corresponding to the line at point in the
506@file{*toc*} buffer. This is similar to pressing @key{SPC} after each 594@file{*toc*} buffer. This is similar to pressing @key{SPC} after each
507cursor motion. The default for this flag can be set with the variable 595cursor motion. The default for this flag can be set with the variable
508@code{reftex-toc-follow-mode}. Note that only context in files already 596@code{reftex-toc-follow-mode}. Note that only context in files already
509visited is shown. @b{Ref@TeX{}} will not visit a file just for follow 597visited is shown. @RefTeX{} will not visit a file just for follow
510mode. See, however, the variable 598mode. See, however, the variable
511@code{reftex-revisit-to-follow}. 599@code{reftex-revisit-to-follow}.
512 600
@@ -521,8 +609,8 @@ Show calling point in another window. This is the point from where
521Promote the current section. This will convert @code{\section} to 609Promote the current section. This will convert @code{\section} to
522@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is 610@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is
523an active region, all sections in the region will be promoted, including 611an active region, all sections in the region will be promoted, including
524the one at point. To avoid mistakes, @b{Ref@TeX{}} requires a fresh 612the one at point. To avoid mistakes, @RefTeX{} requires a fresh
525document scan before executing this command - if necessary, it will 613document scan before executing this command -- if necessary, it will
526automatically do this scan and ask the user to repeat the promotion 614automatically do this scan and ask the user to repeat the promotion
527command. 615command.
528 616
@@ -578,7 +666,7 @@ variable @code{reftex-toc-include-file-boundaries}.
578Toggle the display of labels in the @file{*toc*} buffer. The default 666Toggle the display of labels in the @file{*toc*} buffer. The default
579for this flag can be set with the variable 667for this flag can be set with the variable
580@code{reftex-toc-include-labels}. When called with a prefix argument, 668@code{reftex-toc-include-labels}. When called with a prefix argument,
581@b{Ref@TeX{}} will prompt for a label type and include only labels of 669@RefTeX{} will prompt for a label type and include only labels of
582the selected type in the @file{*toc*} buffer. The mode line @samp{L<>} 670the selected type in the @file{*toc*} buffer. The mode line @samp{L<>}
583indicator shows which labels are included. 671indicator shows which labels are included.
584 672
@@ -587,7 +675,7 @@ indicator shows which labels are included.
587Toggle the display of index entries in the @file{*toc*} buffer. The 675Toggle the display of index entries in the @file{*toc*} buffer. The
588default for this flag can be set with the variable 676default for this flag can be set with the variable
589@code{reftex-toc-include-index-entries}. When called with a prefix 677@code{reftex-toc-include-index-entries}. When called with a prefix
590argument, @b{Ref@TeX{}} will prompt for a specific index and include 678argument, @RefTeX{} will prompt for a specific index and include
591only entries in the selected index in the @file{*toc*} buffer. The mode 679only entries in the selected index in the @file{*toc*} buffer. The mode
592line @samp{I<>} indicator shows which index is used. 680line @samp{I<>} indicator shows which index is used.
593 681
@@ -605,18 +693,18 @@ document.
605 693
606@item r 694@item r
607@vindex reftex-enable-partial-scans 695@vindex reftex-enable-partial-scans
608Reparse the LaTeX document and rebuild the @file{*toc*} buffer. When 696Reparse the @LaTeX{} document and rebuild the @file{*toc*} buffer. When
609@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this 697@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this
610location is defined in, not the entire document. 698location is defined in, not the entire document.
611 699
612@item C-u r 700@item C-u r
613Reparse the @emph{entire} LaTeX document and rebuild the @file{*toc*} 701Reparse the @emph{entire} @LaTeX{} document and rebuild the @file{*toc*}
614buffer. 702buffer.
615 703
616@item x 704@item x
617Switch to the @file{*toc*} buffer of an external document. When the 705Switch to the @file{*toc*} buffer of an external document. When the
618current document is using the @code{xr} package (@pxref{xr (LaTeX 706current document is using the @code{xr} package (@pxref{xr (LaTeX
619package)}), @b{Ref@TeX{}} will switch to one of the external 707package)}), @RefTeX{} will switch to one of the external
620documents. 708documents.
621 709
622 710
@@ -669,11 +757,11 @@ recentering of the TOC window on the current frame with
669@cindex LaTeX classes, KOMA-Script 757@cindex LaTeX classes, KOMA-Script
670@cindex TOC entries for environments 758@cindex TOC entries for environments
671@vindex reftex-section-levels 759@vindex reftex-section-levels
672The section macros recognized by @b{Ref@TeX{}} are all LaTeX section 760The section macros recognized by @RefTeX{} are all @LaTeX{} section
673macros (from @code{\part} to @code{\subsubparagraph}) and the commands 761macros (from @code{\part} to @code{\subsubparagraph}) and the commands
674@code{\addchap} and @code{\addsec} from the KOMA-Script classes. 762@code{\addchap} and @code{\addsec} from the KOMA-Script classes.
675Additional macros can be configured with the variable 763Additional macros can be configured with the variable
676@code{reftex-section-levels}. It is also possible to add certain LaTeX 764@code{reftex-section-levels}. It is also possible to add certain @LaTeX{}
677environments to the table of contents. This is probably only useful for 765environments to the table of contents. This is probably only useful for
678theorem-like environments. @xref{Defining Label Environments}, for an 766theorem-like environments. @xref{Defining Label Environments}, for an
679example. 767example.
@@ -686,21 +774,21 @@ example.
686@cindex Label environment 774@cindex Label environment
687@cindex @code{\label} 775@cindex @code{\label}
688 776
689LaTeX provides a powerful mechanism to deal with cross--references in a 777@LaTeX{} provides a powerful mechanism to deal with cross-references in a
690document. When writing a document, any part of it can be marked with a 778document. When writing a document, any part of it can be marked with a
691label, like @samp{\label@{mark@}}. LaTeX records the current value of a 779label, like @samp{\label@{mark@}}. @LaTeX{} records the current value of a
692certain counter when a label is defined. Later references to this label 780certain counter when a label is defined. Later references to this label
693(like @samp{\ref@{mark@}}) will produce the recorded value of the 781(like @samp{\ref@{mark@}}) will produce the recorded value of the
694counter. 782counter.
695 783
696Labels can be used to mark sections, figures, tables, equations, 784Labels can be used to mark sections, figures, tables, equations,
697footnotes, items in enumerate lists etc. LaTeX is context sensitive in 785footnotes, items in enumerate lists etc. @LaTeX{} is context sensitive in
698doing this: A label defined in a figure environment automatically 786doing this: A label defined in a figure environment automatically
699records the figure counter, not the section counter. 787records the figure counter, not the section counter.
700 788
701Several different environments can share a common counter and therefore 789Several different environments can share a common counter and therefore
702a common label category. E.g. labels in both @code{equation} and 790a common label category. For example labels in both @code{equation} and
703@code{eqnarray} environments record the value of the same counter - the 791@code{eqnarray} environments record the value of the same counter -- the
704equation counter. 792equation counter.
705 793
706@menu 794@menu
@@ -709,9 +797,8 @@ equation counter.
709* Builtin Label Environments:: The environments RefTeX knows about. 797* Builtin Label Environments:: The environments RefTeX knows about.
710* Defining Label Environments:: ... and environments it doesn't. 798* Defining Label Environments:: ... and environments it doesn't.
711* Reference Info:: View the label corresponding to a \ref. 799* Reference Info:: View the label corresponding to a \ref.
800* Reference Styles:: Macros to be used instead of \ref.
712* xr (LaTeX package):: References to external documents. 801* xr (LaTeX package):: References to external documents.
713* varioref (LaTeX package):: How to create \vref instead of \ref.
714* fancyref (LaTeX package):: How to create \fref instead of \ref.
715@end menu 802@end menu
716 803
717@node Creating Labels, Referencing Labels, , Labels and References 804@node Creating Labels, Referencing Labels, , Labels and References
@@ -722,12 +809,12 @@ equation counter.
722@kindex C-c ( 809@kindex C-c (
723@findex reftex-label 810@findex reftex-label
724 811
725In order to create a label in a LaTeX document, press @kbd{C-c (} 812In order to create a label in a @LaTeX{} document, press @kbd{C-c (}
726(@code{reftex-label}). Just like LaTeX, @b{Ref@TeX{}} is context sensitive 813(@code{reftex-label}). Just like @LaTeX{}, @RefTeX{} is context sensitive
727and will figure out the environment it currently is in and adapt the 814and will figure out the environment it currently is in and adapt the
728label to that environment. A label usually consists of a short prefix 815label to that environment. A label usually consists of a short prefix
729indicating the type of the label and a unique mark. @b{Ref@TeX{}} has 816indicating the type of the label and a unique mark. @RefTeX{} has
7303 different modes to create this mark. 817three different modes to create this mark.
731 818
732@enumerate 819@enumerate
733@item 820@item
@@ -735,10 +822,10 @@ indicating the type of the label and a unique mark. @b{Ref@TeX{}} has
735@vindex reftex-derive-label-parameters 822@vindex reftex-derive-label-parameters
736@vindex reftex-label-illegal-re 823@vindex reftex-label-illegal-re
737@vindex reftex-abbrev-parameters 824@vindex reftex-abbrev-parameters
738A label can be derived from context. This means, @b{Ref@TeX{}} takes 825A label can be derived from context. This means, @RefTeX{} takes
739the context of the label definition and constructs a label from 826the context of the label definition and constructs a label from
740that@footnote{Note that the context may contain constructs which are 827that@footnote{Note that the context may contain constructs which are
741invalid in labels. @b{Ref@TeX{}} will therefore strip the accent from 828invalid in labels. @RefTeX{} will therefore strip the accent from
742accented Latin-1 characters and remove everything else which is not 829accented Latin-1 characters and remove everything else which is not
743valid in labels. This mechanism is safe, but may not be satisfactory 830valid in labels. This mechanism is safe, but may not be satisfactory
744for non-western languages. Check the following variables if you need to 831for non-western languages. Check the following variables if you need to
@@ -746,28 +833,28 @@ change things: @code{reftex-translate-to-ascii-function},
746@code{reftex-derive-label-parameters}, @code{reftex-label-illegal-re}, 833@code{reftex-derive-label-parameters}, @code{reftex-label-illegal-re},
747@code{reftex-abbrev-parameters}.}. This works best for section labels, 834@code{reftex-abbrev-parameters}.}. This works best for section labels,
748where the section heading is used to construct a label. In fact, 835where the section heading is used to construct a label. In fact,
749@b{Ref@TeX{}}'s default settings use this method only for section 836@RefTeX{}'s default settings use this method only for section
750labels. You will be asked to confirm the derived label, or edit 837labels. You will be asked to confirm the derived label, or edit
751it. 838it.
752 839
753@item 840@item
754We may also use a simple unique number to identify a label. This is 841We may also use a simple unique number to identify a label. This is
755mostly useful for labels where it is difficult to come up with a very 842mostly useful for labels where it is difficult to come up with a very
756good descriptive name. @b{Ref@TeX{}}'s default settings use this method 843good descriptive name. @RefTeX{}'s default settings use this method
757for equations, enumerate items and footnotes. The author of @b{Ref@TeX{}} 844for equations, enumerate items and footnotes. The author of @RefTeX{}
758tends to write documents with many equations and finds it impossible 845tends to write documents with many equations and finds it impossible
759to come up with good names for each of them. These simple labels are 846to come up with good names for each of them. These simple labels are
760inserted without query, and are therefore very fast. Good descriptive 847inserted without query, and are therefore very fast. Good descriptive
761names are not really necessary as @b{Ref@TeX{}} will provide context to 848names are not really necessary as @RefTeX{} will provide context to
762reference a label (@pxref{Referencing Labels}). 849reference a label (@pxref{Referencing Labels}).
763 850
764@item 851@item
765The third method is to ask the user for a label. This is most 852The third method is to ask the user for a label. This is most
766useful for things which are easy to describe briefly and do not turn up 853useful for things which are easy to describe briefly and do not turn up
767too frequently in a document. @b{Ref@TeX{}} uses this for figures and 854too frequently in a document. @RefTeX{} uses this for figures and
768tables. Of course, one can enter the label directly by typing the full 855tables. Of course, one can enter the label directly by typing the full
769@samp{\label@{mark@}}. The advantage of using @code{reftex-label} 856@samp{\label@{mark@}}. The advantage of using @code{reftex-label}
770anyway is that @b{Ref@TeX{}} will know that a new label has been defined. 857anyway is that @RefTeX{} will know that a new label has been defined.
771It will then not be necessary to rescan the document in order to access 858It will then not be necessary to rescan the document in order to access
772this label later. 859this label later.
773@end enumerate 860@end enumerate
@@ -777,9 +864,9 @@ If you want to change the way certain labels are created, check out the
777variable @code{reftex-insert-label-flags} (@pxref{Options (Creating 864variable @code{reftex-insert-label-flags} (@pxref{Options (Creating
778Labels)}). 865Labels)}).
779 866
780If you are using AUCTeX to write your LaTeX documents, you can 867If you are using @AUCTeX{} to write your @LaTeX{} documents, you can
781set it up to delegate the creation of labels to 868set it up to delegate the creation of labels to
782@b{Ref@TeX{}}. @xref{AUCTeX}, for more information. 869@RefTeX{}. @xref{AUCTeX}, for more information.
783 870
784@node Referencing Labels, Builtin Label Environments, Creating Labels, Labels and References 871@node Referencing Labels, Builtin Label Environments, Creating Labels, Labels and References
785@section Referencing Labels 872@section Referencing Labels
@@ -792,24 +879,31 @@ set it up to delegate the creation of labels to
792@findex reftex-reference 879@findex reftex-reference
793 880
794@vindex reftex-trust-label-prefix 881@vindex reftex-trust-label-prefix
795@b{Ref@TeX{}} scans the document in order to find all labels. To make 882@RefTeX{} scans the document in order to find all labels. To make
796referencing labels easier, it assigns to each label a category, the 883referencing labels easier, it assigns to each label a category, the
797@emph{label type} (for example section, table, figure, equation, etc.). 884@emph{label type} (for example section, table, figure, equation, etc.).
798In order to determine the label type, RefTeX parses around each label 885In order to determine the label type, @RefTeX{} parses around each label
799to see in what kind of environments it is located. You can speed up 886to see in what kind of environments it is located. You can speed up
800the parsing by using type-specific prefixes for labels and configuring 887the parsing by using type-specific prefixes for labels and configuring
801the variable @code{reftex-trust-label-prefix}. 888the variable @code{reftex-trust-label-prefix}.
802 889
803Referencing Labels is really at the heart of @b{Ref@TeX{}}. Press @kbd{C-c 890Referencing Labels is really at the heart of @RefTeX{}. Press @kbd{C-c
804)} in order to reference a label (reftex-reference). This will start a 891)} in order to reference a label (@code{reftex-reference}). This will
805selection process and finally insert the complete @samp{\ref@{label@}} 892start a selection process and finally insert the complete
806into the buffer. 893@samp{\ref@{label@}} into the buffer.
894
895@vindex reftex-ref-macro-prompt
896First, you can select which reference macro you want to use,
897e.g. @samp{\ref} or @samp{\pageref}. Later in the process you have
898another chance to make this selection and you can therefore disable this
899step by customizing @code{reftex-ref-macro-prompt} if you find it too
900intrusive. @xref{Reference Styles}.
807 901
808First, @b{Ref@TeX{}} will determine the label category which is required. 902Then, @RefTeX{} will determine the label category which is required.
809Often that can be figured out from context. For example, if you 903Often that can be figured out from context. For example, if you write
810write @samp{As shown in eq.} and the press @kbd{C-c )}, @b{Ref@TeX{}} knows 904@samp{As shown in eq.} and then press @kbd{C-c )}, @RefTeX{} knows that
811that an equation label is going to be referenced. If it cannot figure 905an equation label is going to be referenced. If it cannot figure out
812out what label category is needed, it will query for one. 906what label category is needed, it will query for one.
813 907
814You will then be presented with a label selection menu. This is a 908You will then be presented with a label selection menu. This is a
815special buffer which contains an outline of the document along with all 909special buffer which contains an outline of the document along with all
@@ -820,7 +914,7 @@ sufficient to identify the label. If you are unsure about a certain
820label, pressing @key{SPC} will show the label definition point in 914label, pressing @key{SPC} will show the label definition point in
821another window. 915another window.
822 916
823In order to reference a label, move to cursor to the correct label and 917In order to reference a label, move the cursor to the correct label and
824press @key{RET}. You can also reference several labels with a single 918press @key{RET}. You can also reference several labels with a single
825call to @code{reftex-reference} by marking entries with the @kbd{m} 919call to @code{reftex-reference} by marking entries with the @kbd{m}
826key (see below). 920key (see below).
@@ -871,7 +965,7 @@ window. See also the @kbd{f} key.
871Toggle follow mode. When follow mode is active, the other window will 965Toggle follow mode. When follow mode is active, the other window will
872always display the full context of the current label. This is similar 966always display the full context of the current label. This is similar
873to pressing @key{SPC} after each cursor motion. Note that only context 967to pressing @key{SPC} after each cursor motion. Note that only context
874in files already visited is shown. @b{RefTeX} will not visit a file 968in files already visited is shown. @RefTeX{} will not visit a file
875just for follow mode. See, however, the variable 969just for follow mode. See, however, the variable
876@code{reftex-revisit-to-follow}. 970@code{reftex-revisit-to-follow}.
877 971
@@ -888,8 +982,8 @@ references all marked labels.
888@item mouse-2 982@item mouse-2
889@vindex reftex-highlight-selection 983@vindex reftex-highlight-selection
890Clicking with mouse button 2 on a label will accept it like @key{RET} 984Clicking with mouse button 2 on a label will accept it like @key{RET}
891would. See also variable @code{reftex-highlight-selection}, @ref{Options 985would. See also variable @code{reftex-highlight-selection},
892(Misc)}. 986@ref{Options (Misc)}.
893 987
894@vindex reftex-multiref-punctuation 988@vindex reftex-multiref-punctuation
895@item m - + , 989@item m - + ,
@@ -923,26 +1017,15 @@ Enter a label with completion. This may also be a label which does not
923yet exist in the document. 1017yet exist in the document.
924 1018
925@item v 1019@item v
926@cindex @code{varioref}, LaTeX package 1020Cycle forward through active reference macros. The selected macro is
927@cindex @code{\vref} 1021displayed by the @samp{S<...>} indicator in the mode line of the
928@cindex LaTeX packages, @code{varioref} 1022selection buffer. This mechanism comes in handy if you are using
929Toggle between @code{\ref} and @code{\vref} macro for references. The 1023@LaTeX{} packages like @code{varioref} or @code{fancyref} and want to
930@code{\vref} macro is defined in the @code{varioref} LaTeX package. 1024use the special referencing macros they provide (e.g. @code{\vref} or
931With this key you can force @b{Ref@TeX{}} to insert a @code{\vref} 1025@code{\fref}) instead of @code{\ref}.
932macro. The current state of this flag is displayed by the @samp{S<>}
933indicator in the mode line of the selection buffer.
934 1026
935@item V 1027@item V
936@cindex @code{fancyref}, LaTeX package 1028Cycle backward through active reference macros.
937@cindex @code{\fref}
938@cindex @code{\Fref}
939@cindex LaTeX packages, @code{fancyref}
940Cycle between @code{\ref}, @code{\fref} and @code{\Fref}. The
941@code{\fref} and @code{\Fref} macros are defined in the @code{fancyref}
942LaTeX package. With this key you can force @b{Ref@TeX{}} to insert a
943@code{\fref} or @code{\Fref} macro. The current state of this flag is
944displayed by the @samp{S<>} indicator in the mode line of the
945selection buffer.
946 1029
947@tablesubheading{Exiting} 1030@tablesubheading{Exiting}
948 1031
@@ -966,7 +1049,7 @@ selection buffer.
966@item t 1049@item t
967Toggle the display of the table of contents in the selection buffer. 1050Toggle the display of the table of contents in the selection buffer.
968With prefix @var{arg}, change the maximum level of toc entries displayed 1051With prefix @var{arg}, change the maximum level of toc entries displayed
969to @var{arg}. Chapters are level 1, section are level 2. 1052to @var{arg}. Chapters are level 1, sections are level 2.
970 1053
971@item # 1054@item #
972Toggle the display of a label counter in the selection buffer. 1055Toggle the display of a label counter in the selection buffer.
@@ -974,7 +1057,7 @@ Toggle the display of a label counter in the selection buffer.
974@item % 1057@item %
975Toggle the display of labels hidden in comments in the selection 1058Toggle the display of labels hidden in comments in the selection
976buffers. Sometimes, you may have commented out parts of your document. 1059buffers. Sometimes, you may have commented out parts of your document.
977If these parts contain label definitions, @b{Ref@TeX{}} can still display 1060If these parts contain label definitions, @RefTeX{} can still display
978and reference these labels. 1061and reference these labels.
979 1062
980@tablesubheading{Updating the buffer} 1063@tablesubheading{Updating the buffer}
@@ -998,7 +1081,7 @@ Switch the label category. After prompting for another label category,
998a menu for that category will be shown. 1081a menu for that category will be shown.
999 1082
1000@item x 1083@item x
1001Reference a label from an external document. With the LaTeX package 1084Reference a label from an external document. With the @LaTeX{} package
1002@code{xr} it is possible to reference labels defined in another 1085@code{xr} it is possible to reference labels defined in another
1003document. This key will switch to the label menu of an external 1086document. This key will switch to the label menu of an external
1004document and let you select a label from there (@pxref{xr (LaTeX 1087document and let you select a label from there (@pxref{xr (LaTeX
@@ -1018,10 +1101,10 @@ keymap @code{reftex-select-label-map} may be used.
1018@vindex reftex-label-alist 1101@vindex reftex-label-alist
1019@vindex reftex-label-alist-builtin 1102@vindex reftex-label-alist-builtin
1020 1103
1021@b{Ref@TeX{}} needs to be aware of the environments which can be referenced 1104@RefTeX{} needs to be aware of the environments which can be referenced
1022with a label (i.e. which carry their own counters). By default, @b{Ref@TeX{}} 1105with a label (i.e. which carry their own counters). By default, @RefTeX{}
1023recognizes all labeled environments and macros discussed in @cite{The 1106recognizes all labeled environments and macros discussed in @cite{The
1024LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley 1107@LaTeX{} Companion by Goossens, Mittelbach & Samarin, Addison-Wesley
10251994.}. These are: 11081994.}. These are:
1026 1109
1027@itemize @minus 1110@itemize @minus
@@ -1038,7 +1121,7 @@ LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley
1038@cindex LaTeX core 1121@cindex LaTeX core
1039@code{figure}, @code{figure*}, @code{table}, @code{table*}, @code{equation}, 1122@code{figure}, @code{figure*}, @code{table}, @code{table*}, @code{equation},
1040@code{eqnarray}, @code{enumerate}, the @code{\footnote} macro (this is 1123@code{eqnarray}, @code{enumerate}, the @code{\footnote} macro (this is
1041the LaTeX core stuff) 1124the @LaTeX{} core stuff)
1042@item 1125@item
1043@cindex AMS-LaTeX 1126@cindex AMS-LaTeX
1044@cindex @code{amsmath}, LaTeX package 1127@cindex @code{amsmath}, LaTeX package
@@ -1053,7 +1136,7 @@ the LaTeX core stuff)
1053@cindex @code{subequations}, AMS-LaTeX environment 1136@cindex @code{subequations}, AMS-LaTeX environment
1054@code{align}, @code{gather}, @code{multline}, @code{flalign}, 1137@code{align}, @code{gather}, @code{multline}, @code{flalign},
1055@code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations} 1138@code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations}
1056(from AMS-LaTeX's @file{amsmath.sty} package) 1139(from AMS-@LaTeX{}'s @file{amsmath.sty} package)
1057@item 1140@item
1058@cindex @code{endnote}, LaTeX package 1141@cindex @code{endnote}, LaTeX package
1059@cindex LaTeX packages, @code{endnote} 1142@cindex LaTeX packages, @code{endnote}
@@ -1112,7 +1195,7 @@ the @code{\endnote} macro (from @file{endnotes.sty})
1112@end itemize 1195@end itemize
1113 1196
1114If you want to use other labeled environments, defined with 1197If you want to use other labeled environments, defined with
1115@code{\newtheorem}, @b{Ref@TeX{}} needs to be configured to recognize 1198@code{\newtheorem}, @RefTeX{} needs to be configured to recognize
1116them (@pxref{Defining Label Environments}). 1199them (@pxref{Defining Label Environments}).
1117 1200
1118@node Defining Label Environments, Reference Info, Builtin Label Environments, Labels and References 1201@node Defining Label Environments, Reference Info, Builtin Label Environments, Labels and References
@@ -1120,7 +1203,7 @@ them (@pxref{Defining Label Environments}).
1120@cindex Label environments, defining 1203@cindex Label environments, defining
1121 1204
1122@vindex reftex-label-alist 1205@vindex reftex-label-alist
1123@b{Ref@TeX{}} can be configured to recognize additional labeled 1206@RefTeX{} can be configured to recognize additional labeled
1124environments and macros. This is done with the variable 1207environments and macros. This is done with the variable
1125@code{reftex-label-alist} (@pxref{Options (Defining Label 1208@code{reftex-label-alist} (@pxref{Options (Defining Label
1126Environments)}). If you are not familiar with Lisp, you can use the 1209Environments)}). If you are not familiar with Lisp, you can use the
@@ -1143,7 +1226,7 @@ Environments}).
1143* Quick Equation:: When a macro sets the label type. 1226* Quick Equation:: When a macro sets the label type.
1144* Figure Wrapper:: When a macro argument is a label. 1227* Figure Wrapper:: When a macro argument is a label.
1145* Adding Magic Words:: Other words for other languages. 1228* Adding Magic Words:: Other words for other languages.
1146* Using \eqref:: How to switch to this AMS-LaTeX macro. 1229* Using \eqref:: How to switch to this AMS-@LaTeX{} macro.
1147* Non-Standard Environments:: Environments without \begin and \end 1230* Non-Standard Environments:: Environments without \begin and \end
1148* Putting it Together:: How to combine many entries. 1231* Putting it Together:: How to combine many entries.
1149@end menu 1232@end menu
@@ -1154,7 +1237,7 @@ Environments}).
1154@cindex @code{axiom}, newtheorem 1237@cindex @code{axiom}, newtheorem
1155@cindex @code{\newtheorem} 1238@cindex @code{\newtheorem}
1156 1239
1157Suppose you are using @code{\newtheorem} in LaTeX in order to define two 1240Suppose you are using @code{\newtheorem} in @LaTeX{} in order to define two
1158new environments, @code{theorem} and @code{axiom} 1241new environments, @code{theorem} and @code{axiom}
1159 1242
1160@example 1243@example
@@ -1172,7 +1255,7 @@ to be used like this:
1172\end@{axiom@} 1255\end@{axiom@}
1173@end example 1256@end example
1174 1257
1175So we need to tell @b{Ref@TeX{}} that @code{theorem} and @code{axiom} are new 1258So we need to tell @RefTeX{} that @code{theorem} and @code{axiom} are new
1176labeled environments which define their own label categories. We can 1259labeled environments which define their own label categories. We can
1177either use Lisp to do this (e.g. in @file{.emacs}) or use the custom 1260either use Lisp to do this (e.g. in @file{.emacs}) or use the custom
1178library. With Lisp it would look like this 1261library. With Lisp it would look like this
@@ -1184,7 +1267,7 @@ library. With Lisp it would look like this
1184@end lisp 1267@end lisp
1185 1268
1186The type indicator characters @code{?a} and @code{?h} are used for 1269The type indicator characters @code{?a} and @code{?h} are used for
1187prompts when @b{Ref@TeX{}} queries for a label type. @code{?h} 1270prompts when @RefTeX{} queries for a label type. @code{?h}
1188was chosen for @code{theorem} since @code{?t} is already taken by 1271was chosen for @code{theorem} since @code{?t} is already taken by
1189@code{table}. Note that also @code{?s}, @code{?f}, @code{?e}, 1272@code{table}. Note that also @code{?s}, @code{?f}, @code{?e},
1190@code{?i}, @code{?n} are already used for standard environments. 1273@code{?i}, @code{?n} are already used for standard environments.
@@ -1192,10 +1275,10 @@ was chosen for @code{theorem} since @code{?t} is already taken by
1192@noindent 1275@noindent
1193The labels for Axioms and Theorems will have the prefixes @samp{ax:} and 1276The labels for Axioms and Theorems will have the prefixes @samp{ax:} and
1194@samp{thr:}, respectively. @xref{AUCTeX}, for information on how 1277@samp{thr:}, respectively. @xref{AUCTeX}, for information on how
1195AUCTeX can use RefTeX to automatically create labels when a new environment 1278@AUCTeX{} can use @RefTeX{} to automatically create labels when a new
1196is inserted into a buffer. Additionally, the following needs to be 1279environment is inserted into a buffer. Additionally, the following
1197added to one's .emacs file before AUCTeX will automatically create 1280needs to be added to one's .emacs file before @AUCTeX{} will
1198labels for the new environments. 1281automatically create labels for the new environments.
1199 1282
1200@lisp 1283@lisp
1201(add-hook 'LaTeX-mode-hook 1284(add-hook 'LaTeX-mode-hook
@@ -1226,9 +1309,9 @@ Environments)}).
1226@end itemize 1309@end itemize
1227 1310
1228The following list of strings is used to guess the correct label type 1311The following list of strings is used to guess the correct label type
1229from the word before point when creating a reference. E.g. if you 1312from the word before point when creating a reference. For example if you
1230write: @samp{As we have shown in Theorem} and then press @kbd{C-c )}, 1313write: @samp{As we have shown in Theorem} and then press @kbd{C-c )},
1231@b{Ref@TeX{}} will know that you are looking for a theorem label and 1314@RefTeX{} will know that you are looking for a theorem label and
1232restrict the menu to only these labels without even asking. 1315restrict the menu to only these labels without even asking.
1233 1316
1234The final item in each entry is the level at which the environment 1317The final item in each entry is the level at which the environment
@@ -1299,7 +1382,7 @@ and used like this:
1299Einstein's equation is \quickeq@{E=mc^2 \label@{eq:einstein@}@}. 1382Einstein's equation is \quickeq@{E=mc^2 \label@{eq:einstein@}@}.
1300@end example 1383@end example
1301 1384
1302We need to tell @b{Ref@TeX{}} that any label defined in the argument of the 1385We need to tell @RefTeX{} that any label defined in the argument of the
1303@code{\quickeq} is an equation label. Here is how to do this with lisp: 1386@code{\quickeq} is an equation label. Here is how to do this with lisp:
1304 1387
1305@lisp 1388@lisp
@@ -1310,7 +1393,7 @@ The first element in this list is now the macro with empty braces as an
1310@emph{image} of the macro arguments. @code{?e} indicates that this is 1393@emph{image} of the macro arguments. @code{?e} indicates that this is
1311an equation label, the different @code{nil} elements indicate to use the 1394an equation label, the different @code{nil} elements indicate to use the
1312default values for equations. The @samp{1} as the fifth element 1395default values for equations. The @samp{1} as the fifth element
1313indicates that the context of the label definition should be the 1st 1396indicates that the context of the label definition should be the first
1314argument of the macro. 1397argument of the macro.
1315 1398
1316Here is again how this would look in the customization buffer: 1399Here is again how this would look in the customization buffer:
@@ -1352,7 +1435,7 @@ which would be called like
1352\myfig[htp]@{filename@}@{caption text@}@{label@}@{1@} 1435\myfig[htp]@{filename@}@{caption text@}@{label@}@{1@}
1353@end example 1436@end example
1354 1437
1355Now we need to tell @b{Ref@TeX{}} that the 4th argument of the 1438Now we need to tell @RefTeX{} that the fourth argument of the
1356@code{\myfig} macro @emph{is itself} a figure label, and where to find 1439@code{\myfig} macro @emph{is itself} a figure label, and where to find
1357the context. 1440the context.
1358 1441
@@ -1366,8 +1449,8 @@ The empty pairs of brackets indicate the different arguments of the
1366indicates that this is a figure label which will be listed together with 1449indicates that this is a figure label which will be listed together with
1367labels from normal figure environments. The @code{nil} entries for 1450labels from normal figure environments. The @code{nil} entries for
1368prefix and reference format mean to use the defaults for figure labels. 1451prefix and reference format mean to use the defaults for figure labels.
1369The @samp{3} for the context method means to grab the 3rd macro argument 1452The @samp{3} for the context method means to grab the third macro argument
1370- the caption. 1453-- the caption.
1371 1454
1372As a side effect of this configuration, @code{reftex-label} will now 1455As a side effect of this configuration, @code{reftex-label} will now
1373insert the required naked label (without the @code{\label} macro) when 1456insert the required naked label (without the @code{\label} macro) when
@@ -1420,7 +1503,7 @@ predefined label categories.
1420 1503
1421Another case where one only wants to change the information associated 1504Another case where one only wants to change the information associated
1422with the label category is to change the macro which is used for 1505with the label category is to change the macro which is used for
1423referencing the label. When working with the AMS-LaTeX stuff, you might 1506referencing the label. When working with the AMS-@LaTeX{}, you might
1424prefer @code{\eqref} for doing equation references. Here is how to 1507prefer @code{\eqref} for doing equation references. Here is how to
1425do this: 1508do this:
1426 1509
@@ -1428,7 +1511,7 @@ do this:
1428(setq reftex-label-alist '((nil ?e nil "~\\eqref@{%s@}" nil nil))) 1511(setq reftex-label-alist '((nil ?e nil "~\\eqref@{%s@}" nil nil)))
1429@end lisp 1512@end lisp
1430 1513
1431@b{Ref@TeX{}} has also a predefined symbol for this special purpose. The 1514@RefTeX{} has also a predefined symbol for this special purpose. The
1432following is equivalent to the line above. 1515following is equivalent to the line above.
1433 1516
1434@lisp 1517@lisp
@@ -1436,7 +1519,7 @@ following is equivalent to the line above.
1436@end lisp 1519@end lisp
1437 1520
1438Note that this is automatically done by the @file{amsmath.el} style file 1521Note that this is automatically done by the @file{amsmath.el} style file
1439of AUCTeX (@pxref{Style Files}) - so if you use AUCTeX, 1522of @AUCTeX{} (@pxref{Style Files}) -- so if you use @AUCTeX{},
1440this configuration will not be necessary. 1523this configuration will not be necessary.
1441 1524
1442@node Non-Standard Environments, Putting it Together, Using \eqref, Defining Label Environments 1525@node Non-Standard Environments, Putting it Together, Using \eqref, Defining Label Environments
@@ -1446,8 +1529,8 @@ this configuration will not be necessary.
1446@cindex Special parser functions 1529@cindex Special parser functions
1447@cindex Parser functions, for special environments 1530@cindex Parser functions, for special environments
1448 1531
1449Some LaTeX packages define environment-like structures without using the 1532Some @LaTeX{} packages define environment-like structures without using the
1450standard @samp{\begin..\end} structure. @b{Ref@TeX{}} cannot parse 1533standard @samp{\begin..\end} structure. @RefTeX{} cannot parse
1451these directly, but you can write your own special-purpose parser and 1534these directly, but you can write your own special-purpose parser and
1452use it instead of the name of an environment in an entry for 1535use it instead of the name of an environment in an entry for
1453@code{reftex-label-alist}. The function should check if point is 1536@code{reftex-label-alist}. The function should check if point is
@@ -1506,7 +1589,7 @@ terminated by @samp{\z.} or by an empty line.
1506The difficulty is that the @samp{\a.} lists can nest and that an empty 1589The difficulty is that the @samp{\a.} lists can nest and that an empty
1507line terminates all list levels in one go. So we have to count nesting 1590line terminates all list levels in one go. So we have to count nesting
1508levels between @samp{\a.} and @samp{\z.}. Here is the implementation 1591levels between @samp{\a.} and @samp{\z.}. Here is the implementation
1509for @b{Ref@TeX{}}. 1592for @RefTeX{}.
1510 1593
1511@lisp 1594@lisp
1512(setq reftex-label-alist 1595(setq reftex-label-alist
@@ -1558,7 +1641,7 @@ the entries described above:
1558 (detect-linguex ?x "ex:" "~\\ref@{%s@}" nil ("Example" "Ex.")))) 1641 (detect-linguex ?x "ex:" "~\\ref@{%s@}" nil ("Example" "Ex."))))
1559@end lisp 1642@end lisp
1560 1643
1561@node Reference Info, xr (LaTeX package), Defining Label Environments, Labels and References 1644@node Reference Info, Reference Styles, Defining Label Environments, Labels and References
1562@section Reference Info 1645@section Reference Info
1563@findex reftex-view-crossref 1646@findex reftex-view-crossref
1564@findex reftex-mouse-view-crossref 1647@findex reftex-mouse-view-crossref
@@ -1575,12 +1658,100 @@ information about the label referenced there. Note that the information
1575is only displayed if the echo area is not occupied by a different 1658is only displayed if the echo area is not occupied by a different
1576message. 1659message.
1577 1660
1578@b{Ref@TeX{}} can also display the label definition corresponding to a 1661@RefTeX{} can also display the label definition corresponding to a
1579@code{\ref} macro, or all reference locations corresponding to a 1662@code{\ref} macro, or all reference locations corresponding to a
1580@code{\label} macro. @xref{Viewing Cross-References}, for more 1663@code{\label} macro. @xref{Viewing Cross-References}, for more
1581information. 1664information.
1582 1665
1583@node xr (LaTeX package), varioref (LaTeX package), Reference Info, Labels and References 1666@node Reference Styles, xr (LaTeX package), Reference Info, Labels and References
1667@section Reference Styles
1668
1669In case you defined your own macros for referencing or you are using
1670@LaTeX{} packages providing specialized macros to be used instead of
1671@code{\ref}, @RefTeX{} provides ways to select and insert them in a
1672convenient way.
1673
1674@RefTeX{} comes equipped with a set of so-called reference styles where
1675each relates to one or more reference macros. The standard macros
1676@samp{\ref} and @samp{\pageref} or provided by the ``Default'' style.
1677The ``Varioref'' style offers macros for the @samp{varioref} @LaTeX{}
1678package (@samp{\vref}, @samp{\Vref}, @samp{\Ref}, @samp{\vpageref}),
1679``Fancyref'' for the @samp{fancyref} package (@samp{\fref},
1680@samp{\Fref}) and ``Hyperref'' for the @samp{hyperref} package
1681(@samp{\autoref}, @samp{\autopageref}).
1682
1683@vindex reftex-ref-style-default-list
1684A style can be toggled by selecting the respective entry in the
1685@samp{Reference Style} menu. Changes made through the menu will only
1686last for the Emacs session. In order to configure a preference
1687permanently, the variable @code{reftex-ref-style-default-list} should be
1688customized. This variable specifies the list of styles to be activated.
1689It can also be set as a file variable if the preference should be set
1690for a specific file.
1691
1692@vindex reftex-ref-style-alist
1693In case the built-in styles do not suffice, you can add additional
1694macros and styles to the variable @code{reftex-ref-style-alist}. Those
1695do not necessarily have to be related to a certain @LaTeX{} package but
1696can follow an arbitrary grouping rule. For example you could define a
1697style called ``Personal'' for your personal referencing macros. (When
1698changing the variable you should be aware that other Emacs packages,
1699like @AUCTeX{}, might rely on the entries from the default value to be
1700present.)
1701
1702Once a style is active the macros it relates to are available for
1703selection when you are about to insert a reference. In general this
1704process involves three steps: the selection of a reference macro, a
1705label type and a label. Reference macros can be chosen in the first and
1706last step.
1707
1708@vindex reftex-ref-macro-prompt
1709In the first step you will be presented with a list of macros from which
1710you can select one by typing a single key. If you dislike having an
1711extra step for reference macro selection, you can disable it by
1712customizing @code{reftex-ref-macro-prompt} and relying only on the
1713selection facilities provided in the last step.
1714
1715In the last step, i.e. the label selection, two key bindings are
1716provided to set the reference macro. Type @key{v} in order to cycle
1717forward through the list of available macros or @key{V} to cycle
1718backward. The mode line of the selection buffer shows the macro
1719currently selected.
1720
1721In case you are not satisfied with the order of macros when cycling
1722through them you should adapt the order of entries in the variable
1723@code{reftex-ref-style-alist} to fit your liking.
1724
1725For each entry in @code{reftex-ref-style-alist} a function with the name
1726@code{reftex-<package>-<macro>} (e.g. @code{reftex-varioref-vref}) will
1727be created automatically by @RefTeX{}. These functions can be used
1728instead of @kbd{C-c )} and provide an alternative way of having your
1729favorite referencing macro preselected and if cycling through the macros
1730seems inconvenient to you.@footnote{You could e.g. bind
1731@code{reftex-varioref-vref} to @kbd{C-c v} and
1732@code{reftex-fancyref-fref} to @kbd{C-c f}.}
1733
1734@cindex @code{varioref}, LaTeX package
1735@cindex LaTeX packages, @code{varioref}
1736@cindex @code{fancyref}, LaTeX package
1737@cindex LaTeX packages, @code{fancyref}
1738@vindex reftex-vref-is-default (deprecated)
1739@vindex reftex-fref-is-default (deprecated)
1740In former versions of @RefTeX{} only support for @code{varioref} and
1741@code{fancyref} was included. @code{varioref} is a @LaTeX{} package to
1742create cross-references with page information. @code{fancyref} is a
1743package where a macro call like @code{\fref@{@var{fig:map-of-germany}@}}
1744creates not only the number of the referenced counter but also the
1745complete text around it, like @samp{Figure 3 on the preceding page}. In
1746order to make it work you need to use label prefixes like @samp{fig:}
1747consistently -- something @RefTeX{} does automatically. For each of
1748these packages a variable could be configured to make its macros to take
1749precedence over @code{\ref}. Those were @code{reftex-vref-is-default}
1750and @code{reftex-fref-is-default} respectively. While still working,
1751these variables are deprecated now. Instead of setting them, the
1752variable @code{reftex-ref-style-default-list} should be adapted now.
1753
1754@node xr (LaTeX package), , Reference Styles, Labels and References
1584@section @code{xr}: Cross-Document References 1755@section @code{xr}: Cross-Document References
1585@cindex @code{xr}, LaTeX package 1756@cindex @code{xr}, LaTeX package
1586@cindex LaTeX packages, @code{xr} 1757@cindex LaTeX packages, @code{xr}
@@ -1589,7 +1760,7 @@ information.
1589@cindex References to external documents 1760@cindex References to external documents
1590@cindex Cross-document references 1761@cindex Cross-document references
1591 1762
1592The LaTeX package @code{xr} makes it possible to create references to 1763The @LaTeX{} package @code{xr} makes it possible to create references to
1593labels defined in external documents. The preamble of a document using 1764labels defined in external documents. The preamble of a document using
1594@code{xr} will contain something like this: 1765@code{xr} will contain something like this:
1595 1766
@@ -1604,66 +1775,26 @@ and we can make references to any labels defined in these
1604external documents by using the prefixes @samp{V1-} and @samp{V3-}, 1775external documents by using the prefixes @samp{V1-} and @samp{V3-},
1605respectively. 1776respectively.
1606 1777
1607@b{Ref@TeX{}} can be used to create such references as well. Start the 1778@RefTeX{} can be used to create such references as well. Start the
1608referencing process normally, by pressing @kbd{C-c )}. Select a label 1779referencing process normally, by pressing @kbd{C-c )}. Select a label
1609type if necessary. When you see the label selection buffer, pressing 1780type if necessary. When you see the label selection buffer, pressing
1610@kbd{x} will switch to the label selection buffer of one of the external 1781@kbd{x} will switch to the label selection buffer of one of the external
1611documents. You may then select a label as before and @b{Ref@TeX{}} will 1782documents. You may then select a label as before and @RefTeX{} will
1612insert it along with the required prefix. 1783insert it along with the required prefix.
1613 1784
1614For this kind of inter-document cross-references, saving of parsing 1785For this kind of inter-document cross-references, saving of parsing
1615information and the use of multiple selection buffers can mean a large 1786information and the use of multiple selection buffers can mean a large
1616speed-up (@pxref{Optimizations}). 1787speed-up (@pxref{Optimizations}).
1617 1788
1618@node varioref (LaTeX package), fancyref (LaTeX package), xr (LaTeX package), Labels and References
1619@section @code{varioref}: Variable Page References
1620@cindex @code{varioref}, LaTeX package
1621@cindex @code{\vref}
1622@cindex LaTeX packages, @code{varioref}
1623@vindex reftex-vref-is-default
1624@code{varioref} is a frequently used LaTeX package to create
1625cross--references with page information. When you want to make a
1626reference with the @code{\vref} macro, just press the @kbd{v} key in the
1627selection buffer to toggle between @code{\ref} and @code{\vref}
1628(@pxref{Referencing Labels}). The mode line of the selection buffer
1629shows the current status of this switch. If you find that you almost
1630always use @code{\vref}, you may want to make it the default by
1631customizing the variable @code{reftex-vref-is-default}. If this
1632toggling seems too inconvenient, you can also use the command
1633@code{reftex-varioref-vref}@footnote{bind it to @kbd{C-c v}.}.
1634Or use AUCTeX to create your macros (@pxref{AUCTeX}).
1635
1636@node fancyref (LaTeX package), , varioref (LaTeX package), Labels and References
1637@section @code{fancyref}: Fancy Cross References
1638@cindex @code{fancyref}, LaTeX package
1639@cindex @code{\fref}
1640@cindex @code{\Fref}
1641@cindex LaTeX packages, @code{fancyref}
1642@vindex reftex-fref-is-default
1643@code{fancyref} is a LaTeX package where a macro call like
1644@code{\fref@{@var{fig:map-of-germany}@}} creates not only the number of
1645the referenced counter but also the complete text around it, like
1646@samp{Figure 3 on the preceding page}. In order to make it work you
1647need to use label prefixes like @samp{fig:} consistently - something
1648@b{Ref@TeX{}} does automatically. When you want to make a reference
1649with the @code{\fref} macro, just press the @kbd{V} key in the selection
1650buffer to cycle between @code{\ref}, @code{\fref} and @code{\Fref}
1651(@pxref{Referencing Labels}). The mode line of the selection buffer
1652shows the current status of this switch. If this cycling seems
1653inconvenient, you can also use the commands @code{reftex-fancyref-fref}
1654and @code{reftex-fancyref-Fref}@footnote{bind them to @kbd{C-c
1655f} and @kbd{C-c F}.}. Or use AUCTeX to create your macros
1656(@pxref{AUCTeX}).
1657
1658@node Citations, Index Support, Labels and References, Top 1789@node Citations, Index Support, Labels and References, Top
1659@chapter Citations 1790@chapter Citations
1660@cindex Citations 1791@cindex Citations
1661@cindex @code{\cite} 1792@cindex @code{\cite}
1662 1793
1663Citations in LaTeX are done with the @code{\cite} macro or variations of 1794Citations in @LaTeX{} are done with the @code{\cite} macro or variations of
1664it. The argument of the macro is a citation key which identifies an 1795it. The argument of the macro is a citation key which identifies an
1665article or book in either a BibTeX database file or in an explicit 1796article or book in either a @BibTeX{} database file or in an explicit
1666@code{thebibliography} environment in the document. @b{Ref@TeX{}}'s 1797@code{thebibliography} environment in the document. @RefTeX{}'s
1667support for citations helps to select the correct key quickly. 1798support for citations helps to select the correct key quickly.
1668 1799
1669@menu 1800@menu
@@ -1684,7 +1815,7 @@ support for citations helps to select the correct key quickly.
1684@cindex Selection buffer, citations 1815@cindex Selection buffer, citations
1685@cindex Selection process 1816@cindex Selection process
1686 1817
1687In order to create a citation, press @kbd{C-c [}. @b{Ref@TeX{}} then 1818In order to create a citation, press @kbd{C-c [}. @RefTeX{} then
1688prompts for a regular expression which will be used to search through 1819prompts for a regular expression which will be used to search through
1689the database and present the list of matches to choose from in a 1820the database and present the list of matches to choose from in a
1690selection process similar to that for selecting labels 1821selection process similar to that for selecting labels
@@ -1695,8 +1826,8 @@ logic @code{and} for regular expressions. For example
1695@samp{Einstein&&Bose} will match all articles which mention 1826@samp{Einstein&&Bose} will match all articles which mention
1696Bose-Einstein condensation, or which are co-authored by Bose and 1827Bose-Einstein condensation, or which are co-authored by Bose and
1697Einstein. When entering the regular expression, you can complete on 1828Einstein. When entering the regular expression, you can complete on
1698known citation keys. RefTeX also offers a default when prompting for a 1829known citation keys. @RefTeX{} also offers a default when prompting for
1699regular expression. This default is the word before the cursor or the 1830a regular expression. This default is the word before the cursor or the
1700word before the current @samp{\cite} command. Sometimes this may be a 1831word before the current @samp{\cite} command. Sometimes this may be a
1701good search key. 1832good search key.
1702 1833
@@ -1704,16 +1835,16 @@ good search key.
1704@cindex @code{thebibliography}, LaTeX environment 1835@cindex @code{thebibliography}, LaTeX environment
1705@cindex @code{BIBINPUTS}, environment variable 1836@cindex @code{BIBINPUTS}, environment variable
1706@cindex @code{TEXBIB}, environment variable 1837@cindex @code{TEXBIB}, environment variable
1707@b{Ref@TeX{}} prefers to use BibTeX database files specified with a 1838@RefTeX{} prefers to use @BibTeX{} database files specified with a
1708@code{\bibliography} macro to collect its information. Just like 1839@code{\bibliography} macro to collect its information. Just like
1709BibTeX, it will search for the specified files in the current directory 1840@BibTeX{}, it will search for the specified files in the current directory
1710and along the path given in the environment variable @code{BIBINPUTS}. 1841and along the path given in the environment variable @code{BIBINPUTS}.
1711If you do not use BibTeX, but the document contains an explicit 1842If you do not use @BibTeX{}, but the document contains an explicit
1712@code{thebibliography} environment, @b{Ref@TeX{}} will collect its 1843@code{thebibliography} environment, @RefTeX{} will collect its
1713information from there. Note that in this case the information 1844information from there. Note that in this case the information
1714presented in the selection buffer will just be a copy of relevant 1845presented in the selection buffer will just be a copy of relevant
1715@code{\bibitem} entries, not the structured listing available with 1846@code{\bibitem} entries, not the structured listing available with
1716BibTeX database files. 1847@BibTeX{} database files.
1717 1848
1718@kindex ? 1849@kindex ?
1719In the selection buffer, the following keys provide special commands. A 1850In the selection buffer, the following keys provide special commands. A
@@ -1743,7 +1874,7 @@ another window. See also the @kbd{f} key.
1743@item f 1874@item f
1744Toggle follow mode. When follow mode is active, the other window will 1875Toggle follow mode. When follow mode is active, the other window will
1745always display the full database entry of the current article. This is 1876always display the full database entry of the current article. This is
1746equivalent to pressing @key{SPC} after each cursor motion. With BibTeX 1877equivalent to pressing @key{SPC} after each cursor motion. With @BibTeX{}
1747entries, follow mode can be rather slow. 1878entries, follow mode can be rather slow.
1748 1879
1749@tablesubheading{Selecting entries and creating the citation} 1880@tablesubheading{Selecting entries and creating the citation}
@@ -1774,12 +1905,12 @@ Accept all (marked) entries in the selection buffer and create a
1774separate @code{\cite} macro for each of it. 1905separate @code{\cite} macro for each of it.
1775 1906
1776@item e 1907@item e
1777Create a new BibTeX database file which contains all @i{marked} entries 1908Create a new @BibTeX{} database file which contains all @i{marked} entries
1778in the selection buffer. If no entries are marked, all entries are 1909in the selection buffer. If no entries are marked, all entries are
1779selected. 1910selected.
1780 1911
1781@item E 1912@item E
1782Create a new BibTeX database file which contains all @i{unmarked} 1913Create a new @BibTeX{} database file which contains all @i{unmarked}
1783entries in the selection buffer. If no entries are marked, all entries 1914entries in the selection buffer. If no entries are marked, all entries
1784are selected. 1915are selected.
1785 1916
@@ -1814,6 +1945,17 @@ entries.
1814In order to define additional commands for this selection process, the 1945In order to define additional commands for this selection process, the
1815keymap @code{reftex-select-bib-map} may be used. 1946keymap @code{reftex-select-bib-map} may be used.
1816 1947
1948Note that if you do not use Emacs to edit the @BibTeX{} database files,
1949@RefTeX{} will ask if the related buffers should be updated once it
1950detects that the files were changed externally. If you do not want to
1951be bothered by such queries, you can activate Auto Revert mode for these
1952buffers by adding the following expression to your init file:
1953
1954@lisp
1955(add-hook 'bibtex-mode-hook 'turn-on-auto-revert-mode)
1956@end lisp
1957
1958
1817@node Citation Styles, Citation Info, Creating Citations, Citations 1959@node Citation Styles, Citation Info, Creating Citations, Citations
1818@section Citation Styles 1960@section Citation Styles
1819@cindex Citation styles 1961@cindex Citation styles
@@ -1821,20 +1963,22 @@ keymap @code{reftex-select-bib-map} may be used.
1821@cindex Citation styles, @code{harvard} 1963@cindex Citation styles, @code{harvard}
1822@cindex Citation styles, @code{chicago} 1964@cindex Citation styles, @code{chicago}
1823@cindex Citation styles, @code{jurabib} 1965@cindex Citation styles, @code{jurabib}
1966@cindex Citation styles, @ConTeXt{}
1824@cindex @code{natbib}, citation style 1967@cindex @code{natbib}, citation style
1825@cindex @code{harvard}, citation style 1968@cindex @code{harvard}, citation style
1826@cindex @code{chicago}, citation style 1969@cindex @code{chicago}, citation style
1827@cindex @code{jurabib}, citation style 1970@cindex @code{jurabib}, citation style
1971@cindex @ConTeXt{}, citation style
1828 1972
1829@vindex reftex-cite-format 1973@vindex reftex-cite-format
1830The standard LaTeX macro @code{\cite} works well with numeric or simple 1974The standard @LaTeX{} macro @code{\cite} works well with numeric or
1831key citations. To deal with the more complex task of author-year 1975simple key citations. To deal with the more complex task of author-year
1832citations as used in many natural sciences, a variety of packages has 1976citations as used in many natural sciences, a variety of packages has
1833been developed which define derived forms of the @code{\cite} macro. 1977been developed which define derived forms of the @code{\cite} macro.
1834@b{Ref@TeX{}} can be configured to produce these citation macros as well 1978@RefTeX{} can be configured to produce these citation macros as well by
1835by setting the variable @code{reftex-cite-format}. For the most 1979setting the variable @code{reftex-cite-format}. For the most commonly
1836commonly used packages (@code{natbib}, @code{harvard}, @code{chicago}, 1980used @LaTeX{} packages (@code{natbib}, @code{harvard}, @code{chicago},
1837@code{jurabib}) this may be done from the menu, under 1981@code{jurabib}) and for @ConTeXt{} this may be done from the menu, under
1838@code{Ref->Citation Styles}. Since there are usually several macros to 1982@code{Ref->Citation Styles}. Since there are usually several macros to
1839create the citations, executing @code{reftex-citation} (@kbd{C-c [}) 1983create the citations, executing @code{reftex-citation} (@kbd{C-c [})
1840starts by prompting for the correct macro. For the Natbib style, this 1984starts by prompting for the correct macro. For the Natbib style, this
@@ -1856,7 +2000,7 @@ SELECT A CITATION FORMAT
1856@end example 2000@end example
1857 2001
1858@vindex reftex-cite-prompt-optional-args 2002@vindex reftex-cite-prompt-optional-args
1859If cite formats contain empty paris of square brackets, RefTeX can 2003If citation formats contain empty pairs of square brackets, @RefTeX{}
1860will prompt for values of these optional arguments if you call the 2004will prompt for values of these optional arguments if you call the
1861@code{reftex-citation} command with a @kbd{C-u} prefix. 2005@code{reftex-citation} command with a @kbd{C-u} prefix.
1862Following the most generic of these packages, @code{natbib}, the builtin 2006Following the most generic of these packages, @code{natbib}, the builtin
@@ -1872,12 +2016,12 @@ To make one of these styles the default, customize the variable
1872(setq reftex-cite-format 'natbib) 2016(setq reftex-cite-format 'natbib)
1873@end lisp 2017@end lisp
1874 2018
1875You can also use AUCTeX style files to automatically set the 2019You can also use @AUCTeX{} style files to automatically set the
1876citation style based on the @code{usepackage} commands in a given 2020citation style based on the @code{usepackage} commands in a given
1877document. @xref{Style Files}, for information on how to set up the style 2021document. @xref{Style Files}, for information on how to set up the style
1878files correctly. 2022files correctly.
1879 2023
1880@node Citation Info, Chapterbib and Bibunits, Citation Styles, Citations, Top 2024@node Citation Info, Chapterbib and Bibunits, Citation Styles, Citations
1881@section Citation Info 2025@section Citation Info
1882@cindex Displaying citations 2026@cindex Displaying citations
1883@cindex Citations, displaying 2027@cindex Citations, displaying
@@ -1893,9 +2037,9 @@ argument of a @code{\cite} macro, the echo area will display some
1893information about the article cited there. Note that the information is 2037information about the article cited there. Note that the information is
1894only displayed if the echo area is not occupied by a different message. 2038only displayed if the echo area is not occupied by a different message.
1895 2039
1896@b{Ref@TeX{}} can also display the @code{\bibitem} or BibTeX database 2040@RefTeX{} can also display the @code{\bibitem} or @BibTeX{} database
1897entry corresponding to a @code{\cite} macro, or all citation locations 2041entry corresponding to a @code{\cite} macro, or all citation locations
1898corresponding to a @code{\bibitem} or BibTeX database entry. 2042corresponding to a @code{\bibitem} or @BibTeX{} database entry.
1899@xref{Viewing Cross-References}. 2043@xref{Viewing Cross-References}.
1900 2044
1901@node Chapterbib and Bibunits, Citations Outside LaTeX, Citation Info, Citations 2045@node Chapterbib and Bibunits, Citations Outside LaTeX, Citation Info, Citations
@@ -1904,24 +2048,24 @@ corresponding to a @code{\bibitem} or BibTeX database entry.
1904@cindex @code{bibunits}, LaTeX package 2048@cindex @code{bibunits}, LaTeX package
1905@cindex Bibliographies, multiple 2049@cindex Bibliographies, multiple
1906 2050
1907@code{chapterbib} and @code{bibunits} are two LaTeX packages which 2051@code{chapterbib} and @code{bibunits} are two @LaTeX{} packages which
1908produce multiple bibliographies in a document. This is no problem for 2052produce multiple bibliographies in a document. This is no problem for
1909@b{Ref@TeX{}} as long as all bibliographies use the same BibTeX database 2053@RefTeX{} as long as all bibliographies use the same @BibTeX{} database
1910files. If they do not, it is best to have each document part in a 2054files. If they do not, it is best to have each document part in a
1911separate file (as it is required for @code{chapterbib} anyway). Then 2055separate file (as it is required for @code{chapterbib} anyway). Then
1912@b{Ref@TeX{}} will still scan the locally relevant databases correctly. If 2056@RefTeX{} will still scan the locally relevant databases correctly. If
1913you have multiple bibliographies within a @emph{single file}, this may 2057you have multiple bibliographies within a @emph{single file}, this may
1914or may not be the case. 2058or may not be the case.
1915 2059
1916@node Citations Outside LaTeX, BibTeX Database Subsets, Chapterbib and Bibunits, Citations 2060@node Citations Outside LaTeX, BibTeX Database Subsets, Chapterbib and Bibunits, Citations
1917@section Citations outside LaTeX 2061@section Citations outside @LaTeX{}
1918@cindex Citations outside LaTeX 2062@cindex Citations outside LaTeX
1919@vindex reftex-default-bibliography 2063@vindex reftex-default-bibliography
1920 2064
1921The command @code{reftex-citation} can also be executed outside a LaTeX 2065The command @code{reftex-citation} can also be executed outside a @LaTeX{}
1922buffer. This can be useful to reference articles in the mail buffer and 2066buffer. This can be useful to reference articles in the mail buffer and
1923other documents. You should @emph{not} enter @code{reftex-mode} for 2067other documents. You should @emph{not} enter @code{reftex-mode} for
1924this, just execute the command. The list of BibTeX files will in this 2068this, just execute the command. The list of @BibTeX{} files will in this
1925case be taken from the variable @code{reftex-default-bibliography}. 2069case be taken from the variable @code{reftex-default-bibliography}.
1926Setting the variable @code{reftex-cite-format} to the symbol 2070Setting the variable @code{reftex-cite-format} to the symbol
1927@code{locally} does a decent job of putting all relevant information 2071@code{locally} does a decent job of putting all relevant information
@@ -1943,24 +2087,24 @@ binding for @code{reftex-cite-format}.
1943@cindex BibTeX database subsets 2087@cindex BibTeX database subsets
1944@findex reftex-create-bibtex-file 2088@findex reftex-create-bibtex-file
1945 2089
1946@b{Ref@TeX{}} offers two ways to create a new BibTeX database file. 2090@RefTeX{} offers two ways to create a new @BibTeX{} database file.
1947 2091
1948The first option produces a file which contains only the entries 2092The first option produces a file which contains only the entries
1949actually referenced in the current document. This can be useful if 2093actually referenced in the current document. This can be useful if
1950the database in only meant for a single document and you want to clean 2094the database is only meant for a single document and you want to clean
1951it of old and unused ballast. It can also be useful while writing a 2095it of old and unused ballast. It can also be useful while writing a
1952document together with collaborators, in order to avoid sending around 2096document together with collaborators, in order to avoid sending around
1953the entire (possibly very large) database. To create the file, use 2097the entire (possibly very large) database. To create the file, use
1954@kbd{M-x reftex-create-bibtex-file}, also available from the menu 2098@kbd{M-x reftex-create-bibtex-file}, also available from the menu
1955under @code{Ref->Global Actions->Create Bibtex File}. The command will 2099under @code{Ref->Global Actions->Create Bibtex File}. The command will
1956prompt for a BibTeX file name and write the extracted entries to that 2100prompt for a @BibTeX{} file name and write the extracted entries to that
1957file. 2101file.
1958 2102
1959The second option makes use of the selection process started by the 2103The second option makes use of the selection process started by the
1960command @kbd{C-c [} (@pxref{Creating Citations}). This command uses a 2104command @kbd{C-c [} (@pxref{Creating Citations}). This command uses a
1961regular expression to select entries, and lists them in a formatted 2105regular expression to select entries, and lists them in a formatted
1962selection buffer. After pressing the @kbd{e} key (mnemonics: Export), 2106selection buffer. After pressing the @kbd{e} key (mnemonics: Export),
1963the command will prompt for the name of a new BibTeX file and write 2107the command will prompt for the name of a new @BibTeX{} file and write
1964the selected entries to that file. You can also first mark some 2108the selected entries to that file. You can also first mark some
1965entries in the selection buffer with the @kbd{m} key and then export 2109entries in the selection buffer with the @kbd{m} key and then export
1966either the @i{marked} entries (with the @kbd{e} key) or the 2110either the @i{marked} entries (with the @kbd{e} key) or the
@@ -1971,15 +2115,15 @@ either the @i{marked} entries (with the @kbd{e} key) or the
1971@cindex Index Support 2115@cindex Index Support
1972@cindex @code{\index} 2116@cindex @code{\index}
1973 2117
1974LaTeX has builtin support for creating an Index. The LaTeX core 2118@LaTeX{} has builtin support for creating an Index. The @LaTeX{} core
1975supports two different indices, the standard index and a glossary. With 2119supports two different indices, the standard index and a glossary. With
1976the help of special LaTeX packages (@file{multind.sty} or 2120the help of special @LaTeX{} packages (@file{multind.sty} or
1977@file{index.sty}), any number of indices can be supported. 2121@file{index.sty}), any number of indices can be supported.
1978 2122
1979Index entries are created with the @code{\index@{@var{entry}@}} macro. 2123Index entries are created with the @code{\index@{@var{entry}@}} macro.
1980All entries defined in a document are written out to the @file{.aux} 2124All entries defined in a document are written out to the @file{.aux}
1981file. A separate tool must be used to convert this information into a 2125file. A separate tool must be used to convert this information into a
1982nicely formatted index. Tools used with LaTeX include @code{MakeIndex} 2126nicely formatted index. Tools used with @LaTeX{} include @code{MakeIndex}
1983and @code{xindy}. 2127and @code{xindy}.
1984 2128
1985Indexing is a very difficult task. It must follow strict conventions to 2129Indexing is a very difficult task. It must follow strict conventions to
@@ -1996,27 +2140,27 @@ correspond to appropriate index entries. This part of the index can
1996very well be developed along with the document. Often it is worthwhile 2140very well be developed along with the document. Often it is worthwhile
1997to define special purpose macros which define an item and at the same 2141to define special purpose macros which define an item and at the same
1998time make an index entry, possibly with special formatting to make the 2142time make an index entry, possibly with special formatting to make the
1999reference page in the index bold or underlined. To make @b{Ref@TeX{}} 2143reference page in the index bold or underlined. To make @RefTeX{}
2000support for indexing possible, these special macros must be added to 2144support for indexing possible, these special macros must be added to
2001@b{Ref@TeX{}}'s configuration (@pxref{Defining Index Macros}). 2145@RefTeX{}'s configuration (@pxref{Defining Index Macros}).
2002 2146
2003@item 2147@item
2004The rest of the index is often just a collection of where in the 2148The rest of the index is often just a collection of where in the
2005document certain words or phrases are being used. This part is 2149document certain words or phrases are being used. This part is
2006difficult to develop along with the document, because consistent entries 2150difficult to develop along with the document, because consistent entries
2007for each occurrence are needed and are best selected when the document 2151for each occurrence are needed and are best selected when the document
2008is ready. @b{Ref@TeX{}} supports this with an @emph{index phrases file} 2152is ready. @RefTeX{} supports this with an @emph{index phrases file}
2009which collects phrases and helps indexing the phrases globally. 2153which collects phrases and helps indexing the phrases globally.
2010@end enumerate 2154@end enumerate
2011 2155
2012Before you start, you need to make sure that @b{Ref@TeX{}} knows about 2156Before you start, you need to make sure that @RefTeX{} knows about
2013the index style being used in the current document. @b{Ref@TeX{}} has 2157the index style being used in the current document. @RefTeX{} has
2014builtin support for the default @code{\index} and @code{\glossary} 2158builtin support for the default @code{\index} and @code{\glossary}
2015macros. Other LaTeX packages, like the @file{multind} or @file{index} 2159macros. Other @LaTeX{} packages, like the @file{multind} or @file{index}
2016package, redefine the @code{\index} macro to have an additional 2160package, redefine the @code{\index} macro to have an additional
2017argument, and @b{Ref@TeX{}} needs to be configured for those. A 2161argument, and @RefTeX{} needs to be configured for those. A
2018sufficiently new version of AUCTeX (9.10c or later) will do this 2162sufficiently new version of @AUCTeX{} (9.10c or later) will do this
2019automatically. If you really don't use AUCTeX (you should!), this 2163automatically. If you really don't use @AUCTeX{} (you should!), this
2020configuration needs to be done by hand with the menu (@code{Ref->Index 2164configuration needs to be done by hand with the menu (@code{Ref->Index
2021Style}), or globally for all your documents with 2165Style}), or globally for all your documents with
2022 2166
@@ -2057,7 +2201,7 @@ When there is nothing selected and no word at point, this command will
2057just call @code{reftex-index}, described below. 2201just call @code{reftex-index}, described below.
2058 2202
2059In order to create a general index entry, press @kbd{C-c <} 2203In order to create a general index entry, press @kbd{C-c <}
2060(@code{reftex-index}). @b{Ref@TeX{}} will prompt for one of the 2204(@code{reftex-index}). @RefTeX{} will prompt for one of the
2061available index macros and for its arguments. Completion will be 2205available index macros and for its arguments. Completion will be
2062available for the index entry and, if applicable, the index tag. The 2206available for the index entry and, if applicable, the index tag. The
2063index tag is a string identifying one of multiple indices. With the 2207index tag is a string identifying one of multiple indices. With the
@@ -2072,7 +2216,7 @@ to the redefined @code{\index} macro.
2072@findex reftex-index-visit-phrases-buffer 2216@findex reftex-index-visit-phrases-buffer
2073@cindex Macro definition lines, in phrase buffer 2217@cindex Macro definition lines, in phrase buffer
2074 2218
2075@b{Ref@TeX{}} maintains a file in which phrases can be collected for 2219@RefTeX{} maintains a file in which phrases can be collected for
2076later indexing. The file is located in the same directory as the master 2220later indexing. The file is located in the same directory as the master
2077file of the document and has the extension @file{.rip} (@b{R}eftex 2221file of the document and has the extension @file{.rip} (@b{R}eftex
2078@b{I}ndex @b{P}hrases). You can create or visit the file with @kbd{C-c 2222@b{I}ndex @b{P}hrases). You can create or visit the file with @kbd{C-c
@@ -2080,7 +2224,7 @@ file of the document and has the extension @file{.rip} (@b{R}eftex
2080is initialized by inserting a file header which contains the definition 2224is initialized by inserting a file header which contains the definition
2081of the available index macros. This list is initialized from 2225of the available index macros. This list is initialized from
2082@code{reftex-index-macros} (@pxref{Defining Index Macros}). You can 2226@code{reftex-index-macros} (@pxref{Defining Index Macros}). You can
2083edit the header as needed, but if you define new LaTeX indexing macros, 2227edit the header as needed, but if you define new @LaTeX{} indexing macros,
2084don't forget to add them to @code{reftex-index-macros} as well. Here is 2228don't forget to add them to @code{reftex-index-macros} as well. Here is
2085a phrase file header example: 2229a phrase file header example:
2086 2230
@@ -2122,7 +2266,7 @@ Phrases for indexing can be collected while writing the document. The
2122command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) 2266command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word})
2123copies the current selection (if active) or the word near point into the 2267copies the current selection (if active) or the word near point into the
2124phrases buffer. It then selects this buffer, so that the phrase line 2268phrases buffer. It then selects this buffer, so that the phrase line
2125can be edited. To return to the LaTeX document, press @kbd{C-c C-c} 2269can be edited. To return to the @LaTeX{} document, press @kbd{C-c C-c}
2126(@code{reftex-index-phrases-save-and-return}). 2270(@code{reftex-index-phrases-save-and-return}).
2127 2271
2128You can also prepare the list of index phrases in a different way and 2272You can also prepare the list of index phrases in a different way and
@@ -2131,7 +2275,7 @@ a word list of the document and remove all words which should not be
2131indexed. 2275indexed.
2132 2276
2133The phrase lines in the phrase buffer must have a specific format. 2277The phrase lines in the phrase buffer must have a specific format.
2134@b{Ref@TeX{}} will use font-lock to indicate if a line has the proper 2278@RefTeX{} will use font-lock to indicate if a line has the proper
2135format. A phrase line looks like this: 2279format. A phrase line looks like this:
2136 2280
2137@example 2281@example
@@ -2226,7 +2370,7 @@ region and @kbd{C-c C-a} on all phrase lines in the buffer. It is
2226probably good to do indexing in small chunks since your concentration 2370probably good to do indexing in small chunks since your concentration
2227may not last long enough to do everything in one go. 2371may not last long enough to do everything in one go.
2228 2372
2229@b{Ref@TeX{}} will start at the first phrase line and search the phrase 2373@RefTeX{} will start at the first phrase line and search the phrase
2230globally in the whole document. At each match it will stop, compute the 2374globally in the whole document. At each match it will stop, compute the
2231replacement string and offer you the following choices@footnote{Windows 2375replacement string and offer you the following choices@footnote{Windows
2232users: Restrict yourself to the described keys during indexing. Pressing 2376users: Restrict yourself to the described keys during indexing. Pressing
@@ -2275,9 +2419,9 @@ sentence, and even typos. You can always say @emph{no} at a match you
2275do not like. 2419do not like.
2276@item Wrap Long Lines 2420@item Wrap Long Lines
2277Inserting index macros increases the line length. Turn this option on 2421Inserting index macros increases the line length. Turn this option on
2278to allow @b{Ref@TeX{}} to wrap long lines. 2422to allow @RefTeX{} to wrap long lines.
2279@item Skip Indexed Matches 2423@item Skip Indexed Matches
2280When this is on, @b{Ref@TeX{}} will at each match try to figure out if 2424When this is on, @RefTeX{} will at each match try to figure out if
2281this match is already indexed. A match is considered indexed if it is 2425this match is already indexed. A match is considered indexed if it is
2282either the argument of an index macro, or if an index macro is directly 2426either the argument of an index macro, or if an index macro is directly
2283(without whitespace separation) before or after the match. Index macros 2427(without whitespace separation) before or after the match. Index macros
@@ -2289,7 +2433,7 @@ Even though indexing should be the last thing you do to a document, you
2289are bound to make changes afterwards. Indexing then has to be applied 2433are bound to make changes afterwards. Indexing then has to be applied
2290to the changed regions. The command 2434to the changed regions. The command
2291@code{reftex-index-phrases-apply-to-region} is designed for this 2435@code{reftex-index-phrases-apply-to-region} is designed for this
2292purpose. When called from a LaTeX document with active region, it will 2436purpose. When called from a @LaTeX{} document with active region, it will
2293apply @code{reftex-index-all-phrases} to the current region. 2437apply @code{reftex-index-all-phrases} to the current region.
2294 2438
2295@node Displaying and Editing the Index, Builtin Index Macros, The Index Phrases File, Index Support 2439@node Displaying and Editing the Index, Builtin Index Macros, The Index Phrases File, Index Support
@@ -2303,7 +2447,7 @@ apply @code{reftex-index-all-phrases} to the current region.
2303@findex reftex-display-index 2447@findex reftex-display-index
2304 2448
2305In order to compile and display the index, press @kbd{C-c >}. If the 2449In order to compile and display the index, press @kbd{C-c >}. If the
2306document uses multiple indices, @b{Ref@TeX{}} will ask you to select 2450document uses multiple indices, @RefTeX{} will ask you to select
2307one. Then, all index entries will be sorted alphabetically and 2451one. Then, all index entries will be sorted alphabetically and
2308displayed in a special buffer, the @file{*Index*} buffer. From that 2452displayed in a special buffer, the @file{*Index*} buffer. From that
2309buffer you can check and edit each entry. 2453buffer you can check and edit each entry.
@@ -2317,7 +2461,7 @@ region, make the region active and use a numeric prefix @samp{3} (press
2317restriction can be moved from one section to the next by pressing the 2461restriction can be moved from one section to the next by pressing the
2318@kbd{<} and @kbd{>} keys. 2462@kbd{<} and @kbd{>} keys.
2319 2463
2320One caveat: @b{Ref@TeX{}} finds the definition point of an index entry 2464One caveat: @RefTeX{} finds the definition point of an index entry
2321by searching near the buffer position where it had found to macro during 2465by searching near the buffer position where it had found to macro during
2322scanning. If you have several identical index entries in the same 2466scanning. If you have several identical index entries in the same
2323buffer and significant changes have shifted the entries around, you must 2467buffer and significant changes have shifted the entries around, you must
@@ -2371,7 +2515,7 @@ always show the location corresponding to the line in the @file{*Index*}
2371buffer at point. This is similar to pressing @key{SPC} after each 2515buffer at point. This is similar to pressing @key{SPC} after each
2372cursor motion. The default for this flag can be set with the variable 2516cursor motion. The default for this flag can be set with the variable
2373@code{reftex-index-follow-mode}. Note that only context in files 2517@code{reftex-index-follow-mode}. Note that only context in files
2374already visited is shown. @b{Ref@TeX{}} will not visit a file just for 2518already visited is shown. @RefTeX{} will not visit a file just for
2375follow mode. See, however, the variable 2519follow mode. See, however, the variable
2376@code{reftex-revisit-to-follow}. 2520@code{reftex-revisit-to-follow}.
2377 2521
@@ -2459,12 +2603,12 @@ will move to the correct position.
2459 2603
2460@item r 2604@item r
2461@vindex reftex-enable-partial-scans 2605@vindex reftex-enable-partial-scans
2462Reparse the LaTeX document and rebuild the @file{*Index*} buffer. When 2606Reparse the @LaTeX{} document and rebuild the @file{*Index*} buffer. When
2463@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this 2607@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this
2464location is defined in, not the entire document. 2608location is defined in, not the entire document.
2465 2609
2466@item C-u r 2610@item C-u r
2467Reparse the @emph{entire} LaTeX document and rebuild the @file{*Index*} 2611Reparse the @emph{entire} @LaTeX{} document and rebuild the @file{*Index*}
2468buffer. 2612buffer.
2469 2613
2470@item s 2614@item s
@@ -2483,8 +2627,8 @@ indices).
2483@cindex LaTeX packages, @code{multind} 2627@cindex LaTeX packages, @code{multind}
2484@cindex LaTeX packages, @code{index} 2628@cindex LaTeX packages, @code{index}
2485 2629
2486@b{Ref@TeX{}} by default recognizes the @code{\index} and 2630@RefTeX{} by default recognizes the @code{\index} and
2487@code{\glossary} macros which are defined in the LaTeX core. It has 2631@code{\glossary} macros which are defined in the @LaTeX{} core. It has
2488also builtin support for the re-implementations of @code{\index} 2632also builtin support for the re-implementations of @code{\index}
2489in the @file{multind} and @file{index} packages. However, since 2633in the @file{multind} and @file{index} packages. However, since
2490the different definitions of the @code{\index} macro are incompatible, 2634the different definitions of the @code{\index} macro are incompatible,
@@ -2513,7 +2657,7 @@ argument in the text and places it into a separate index with the tag
2513@samp{name}@footnote{We are using the syntax of the @file{index} package 2657@samp{name}@footnote{We are using the syntax of the @file{index} package
2514here.}. The last macro also places its argument into the index, but as 2658here.}. The last macro also places its argument into the index, but as
2515subitems under the main index entry @samp{Astronomical Objects}. Here 2659subitems under the main index entry @samp{Astronomical Objects}. Here
2516is how to make @b{Ref@TeX{}} recognize and correctly interpret these 2660is how to make @RefTeX{} recognize and correctly interpret these
2517macros, first with Emacs Lisp. 2661macros, first with Emacs Lisp.
2518 2662
2519@lisp 2663@lisp
@@ -2528,7 +2672,7 @@ Note that the index tag is @samp{idx} for the main index, and
2528for the default index and for the glossary. 2672for the default index and for the glossary.
2529 2673
2530The character arguments @code{?x}, @code{?n}, and @code{?o} are for 2674The character arguments @code{?x}, @code{?n}, and @code{?o} are for
2531quick identification of these macros when @b{Ref@TeX{}} inserts new 2675quick identification of these macros when @RefTeX{} inserts new
2532index entries with @code{reftex-index}. These codes need to be 2676index entries with @code{reftex-index}. These codes need to be
2533unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the 2677unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the
2534@code{\index}, @code{\index*}, and @code{\glossary} macros, 2678@code{\index}, @code{\index*}, and @code{\glossary} macros,
@@ -2589,22 +2733,22 @@ in the buffer with @kbd{C-c /} (@code{reftex-index-selection-or-word}).
2589The index tag is "idx". 2733The index tag is "idx".
2590 2734
2591@node Viewing Cross-References, RefTeXs Menu, Index Support, Top 2735@node Viewing Cross-References, RefTeXs Menu, Index Support, Top
2592@chapter Viewing Cross--References 2736@chapter Viewing Cross-References
2593@findex reftex-view-crossref 2737@findex reftex-view-crossref
2594@findex reftex-mouse-view-crossref 2738@findex reftex-mouse-view-crossref
2595@kindex C-c & 2739@kindex C-c &
2596@kindex S-mouse-2 2740@kindex S-mouse-2
2597 2741
2598@b{Ref@TeX{}} can display cross--referencing information. This means, 2742@RefTeX{} can display cross-referencing information. This means,
2599if two document locations are linked, @b{Ref@TeX{}} can display the 2743if two document locations are linked, @RefTeX{} can display the
2600matching location(s) in another window. The @code{\label} and @code{\ref} 2744matching location(s) in another window. The @code{\label} and @code{\ref}
2601macros are one way of establishing such a link. Also, a @code{\cite} 2745macros are one way of establishing such a link. Also, a @code{\cite}
2602macro is linked to the corresponding @code{\bibitem} macro or a BibTeX 2746macro is linked to the corresponding @code{\bibitem} macro or a @BibTeX{}
2603database entry. 2747database entry.
2604 2748
2605The feature is invoked by pressing @kbd{C-c &} 2749The feature is invoked by pressing @kbd{C-c &}
2606(@code{reftex-view-crossref}) while point is on the @var{key} argument 2750(@code{reftex-view-crossref}) while point is on the @var{key} argument
2607of a macro involved in cross--referencing. You can also click with 2751of a macro involved in cross-referencing. You can also click with
2608@kbd{S-mouse-2} on the macro argument. Here is what will happen for 2752@kbd{S-mouse-2} on the macro argument. Here is what will happen for
2609individual classes of macros: 2753individual classes of macros:
2610 2754
@@ -2615,7 +2759,7 @@ individual classes of macros:
2615Display the corresponding label definition. All usual 2759Display the corresponding label definition. All usual
2616variants@footnote{all macros that start with @samp{ref} or end with 2760variants@footnote{all macros that start with @samp{ref} or end with
2617@samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for 2761@samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for
2618cross--reference display. This works also for labels defined in an 2762cross-reference display. This works also for labels defined in an
2619external document when the current document refers to them through the 2763external document when the current document refers to them through the
2620@code{xr} interface (@pxref{xr (LaTeX package)}). 2764@code{xr} interface (@pxref{xr (LaTeX package)}).
2621 2765
@@ -2626,13 +2770,13 @@ Display a document location which references this label. Pressing
2626@kbd{C-c &} several times moves through the entire document and finds 2770@kbd{C-c &} several times moves through the entire document and finds
2627all locations. Not only the @code{\label} macro but also other macros 2771all locations. Not only the @code{\label} macro but also other macros
2628with label arguments (as configured with @code{reftex-label-alist}) are 2772with label arguments (as configured with @code{reftex-label-alist}) are
2629active for cross--reference display. 2773active for cross-reference display.
2630 2774
2631@item @code{\cite} 2775@item @code{\cite}
2632@cindex @code{\cite} 2776@cindex @code{\cite}
2633Display the corresponding BibTeX database entry or @code{\bibitem}. 2777Display the corresponding @BibTeX{} database entry or @code{\bibitem}.
2634All usual variants@footnote{all macros that either start or end with 2778All usual variants@footnote{all macros that either start or end with
2635@samp{cite}} of the @code{\cite} macro are active for cross--reference 2779@samp{cite}} of the @code{\cite} macro are active for cross-reference
2636display. 2780display.
2637 2781
2638@item @code{\bibitem} 2782@item @code{\bibitem}
@@ -2641,12 +2785,12 @@ Display a document location which cites this article. Pressing
2641@kbd{C-c &} several times moves through the entire document and finds 2785@kbd{C-c &} several times moves through the entire document and finds
2642all locations. 2786all locations.
2643 2787
2644@item BibTeX 2788@item @BibTeX{}
2645@cindex BibTeX buffer, viewing cite locations from 2789@cindex BibTeX buffer, viewing cite locations from
2646@cindex Viewing cite locations from BibTeX buffer 2790@cindex Viewing cite locations from BibTeX buffer
2647@kbd{C-c &} is also active in BibTeX buffers. All locations in a 2791@kbd{C-c &} is also active in @BibTeX{} buffers. All locations in a
2648document where the database entry at point is cited will be displayed. 2792document where the database entry at point is cited will be displayed.
2649On first use, @b{Ref@TeX{}} will prompt for a buffer which belongs to 2793On first use, @RefTeX{} will prompt for a buffer which belongs to
2650the document you want to search. Subsequent calls will use the same 2794the document you want to search. Subsequent calls will use the same
2651document, until you break this link with a prefix argument to @kbd{C-c 2795document, until you break this link with a prefix argument to @kbd{C-c
2652&}. 2796&}.
@@ -2661,7 +2805,7 @@ and @code{\glossary} macros, all macros configured in
2661 2805
2662@vindex reftex-view-crossref-extra 2806@vindex reftex-view-crossref-extra
2663While the display of cross referencing information for the above 2807While the display of cross referencing information for the above
2664mentioned macros is hard--coded, you can configure additional relations 2808mentioned macros is hard-coded, you can configure additional relations
2665in the variable @code{reftex-view-crossref-extra}. 2809in the variable @code{reftex-view-crossref-extra}.
2666 2810
2667@iftex 2811@iftex
@@ -2669,14 +2813,14 @@ in the variable @code{reftex-view-crossref-extra}.
2669@end iftex 2813@end iftex
2670 2814
2671@node RefTeXs Menu, Key Bindings, Viewing Cross-References, Top 2815@node RefTeXs Menu, Key Bindings, Viewing Cross-References, Top
2672@section @b{Ref@TeX{}}'s Menu 2816@section @RefTeX{}'s Menu
2673@cindex RefTeXs Menu 2817@cindex RefTeXs Menu
2674@cindex Menu, in the menu bar 2818@cindex Menu, in the menu bar
2675 2819
2676@b{Ref@TeX{}} installs a @code{Ref} menu in the menu bar on systems 2820@RefTeX{} installs a @code{Ref} menu in the menu bar on systems
2677which support this. From this menu you can access all of 2821which support this. From this menu you can access all of
2678@b{Ref@TeX{}}'s commands and a few of its options. There is also a 2822@RefTeX{}'s commands and a few of its options. There is also a
2679@code{Customize} submenu which can be used to access @b{Ref@TeX{}}'s 2823@code{Customize} submenu which can be used to access @RefTeX{}'s
2680entire set of options. 2824entire set of options.
2681 2825
2682@node Key Bindings, Faces, RefTeXs Menu, Top 2826@node Key Bindings, Faces, RefTeXs Menu, Top
@@ -2713,7 +2857,7 @@ Here is a summary of the available key bindings.
2713@end example 2857@end example
2714 2858
2715Note that the @kbd{S-mouse-2} binding is only provided if this key is 2859Note that the @kbd{S-mouse-2} binding is only provided if this key is
2716not already used by some other package. @b{Ref@TeX{}} will not override an 2860not already used by some other package. @RefTeX{} will not override an
2717existing binding to @kbd{S-mouse-2}. 2861existing binding to @kbd{S-mouse-2}.
2718 2862
2719Personally, I also bind some functions in the users @kbd{C-c} map for 2863Personally, I also bind some functions in the users @kbd{C-c} map for
@@ -2749,7 +2893,7 @@ default. If you want to have these key bindings available, set in your
2749@end lisp 2893@end lisp
2750 2894
2751@vindex reftex-load-hook 2895@vindex reftex-load-hook
2752Changing and adding to @b{Ref@TeX{}}'s key bindings is best done in the hook 2896Changing and adding to @RefTeX{}'s key bindings is best done in the hook
2753@code{reftex-load-hook}. For information on the keymaps 2897@code{reftex-load-hook}. For information on the keymaps
2754which should be used to add keys, see @ref{Keymaps and Hooks}. 2898which should be used to add keys, see @ref{Keymaps and Hooks}.
2755 2899
@@ -2757,9 +2901,9 @@ which should be used to add keys, see @ref{Keymaps and Hooks}.
2757@section Faces 2901@section Faces
2758@cindex Faces 2902@cindex Faces
2759 2903
2760@b{Ref@TeX{}} uses faces when available to structure the selection and 2904@RefTeX{} uses faces when available to structure the selection and
2761table of contents buffers. It does not create its own faces, but uses 2905table of contents buffers. It does not create its own faces, but uses
2762the ones defined in @file{font-lock.el}. Therefore, @b{Ref@TeX{}} will 2906the ones defined in @file{font-lock.el}. Therefore, @RefTeX{} will
2763use faces only when @code{font-lock} is loaded. This seems to be 2907use faces only when @code{font-lock} is loaded. This seems to be
2764reasonable because people who like faces will very likely have it 2908reasonable because people who like faces will very likely have it
2765loaded. If you wish to turn off fontification or change the involved 2909loaded. If you wish to turn off fontification or change the involved
@@ -2775,9 +2919,9 @@ files:
2775 2919
2776@itemize @bullet 2920@itemize @bullet
2777@item 2921@item
2778@b{Ref@TeX{}} has full support for multifile documents. You can edit parts of 2922@RefTeX{} has full support for multifile documents. You can edit parts of
2779several (multifile) documents at the same time without conflicts. 2923several (multifile) documents at the same time without conflicts.
2780@b{Ref@TeX{}} provides functions to run @code{grep}, @code{search} and 2924@RefTeX{} provides functions to run @code{grep}, @code{search} and
2781@code{query-replace} on all files which are part of a multifile 2925@code{query-replace} on all files which are part of a multifile
2782document. 2926document.
2783 2927
@@ -2785,10 +2929,10 @@ document.
2785@vindex tex-main-file 2929@vindex tex-main-file
2786@vindex TeX-master 2930@vindex TeX-master
2787All files belonging to a multifile document should define a File 2931All files belonging to a multifile document should define a File
2788Variable (@code{TeX-master} for AUCTeX or @code{tex-main-file} for the 2932Variable (@code{TeX-master} for @AUCTeX{} or @code{tex-main-file} for the
2789standard Emacs LaTeX mode) containing the name of the master file. For 2933standard Emacs @LaTeX{} mode) containing the name of the master file. For
2790example, to set the file variable @code{TeX-master}, include something 2934example, to set the file variable @code{TeX-master}, include something
2791like the following at the end of each TeX file: 2935like the following at the end of each @TeX{} file:
2792 2936
2793@example 2937@example
2794%%% Local Variables: *** 2938%%% Local Variables: ***
@@ -2797,7 +2941,7 @@ like the following at the end of each TeX file:
2797%%% End: *** 2941%%% End: ***
2798@end example 2942@end example
2799 2943
2800AUCTeX with the setting 2944@AUCTeX{} with the setting
2801 2945
2802@lisp 2946@lisp
2803(setq-default TeX-master nil) 2947(setq-default TeX-master nil)
@@ -2805,14 +2949,14 @@ AUCTeX with the setting
2805 2949
2806will actually ask you for each new file about the master file and insert 2950will actually ask you for each new file about the master file and insert
2807this comment automatically. For more details see the documentation of 2951this comment automatically. For more details see the documentation of
2808the AUCTeX (@pxref{Multifile,,,auctex, The AUC TeX User Manual}), the 2952the @AUCTeX{} (@pxref{Multifile,,,auctex, The AUCTeX User Manual}), the
2809documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs, 2953documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs,
2810The GNU Emacs Manual}) and the Emacs documentation on File Variables 2954The GNU Emacs Manual}) and the Emacs documentation on File Variables
2811(@pxref{File Variables,,,emacs, The GNU Emacs Manual}). 2955(@pxref{File Variables,,,emacs, The GNU Emacs Manual}).
2812 2956
2813@item 2957@item
2814The context of a label definition must be found in the same file as the 2958The context of a label definition must be found in the same file as the
2815label itself in order to be processed correctly by @b{Ref@TeX{}}. The only 2959label itself in order to be processed correctly by @RefTeX{}. The only
2816exception is that section labels referring to a section statement 2960exception is that section labels referring to a section statement
2817outside the current file can still use that section title as 2961outside the current file can still use that section title as
2818context. 2962context.
@@ -2822,7 +2966,7 @@ context.
2822@section Language Support 2966@section Language Support
2823@cindex Language support 2967@cindex Language support
2824 2968
2825Some parts of @b{Ref@TeX{}} are language dependent. The default 2969Some parts of @RefTeX{} are language dependent. The default
2826settings work well for English. If you are writing in a different 2970settings work well for English. If you are writing in a different
2827language, the following hints may be useful: 2971language, the following hints may be useful:
2828 2972
@@ -2838,7 +2982,7 @@ to be changed for other languages. See the variables
2838@item 2982@item
2839@vindex reftex-translate-to-ascii-function 2983@vindex reftex-translate-to-ascii-function
2840@vindex reftex-label-illegal-re 2984@vindex reftex-label-illegal-re
2841Also, when a label is derived from context, @b{Ref@TeX{}} clears the 2985Also, when a label is derived from context, @RefTeX{} clears the
2842context string from non-ASCII characters in order to make a valid label. 2986context string from non-ASCII characters in order to make a valid label.
2843If there should ever be a version of @TeX{} which allows extended 2987If there should ever be a version of @TeX{} which allows extended
2844characters @emph{in labels}, then we will have to look at the 2988characters @emph{in labels}, then we will have to look at the
@@ -2846,7 +2990,7 @@ variables @code{reftex-translate-to-ascii-function} and
2846@code{reftex-label-illegal-re}. 2990@code{reftex-label-illegal-re}.
2847 2991
2848@item 2992@item
2849When a label is referenced, @b{Ref@TeX{}} looks at the word before point 2993When a label is referenced, @RefTeX{} looks at the word before point
2850to guess which label type is required. These @emph{magic words} are 2994to guess which label type is required. These @emph{magic words} are
2851different in every language. For an example of how to add magic words, 2995different in every language. For an example of how to add magic words,
2852see @ref{Adding Magic Words}. 2996see @ref{Adding Magic Words}.
@@ -2854,7 +2998,7 @@ see @ref{Adding Magic Words}.
2854@vindex reftex-multiref-punctuation 2998@vindex reftex-multiref-punctuation
2855@vindex reftex-cite-punctuation 2999@vindex reftex-cite-punctuation
2856@item 3000@item
2857@b{Ref@TeX{}} inserts ``punctuation'' for multiple references and 3001@RefTeX{} inserts ``punctuation'' for multiple references and
2858for the author list in citations. Some of this may be language 3002for the author list in citations. Some of this may be language
2859dependent. See the variables @code{reftex-multiref-punctuation} and 3003dependent. See the variables @code{reftex-multiref-punctuation} and
2860@code{reftex-cite-punctuation}. 3004@code{reftex-cite-punctuation}.
@@ -2865,25 +3009,25 @@ dependent. See the variables @code{reftex-multiref-punctuation} and
2865@cindex Finding files 3009@cindex Finding files
2866 3010
2867In order to find files included in a document via @code{\input} or 3011In order to find files included in a document via @code{\input} or
2868@code{\include}, @b{Ref@TeX{}} searches all directories specified in the 3012@code{\include}, @RefTeX{} searches all directories specified in the
2869environment variable @code{TEXINPUTS}. Similarly, it will search the 3013environment variable @code{TEXINPUTS}. Similarly, it will search the
2870path specified in the variables @code{BIBINPUTS} and @code{TEXBIB} for 3014path specified in the variables @code{BIBINPUTS} and @code{TEXBIB} for
2871BibTeX database files. 3015@BibTeX{} database files.
2872 3016
2873When searching, @b{Ref@TeX{}} will also expand recursive path 3017When searching, @RefTeX{} will also expand recursive path
2874definitions (directories ending in @samp{//} or @samp{!!}). But it will 3018definitions (directories ending in @samp{//} or @samp{!!}). But it will
2875only search and expand directories @emph{explicitly} given in these 3019only search and expand directories @emph{explicitly} given in these
2876variables. This may cause problems under the following circumstances: 3020variables. This may cause problems under the following circumstances:
2877 3021
2878@itemize @bullet 3022@itemize @bullet
2879@item 3023@item
2880Most TeX system have a default search path for both TeX files and BibTeX 3024Most @TeX{} system have a default search path for both @TeX{} files and @BibTeX{}
2881files which is defined in some setup file. Usually this default path is 3025files which is defined in some setup file. Usually this default path is
2882for system files which @b{Ref@TeX{}} does not need to see. But if your 3026for system files which @RefTeX{} does not need to see. But if your
2883document needs TeX files or BibTeX database files in a directory only 3027document needs @TeX{} files or @BibTeX{} database files in a directory only
2884given in the default search path, @b{Ref@TeX{}} will fail to find them. 3028given in the default search path, @RefTeX{} will fail to find them.
2885@item 3029@item
2886Some TeX systems do not use environment variables at all in order to 3030Some @TeX{} systems do not use environment variables at all in order to
2887specify the search path. Both default and user search path are then 3031specify the search path. Both default and user search path are then
2888defined in setup files. 3032defined in setup files.
2889@end itemize 3033@end itemize
@@ -2896,7 +3040,7 @@ There are three ways to solve this problem:
2896Specify all relevant directories explicitly in the environment 3040Specify all relevant directories explicitly in the environment
2897variables. If for some reason you don't want to mess with the default 3041variables. If for some reason you don't want to mess with the default
2898variables @code{TEXINPUTS} and @code{BIBINPUTS}, define your own 3042variables @code{TEXINPUTS} and @code{BIBINPUTS}, define your own
2899variables and configure @b{Ref@TeX{}} to use them instead: 3043variables and configure @RefTeX{} to use them instead:
2900 3044
2901@lisp 3045@lisp
2902(setq reftex-texpath-environment-variables '("MYTEXINPUTS")) 3046(setq reftex-texpath-environment-variables '("MYTEXINPUTS"))
@@ -2904,7 +3048,7 @@ variables and configure @b{Ref@TeX{}} to use them instead:
2904@end lisp 3048@end lisp
2905 3049
2906@item 3050@item
2907Specify the full search path directly in @b{Ref@TeX{}}'s variables. 3051Specify the full search path directly in @RefTeX{}'s variables.
2908 3052
2909@lisp 3053@lisp
2910(setq reftex-texpath-environment-variables 3054(setq reftex-texpath-environment-variables
@@ -2914,10 +3058,10 @@ Specify the full search path directly in @b{Ref@TeX{}}'s variables.
2914@end lisp 3058@end lisp
2915 3059
2916@item 3060@item
2917Some TeX systems provide stand--alone programs to do the file search just 3061Some @TeX{} systems provide stand-alone programs to do the file search just
2918like TeX and BibTeX. E.g. Thomas Esser's @code{teTeX} uses the 3062like @TeX{} and @BibTeX{}. E.g. Thomas Esser's @code{teTeX} uses the
2919@code{kpathsearch} library which provides the command @code{kpsewhich} 3063@code{kpathsearch} library which provides the command @code{kpsewhich}
2920to search for files. @b{Ref@TeX{}} can be configured to use this 3064to search for files. @RefTeX{} can be configured to use this
2921program. Note that the exact syntax of the @code{kpsewhich} 3065program. Note that the exact syntax of the @code{kpsewhich}
2922command depends upon the version of that program. 3066command depends upon the version of that program.
2923 3067
@@ -2935,8 +3079,8 @@ command depends upon the version of that program.
2935Some people like to use RefTeX with noweb files, which usually have the 3079Some people like to use RefTeX with noweb files, which usually have the
2936extension @file{.nw}. In order to deal with such files, the new 3080extension @file{.nw}. In order to deal with such files, the new
2937extension must be added to the list of valid extensions in the variable 3081extension must be added to the list of valid extensions in the variable
2938@code{reftex-file-extensions}. When working with AUCTeX as major mode, 3082@code{reftex-file-extensions}. When working with @AUCTeX{} as major mode,
2939the new extension must also be known to AUCTeX via the variable 3083the new extension must also be known to @AUCTeX{} via the variable
2940@code{TeX-file-extension}. For example: 3084@code{TeX-file-extension}. For example:
2941 3085
2942@lisp 3086@lisp
@@ -2956,15 +3100,15 @@ am leaving this stuff in the manual for people who want to write thick
2956books, where some of it still might be useful.} 3100books, where some of it still might be useful.}
2957 3101
2958Implementing the principle of least surprises, the default settings of 3102Implementing the principle of least surprises, the default settings of
2959@b{Ref@TeX{}} ensure a safe ride for beginners and casual users. However, 3103@RefTeX{} ensure a safe ride for beginners and casual users. However,
2960when using @b{Ref@TeX{}} for a large project and/or on a small computer, 3104when using @RefTeX{} for a large project and/or on a small computer,
2961there are ways to improve speed or memory usage. 3105there are ways to improve speed or memory usage.
2962 3106
2963@itemize @bullet 3107@itemize @bullet
2964@item 3108@item
2965@b{Removing Lookup Buffers}@* 3109@b{Removing Lookup Buffers}@*
2966@cindex Removing lookup buffers 3110@cindex Removing lookup buffers
2967@b{Ref@TeX{}} will load other parts of a multifile document as well as BibTeX 3111@RefTeX{} will load other parts of a multifile document as well as @BibTeX{}
2968database files for lookup purposes. These buffers are kept, so that 3112database files for lookup purposes. These buffers are kept, so that
2969subsequent use of the same files is fast. If you can't afford keeping 3113subsequent use of the same files is fast. If you can't afford keeping
2970these buffers around, and if you can live with a speed penalty, try 3114these buffers around, and if you can live with a speed penalty, try
@@ -2978,13 +3122,13 @@ these buffers around, and if you can live with a speed penalty, try
2978@b{Partial Document Scans}@* 3122@b{Partial Document Scans}@*
2979@cindex Partial documents scans 3123@cindex Partial documents scans
2980@cindex Document scanning, partial 3124@cindex Document scanning, partial
2981A @kbd{C-u} prefix on the major @b{Ref@TeX{}} commands @code{reftex-label} 3125A @kbd{C-u} prefix on the major @RefTeX{} commands @code{reftex-label}
2982(@kbd{C-u C-c (}), @code{reftex-reference} (@kbd{C-u C-c )}), 3126(@kbd{C-u C-c (}), @code{reftex-reference} (@kbd{C-u C-c )}),
2983@code{reftex-citation} (@kbd{C-u C-c [}), @code{reftex-toc} (@kbd{C-u C-c 3127@code{reftex-citation} (@kbd{C-u C-c [}), @code{reftex-toc} (@kbd{C-u C-c
2984=}), and @code{reftex-view-crossref} (@kbd{C-u C-c &}) initiates 3128=}), and @code{reftex-view-crossref} (@kbd{C-u C-c &}) initiates
2985re-parsing of the entire document in order to update the parsing 3129re-parsing of the entire document in order to update the parsing
2986information. For a large document this can be unnecessary, in 3130information. For a large document this can be unnecessary, in
2987particular if only one file has changed. @b{Ref@TeX{}} can be configured 3131particular if only one file has changed. @RefTeX{} can be configured
2988to do partial scans instead of full ones. @kbd{C-u} re-parsing then 3132to do partial scans instead of full ones. @kbd{C-u} re-parsing then
2989does apply only to the current buffer and files included from it. 3133does apply only to the current buffer and files included from it.
2990Likewise, the @kbd{r} key in both the label selection buffer and the 3134Likewise, the @kbd{r} key in both the label selection buffer and the
@@ -3004,7 +3148,7 @@ try
3004@cindex Saving parser information 3148@cindex Saving parser information
3005@cindex Parse information, saving to a file 3149@cindex Parse information, saving to a file
3006@vindex reftex-parse-file-extension 3150@vindex reftex-parse-file-extension
3007Even with partial scans enabled, @b{Ref@TeX{}} still has to make one full 3151Even with partial scans enabled, @RefTeX{} still has to make one full
3008scan, when you start working with a document. To avoid this, parsing 3152scan, when you start working with a document. To avoid this, parsing
3009information can be stored in a file. The file @file{MASTER.rel} is used 3153information can be stored in a file. The file @file{MASTER.rel} is used
3010for storing information about a document with master file 3154for storing information about a document with master file
@@ -3022,11 +3166,11 @@ session. To use this feature, put into @file{.emacs}:
3022@b{Identifying label types by prefix}@* 3166@b{Identifying label types by prefix}@*
3023@cindex Parse information, saving to a file 3167@cindex Parse information, saving to a file
3024@vindex reftex-trust-label-prefix 3168@vindex reftex-trust-label-prefix
3025@b{Ref@TeX{}} normally parses around each label to check in which 3169@RefTeX{} normally parses around each label to check in which
3026environment this label is located, in order to assign a label type to 3170environment this label is located, in order to assign a label type to
3027the label. If your document contains thousands of labels, document 3171the label. If your document contains thousands of labels, document
3028parsing will take considerable time. If you have been using label prefixes 3172parsing will take considerable time. If you have been using label prefixes
3029like tab: and fn: consistently, you can tell @b{Ref@TeX{}} to get the 3173like tab: and fn: consistently, you can tell @RefTeX{} to get the
3030label type directly from the prefix, without additional parsing. This 3174label type directly from the prefix, without additional parsing. This
3031will be faster and also allow labels to end up in the correct category 3175will be faster and also allow labels to end up in the correct category
3032if for some reason it is not possible to derive the correct type from 3176if for some reason it is not possible to derive the correct type from
@@ -3041,7 +3185,7 @@ equation labels, use
3041@b{Automatic Document Scans}@* 3185@b{Automatic Document Scans}@*
3042@cindex Automatic document scans 3186@cindex Automatic document scans
3043@cindex Document scanning, automatic 3187@cindex Document scanning, automatic
3044At rare occasions, @b{Ref@TeX{}} will automatically rescan a part of the 3188At rare occasions, @RefTeX{} will automatically rescan a part of the
3045document. If this gets into your way, it can be turned off with 3189document. If this gets into your way, it can be turned off with
3046 3190
3047@vindex reftex-allow-automatic-rescan 3191@vindex reftex-allow-automatic-rescan
@@ -3049,7 +3193,7 @@ document. If this gets into your way, it can be turned off with
3049(setq reftex-allow-automatic-rescan nil) 3193(setq reftex-allow-automatic-rescan nil)
3050@end lisp 3194@end lisp
3051 3195
3052@b{Ref@TeX{}} will then occasionally annotate new labels in the selection 3196@RefTeX{} will then occasionally annotate new labels in the selection
3053buffer, saying that their position in the label list in uncertain. A 3197buffer, saying that their position in the label list in uncertain. A
3054manual document scan will fix this. 3198manual document scan will fix this.
3055 3199
@@ -3059,7 +3203,7 @@ manual document scan will fix this.
3059@cindex Selection buffers, multiple 3203@cindex Selection buffers, multiple
3060Normally, the selection buffer @file{*RefTeX Select*} is re-created for 3204Normally, the selection buffer @file{*RefTeX Select*} is re-created for
3061every selection process. In documents with very many labels this can 3205every selection process. In documents with very many labels this can
3062take several seconds. @b{Ref@TeX{}} provides an option to create a 3206take several seconds. @RefTeX{} provides an option to create a
3063separate selection buffer for each label type and to keep this buffer 3207separate selection buffer for each label type and to keep this buffer
3064from one selection to the next. These buffers are updated automatically 3208from one selection to the next. These buffers are updated automatically
3065only when a new label has been added in the buffers category with 3209only when a new label has been added in the buffers category with
@@ -3089,7 +3233,7 @@ with the @kbd{g} key. To get this behavior, use instead
3089@need 2000 3233@need 2000
3090@noindent 3234@noindent
3091@b{As a summary}, here are the settings I recommend for heavy use of 3235@b{As a summary}, here are the settings I recommend for heavy use of
3092@b{Ref@TeX{}} with large documents: 3236@RefTeX{} with large documents:
3093 3237
3094@lisp 3238@lisp
3095@group 3239@group
@@ -3100,30 +3244,30 @@ with the @kbd{g} key. To get this behavior, use instead
3100@end lisp 3244@end lisp
3101 3245
3102@node AUCTeX, Multifile Documents, Faces, Top 3246@node AUCTeX, Multifile Documents, Faces, Top
3103@section AUC@TeX{} 3247@section @AUCTeX{}
3104@cindex @code{AUCTeX}, Emacs package 3248@cindex @code{AUCTeX}, Emacs package
3105@cindex Emacs packages, @code{AUCTeX} 3249@cindex Emacs packages, @code{AUCTeX}
3106 3250
3107AUCTeX is without doubt the best major mode for editing TeX and LaTeX 3251@AUCTeX{} is without doubt the best major mode for editing @TeX{} and @LaTeX{}
3108files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}). 3252files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}).
3109If AUCTeX is not part of your Emacs distribution, you can get 3253If @AUCTeX{} is not part of your Emacs distribution, you can get
3110it@footnote{XEmacs 21.x users may want to install the corresponding 3254it@footnote{XEmacs 21.x users may want to install the corresponding
3111XEmacs package.} by ftp from the @value{AUCTEXSITE}. 3255XEmacs package.} by FTP from the @value{AUCTEXSITE}.
3112 3256
3113@menu 3257@menu
3114* AUCTeX-RefTeX Interface:: How both packages work together 3258* AUCTeX-RefTeX Interface:: How both packages work together
3115* Style Files:: AUCTeX's style files can support RefTeX 3259* Style Files:: @AUCTeX{}'s style files can support RefTeX
3116* Bib-Cite:: Hypertext reading of a document 3260* Bib-Cite:: Hypertext reading of a document
3117@end menu 3261@end menu
3118 3262
3119@node AUCTeX-RefTeX Interface, Style Files, , AUCTeX 3263@node AUCTeX-RefTeX Interface, Style Files, , AUCTeX
3120@subsection The AUC@TeX{}-@b{Ref@TeX{}} Interface 3264@subsection The @AUCTeX{}-@RefTeX{} Interface
3121 3265
3122@b{Ref@TeX{}} contains code to interface with AUCTeX. When this 3266@RefTeX{} contains code to interface with @AUCTeX{}. When this
3123interface is turned on, both packages will interact closely. Instead of 3267interface is turned on, both packages will interact closely. Instead of
3124using @b{Ref@TeX{}}'s commands directly, you can then also use them 3268using @RefTeX{}'s commands directly, you can then also use them
3125indirectly as part of the AUCTeX 3269indirectly as part of the @AUCTeX{}
3126environment@footnote{@b{Ref@TeX{}} 4.0 and AUCTeX 9.10c will be 3270environment@footnote{@RefTeX{} 4.0 and @AUCTeX{} 9.10c will be
3127needed for all of this to work. Parts of it work also with earlier 3271needed for all of this to work. Parts of it work also with earlier
3128versions.}. The interface is turned on with 3272versions.}. The interface is turned on with
3129 3273
@@ -3146,12 +3290,12 @@ The following list describes the individual parts of the interface.
3146@kindex C-c C-s 3290@kindex C-c C-s
3147@findex LaTeX-section, @r{AUCTeX} 3291@findex LaTeX-section, @r{AUCTeX}
3148@findex TeX-insert-macro, @r{AUCTeX} 3292@findex TeX-insert-macro, @r{AUCTeX}
3149@b{AUCTeX calls @code{reftex-label} to insert labels}@* 3293@b{@AUCTeX{} calls @code{reftex-label} to insert labels}@*
3150When a new section is created with @kbd{C-c C-s}, or a new environment 3294When a new section is created with @kbd{C-c C-s}, or a new environment
3151is inserted with @kbd{C-c C-e}, AUCTeX normally prompts for a label to 3295is inserted with @kbd{C-c C-e}, @AUCTeX{} normally prompts for a label to
3152go with it. With the interface, @code{reftex-label} is called instead. 3296go with it. With the interface, @code{reftex-label} is called instead.
3153For example, if you type @kbd{C-c C-e equation @key{RET}}, AUCTeX and 3297For example, if you type @kbd{C-c C-e equation @key{RET}}, @AUCTeX{} and
3154@b{Ref@TeX{}} will insert 3298@RefTeX{} will insert
3155 3299
3156@example 3300@example
3157\begin@{equation@} 3301\begin@{equation@}
@@ -3163,12 +3307,12 @@ For example, if you type @kbd{C-c C-e equation @key{RET}}, AUCTeX and
3163@noindent 3307@noindent
3164without further prompts. 3308without further prompts.
3165 3309
3166Similarly, when you type @kbd{C-c C-s section @key{RET}}, @b{Ref@TeX{}} 3310Similarly, when you type @kbd{C-c C-s section @key{RET}}, @RefTeX{}
3167will offer its default label which is derived from the section title. 3311will offer its default label which is derived from the section title.
3168 3312
3169@item 3313@item
3170@b{AUCTeX tells @b{Ref@TeX{}} about new sections}@* 3314@b{@AUCTeX{} tells @RefTeX{} about new sections}@*
3171When creating a new section with @kbd{C-c C-s}, @b{Ref@TeX{}} will not 3315When creating a new section with @kbd{C-c C-s}, @RefTeX{} will not
3172have to rescan the buffer in order to see it. 3316have to rescan the buffer in order to see it.
3173 3317
3174@item 3318@item
@@ -3182,44 +3326,44 @@ have to rescan the buffer in order to see it.
3182@findex TeX-arg-index, @r{AUCTeX function} 3326@findex TeX-arg-index, @r{AUCTeX function}
3183@findex TeX-insert-macro, @r{AUCTeX function} 3327@findex TeX-insert-macro, @r{AUCTeX function}
3184@kindex C-c @key{RET} 3328@kindex C-c @key{RET}
3185@b{@b{Ref@TeX{}} supplies macro arguments}@* When you insert a macro 3329@b{@RefTeX{} supplies macro arguments}@* When you insert a macro
3186interactively with @kbd{C-c @key{RET}}, AUCTeX normally prompts for 3330interactively with @kbd{C-c @key{RET}}, @AUCTeX{} normally prompts for
3187macro arguments. Internally, it uses the functions 3331macro arguments. Internally, it uses the functions
3188@code{TeX-arg-label}, @code{TeX-arg-cite}, and @code{TeX-arg-index} to 3332@code{TeX-arg-label}, @code{TeX-arg-cite}, and @code{TeX-arg-index} to
3189prompt for arguments which are labels, citation keys and index entries. 3333prompt for arguments which are labels, citation keys and index entries.
3190The interface takes over these functions@footnote{@code{fset} is used to 3334The interface takes over these functions@footnote{@code{fset} is used to
3191do this, which is not reversible. However, @b{Ref@TeX{}} implements the 3335do this, which is not reversible. However, @RefTeX{} implements the
3192old functionality when you later decide to turn off the interface.} and 3336old functionality when you later decide to turn off the interface.} and
3193supplies the macro arguments with @b{Ref@TeX{}'s} mechanisms. For 3337supplies the macro arguments with @b{@RefTeX{}'s} mechanisms. For
3194example, when you type @kbd{C-c @key{RET} ref @key{RET}}, @b{Ref@TeX{}} 3338example, when you type @kbd{C-c @key{RET} ref @key{RET}}, @RefTeX{}
3195will supply its label selection process (@pxref{Referencing 3339will supply its label selection process (@pxref{Referencing
3196Labels}). 3340Labels}).
3197 3341
3198@item 3342@item
3199@b{@b{Ref@TeX{}} tells AUCTeX about new labels, citation-- and index keys}@* 3343@b{@RefTeX{} tells @AUCTeX{} about new labels, citation and index keys}@*
3200@b{Ref@TeX{}} will add all newly created labels to AUCTeX's completion list. 3344@RefTeX{} will add all newly created labels to @AUCTeX{}'s completion list.
3201@end itemize 3345@end itemize
3202 3346
3203@node Style Files, Bib-Cite, AUCTeX-RefTeX Interface, AUCTeX 3347@node Style Files, Bib-Cite, AUCTeX-RefTeX Interface, AUCTeX
3204@subsection Style Files 3348@subsection Style Files
3205@cindex Style files, AUCTeX 3349@cindex Style files, AUCTeX
3206@findex TeX-add-style-hook, @r{AUCTeX} 3350@findex TeX-add-style-hook, @r{AUCTeX}
3207Style files are Emacs Lisp files which are evaluated by AUCTeX in 3351Style files are Emacs Lisp files which are evaluated by @AUCTeX{} in
3208association with the @code{\documentclass} and @code{\usepackage} 3352association with the @code{\documentclass} and @code{\usepackage}
3209commands of a document (@pxref{Style Files,,,auctex}). Support for 3353commands of a document (@pxref{Style Files,,,auctex}). Support for
3210@b{Ref@TeX{}} in such a style file is useful when the LaTeX style 3354@RefTeX{} in such a style file is useful when the @LaTeX{} style
3211defines macros or environments connected with labels, citations, or the 3355defines macros or environments connected with labels, citations, or the
3212index. Many style files (e.g. @file{amsmath.el} or @file{natbib.el}) 3356index. Many style files (e.g. @file{amsmath.el} or @file{natbib.el})
3213distributed with AUCTeX already support @b{Ref@TeX{}} in this 3357distributed with @AUCTeX{} already support @RefTeX{} in this
3214way. 3358way.
3215 3359
3216Before calling a @b{Ref@TeX{}} function, the style hook should always 3360Before calling a @RefTeX{} function, the style hook should always
3217test for the availability of the function, so that the style file will 3361test for the availability of the function, so that the style file will
3218also work for people who do not use @b{Ref@TeX{}}. 3362also work for people who do not use @RefTeX{}.
3219 3363
3220Additions made with style files in the way described below remain local 3364Additions made with style files in the way described below remain local
3221to the current document. For example, if one package uses AMSTeX, the 3365to the current document. For example, if one package uses AMSTeX, the
3222style file will make @b{Ref@TeX{}} switch over to @code{\eqref}, but 3366style file will make @RefTeX{} switch over to @code{\eqref}, but
3223this will not affect other documents. 3367this will not affect other documents.
3224 3368
3225@findex reftex-add-label-environments 3369@findex reftex-add-label-environments
@@ -3230,7 +3374,7 @@ function @code{reftex-add-to-label-alist} which is still available as an
3230alias for compatibility.} which defines additions to 3374alias for compatibility.} which defines additions to
3231@code{reftex-label-alist}. The argument taken by this function must have 3375@code{reftex-label-alist}. The argument taken by this function must have
3232the same format as @code{reftex-label-alist}. The @file{amsmath.el} 3376the same format as @code{reftex-label-alist}. The @file{amsmath.el}
3233style file of AUCTeX for example contains the following: 3377style file of @AUCTeX{} for example contains the following:
3234 3378
3235@lisp 3379@lisp
3236@group 3380@group
@@ -3262,7 +3406,7 @@ with @code{\newtheorem} might use
3262Similarly, a style hook may contain a call to 3406Similarly, a style hook may contain a call to
3263@code{reftex-set-cite-format} to set the citation format. The style 3407@code{reftex-set-cite-format} to set the citation format. The style
3264file @file{natbib.el} for the Natbib citation style does switch 3408file @file{natbib.el} for the Natbib citation style does switch
3265@b{Ref@TeX{}}'s citation format like this: 3409@RefTeX{}'s citation format like this:
3266 3410
3267@lisp 3411@lisp
3268(TeX-add-style-hook "natbib" 3412(TeX-add-style-hook "natbib"
@@ -3286,7 +3430,7 @@ the style @file{multind.el} contains
3286@end lisp 3430@end lisp
3287 3431
3288If you have your own package @file{myindex} which defines the 3432If you have your own package @file{myindex} which defines the
3289following macros to be used with the LaTeX @file{index.sty} file 3433following macros to be used with the @LaTeX{} @file{index.sty} file
3290@example 3434@example
3291\newcommand@{\molec@}[1]@{#1\index@{Molecules!#1@}@} 3435\newcommand@{\molec@}[1]@{#1\index@{Molecules!#1@}@}
3292\newcommand@{\aindex@}[1]@{#1\index[author]@{#1@} 3436\newcommand@{\aindex@}[1]@{#1\index[author]@{#1@}
@@ -3310,7 +3454,7 @@ you could write this in the style file @file{myindex.el}:
3310Finally the hook may contain a call to @code{reftex-add-section-levels} 3454Finally the hook may contain a call to @code{reftex-add-section-levels}
3311to define additional section statements. For example, the FoilTeX class 3455to define additional section statements. For example, the FoilTeX class
3312has just two headers, @code{\foilhead} and @code{\rotatefoilhead}. Here 3456has just two headers, @code{\foilhead} and @code{\rotatefoilhead}. Here
3313is a style file @file{foils.el} that will inform @b{Ref@TeX{}} about these: 3457is a style file @file{foils.el} that will inform @RefTeX{} about these:
3314 3458
3315@lisp 3459@lisp
3316(TeX-add-style-hook "foils" 3460(TeX-add-style-hook "foils"
@@ -3326,20 +3470,20 @@ is a style file @file{foils.el} that will inform @b{Ref@TeX{}} about these:
3326@cindex Emacs packages, @code{bib-cite} 3470@cindex Emacs packages, @code{bib-cite}
3327 3471
3328Once you have written a document with labels, references and citations, 3472Once you have written a document with labels, references and citations,
3329it can be nice to read it like a hypertext document. @b{Ref@TeX{}} has 3473it can be nice to read it like a hypertext document. @RefTeX{} has
3330support for that: @code{reftex-view-crossref} (bound to @kbd{C-c 3474support for that: @code{reftex-view-crossref} (bound to @kbd{C-c
3331&}), @code{reftex-mouse-view-crossref} (bound to @kbd{S-mouse-2}), and 3475&}), @code{reftex-mouse-view-crossref} (bound to @kbd{S-mouse-2}), and
3332@code{reftex-search-document}. A somewhat fancier interface with mouse 3476@code{reftex-search-document}. A somewhat fancier interface with mouse
3333highlighting is provided (among other things) by Peter S. Galbraith's 3477highlighting is provided (among other things) by Peter S. Galbraith's
3334@file{bib-cite.el}. There is some overlap in the functionalities of 3478@file{bib-cite.el}. There is some overlap in the functionalities of
3335Bib-cite and @b{Ref@TeX{}}. Bib-cite.el comes bundled with 3479Bib-cite and @RefTeX{}. Bib-cite.el comes bundled with
3336AUCTeX. 3480@AUCTeX{}.
3337 3481
3338Bib-cite version 3.06 and later can be configured so that bib-cite's 3482Bib-cite version 3.06 and later can be configured so that bib-cite's
3339mouse functions use @b{Ref@TeX{}} for displaying references and citations. 3483mouse functions use @RefTeX{} for displaying references and citations.
3340This can be useful in particular when working with the LaTeX @code{xr} 3484This can be useful in particular when working with the @LaTeX{} @code{xr}
3341package or with an explicit @code{thebibliography} environment (rather 3485package or with an explicit @code{thebibliography} environment (rather
3342than BibTeX). Bib-cite cannot handle those, but @b{Ref@TeX{}} does. To 3486than @BibTeX{}). Bib-cite cannot handle those, but @RefTeX{} does. To
3343make use of this feature, try 3487make use of this feature, try
3344 3488
3345@vindex bib-cite-use-reftex-view-crossref 3489@vindex bib-cite-use-reftex-view-crossref
@@ -3354,7 +3498,7 @@ make use of this feature, try
3354 3498
3355@itemize @bullet 3499@itemize @bullet
3356@item 3500@item
3357@b{LaTeX commands}@* 3501@b{@LaTeX{} commands}@*
3358@cindex LaTeX commands, not found 3502@cindex LaTeX commands, not found
3359@code{\input}, @code{\include}, and @code{\section} (etc.) statements 3503@code{\input}, @code{\include}, and @code{\section} (etc.) statements
3360have to be first on a line (except for white space). 3504have to be first on a line (except for white space).
@@ -3362,7 +3506,7 @@ have to be first on a line (except for white space).
3362@item 3506@item
3363@b{Commented regions}@* 3507@b{Commented regions}@*
3364@cindex Labels, commented out 3508@cindex Labels, commented out
3365@b{Ref@TeX{}} sees also labels in regions commented out and will refuse to 3509@RefTeX{} sees also labels in regions commented out and will refuse to
3366make duplicates of such labels. This is considered to be a feature. 3510make duplicates of such labels. This is considered to be a feature.
3367 3511
3368@item 3512@item
@@ -3382,7 +3526,7 @@ scan will fix this.
3382The label environment definitions in @code{reftex-label-alist} are 3526The label environment definitions in @code{reftex-label-alist} are
3383global and apply to all documents. If you need to make definitions 3527global and apply to all documents. If you need to make definitions
3384local to a document, because they would interfere with settings in other 3528local to a document, because they would interfere with settings in other
3385documents, you should use AUCTeX and set up style files with calls to 3529documents, you should use @AUCTeX{} and set up style files with calls to
3386@code{reftex-add-label-environments}, @code{reftex-set-cite-format}, 3530@code{reftex-add-label-environments}, @code{reftex-set-cite-format},
3387@code{reftex-add-index-macros}, and @code{reftex-add-section-levels}. 3531@code{reftex-add-index-macros}, and @code{reftex-add-section-levels}.
3388Settings made with these functions remain local to the current 3532Settings made with these functions remain local to the current
@@ -3398,9 +3542,9 @@ document. @xref{AUCTeX}.
3398@cindex Emacs packages, @code{iso-cvt} 3542@cindex Emacs packages, @code{iso-cvt}
3399When using packages which make the buffer representation of a file 3543When using packages which make the buffer representation of a file
3400different from its disk representation (e.g. x-symbol, isotex, 3544different from its disk representation (e.g. x-symbol, isotex,
3401iso-cvt) you may find that @b{Ref@TeX{}}'s parsing information sometimes 3545iso-cvt) you may find that @RefTeX{}'s parsing information sometimes
3402reflects the disk state of a file. This happens only in @emph{unvisited} 3546reflects the disk state of a file. This happens only in @emph{unvisited}
3403parts of a multifile document, because @b{Ref@TeX{}} visits these files 3547parts of a multifile document, because @RefTeX{} visits these files
3404literally for speed reasons. Then both short context and section 3548literally for speed reasons. Then both short context and section
3405headings may look different from what you usually see on your screen. 3549headings may look different from what you usually see on your screen.
3406In rare cases @code{reftex-toc} may have problems to jump to an affected 3550In rare cases @code{reftex-toc} may have problems to jump to an affected
@@ -3410,7 +3554,7 @@ this:
3410@item 3554@item
3411@vindex reftex-keep-temporary-buffers 3555@vindex reftex-keep-temporary-buffers
3412@code{(setq reftex-keep-temporary-buffers t)}@* 3556@code{(setq reftex-keep-temporary-buffers t)}@*
3413This implies that @b{Ref@TeX{}} will load all parts of a multifile 3557This implies that @RefTeX{} will load all parts of a multifile
3414document into Emacs (i.e. there won't be any temporary buffers). 3558document into Emacs (i.e. there won't be any temporary buffers).
3415@item 3559@item
3416@vindex reftex-initialize-temporary-buffers 3560@vindex reftex-initialize-temporary-buffers
@@ -3437,7 +3581,7 @@ to specify a label. E.g. Lamport's @file{pf.sty} uses both
3437@end example 3581@end example
3438 3582
3439@noindent 3583@noindent
3440We need to trick @b{Ref@TeX{}} into swallowing this: 3584We need to trick @RefTeX{} into swallowing this:
3441 3585
3442@lisp 3586@lisp
3443@group 3587@group
@@ -3450,7 +3594,7 @@ We need to trick @b{Ref@TeX{}} into swallowing this:
3450 3594
3451@noindent 3595@noindent
3452The first line is just a normal configuration for a macro. For the 3596The first line is just a normal configuration for a macro. For the
3453@code{step+} environment we actually tell @b{Ref@TeX{}} to look for the 3597@code{step+} environment we actually tell @RefTeX{} to look for the
3454@emph{macro} @samp{\begin@{step+@}} and interpret the @emph{first} 3598@emph{macro} @samp{\begin@{step+@}} and interpret the @emph{first}
3455argument (which really is a second argument to the macro @code{\begin}) 3599argument (which really is a second argument to the macro @code{\begin})
3456as a label of type @code{?p}. Argument count for this macro starts only 3600as a label of type @code{?p}. Argument count for this macro starts only
@@ -3462,7 +3606,7 @@ context.
3462@cindex Idle timer restart 3606@cindex Idle timer restart
3463@vindex reftex-use-itimer-in-xemacs 3607@vindex reftex-use-itimer-in-xemacs
3464In XEmacs, idle timer restart does not work reliably after fast 3608In XEmacs, idle timer restart does not work reliably after fast
3465keystrokes. Therefore @b{Ref@TeX{}} currently uses the post command 3609keystrokes. Therefore @RefTeX{} currently uses the post command
3466hook to start the timer used for automatic crossref information. When 3610hook to start the timer used for automatic crossref information. When
3467this bug gets fixed, a real idle timer can be requested with 3611this bug gets fixed, a real idle timer can be requested with
3468@lisp 3612@lisp
@@ -3475,7 +3619,7 @@ this bug gets fixed, a real idle timer can be requested with
3475@cindex Key bindings, problems with Viper mode 3619@cindex Key bindings, problems with Viper mode
3476@findex viper-harness-minor-mode 3620@findex viper-harness-minor-mode
3477With @i{Viper} mode prior to Vipers version 3.01, you need to protect 3621With @i{Viper} mode prior to Vipers version 3.01, you need to protect
3478@b{Ref@TeX{}}'s keymaps with 3622@RefTeX{}'s keymaps with
3479 3623
3480@lisp 3624@lisp
3481(viper-harness-minor-mode "reftex") 3625(viper-harness-minor-mode "reftex")
@@ -3491,15 +3635,15 @@ With @i{Viper} mode prior to Vipers version 3.01, you need to protect
3491@cindex Acknowledgments 3635@cindex Acknowledgments
3492@cindex Thanks 3636@cindex Thanks
3493@cindex Bug reports 3637@cindex Bug reports
3494@cindex @code{http}, @b{Ref@TeX{}} home page 3638@cindex @code{http}, @RefTeX{} home page
3495@cindex @code{ftp}, @b{Ref@TeX{}} site 3639@cindex @code{ftp}, @RefTeX{} site
3496 3640
3497Ref@TeX{} was written by @i{Carsten Dominik} 3641@RefTeX{} was written by @i{Carsten Dominik}
3498@email{dominik@@science.uva.nl}, with contributions by @i{Stephen 3642@email{dominik@@science.uva.nl}, with contributions by @i{Stephen
3499Eglen}. Ref@TeX{} is currently maintained by @value{MAINTAINER}, see 3643Eglen}. @RefTeX{} is currently maintained by @value{MAINTAINER}, see
3500the @value{MAINTAINERSITE} for detailed information. 3644the @value{MAINTAINERSITE} for detailed information.
3501 3645
3502If you have questions about Ref@TeX{}, you can send email to the 3646If you have questions about @RefTeX{}, you can send email to the
3503@value{SUPPORTADDRESS}. If you want to contribute code or ideas, write 3647@value{SUPPORTADDRESS}. If you want to contribute code or ideas, write
3504to the @value{DEVELADDRESS}. And in the rare case of finding a bug, 3648to the @value{DEVELADDRESS}. And in the rare case of finding a bug,
3505please use @kbd{M-x reftex-report-bug @key{RET}} which will prepare a 3649please use @kbd{M-x reftex-report-bug @key{RET}} which will prepare a
@@ -3512,42 +3656,31 @@ There are also several Usenet groups which have competent readers who
3512might be able to help: @code{comp.emacs}, @code{gnu.emacs.help}, 3656might be able to help: @code{comp.emacs}, @code{gnu.emacs.help},
3513@code{comp.emacs.xemacs}, and @code{comp.text.tex}. 3657@code{comp.emacs.xemacs}, and @code{comp.text.tex}.
3514 3658
3515@b{Ref@TeX{}} is bundled and pre-installed with Emacs since version 20.2. 3659Thanks to the people on the Net who have used @RefTeX{} and helped
3516It was also bundled and pre-installed with XEmacs 19.16--20.x. XEmacs
351721.x users want to install the corresponding plugin package which is
3518available from the @value{XEMACSFTP}. See the XEmacs 21.x
3519documentation on package installation for details.
3520
3521Users of earlier Emacs distributions (including Emacs 19) can get a
3522@b{Ref@TeX{}} distribution from the @value{MAINTAINERSITE}. Note that
3523the Emacs 19 version supports many but not all features described in
3524this manual.
3525
3526Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped
3527developing it with their reports. In particular thanks to @i{Ralf 3660developing it with their reports. In particular thanks to @i{Ralf
3528Angeli, Fran Burstall, Alastair Burt, Lars Clausen, Soren Dayton, 3661Angeli, Fran Burstall, Alastair Burt, Lars Clausen, Soren Dayton,
3529Stephen Eglen, Karl Eichwalder, Erik Frisk, Peter Galbraith, Kai 3662Stephen Eglen, Karl Eichwalder, Erik Frisk, Peter Galbraith, Kai
3530Grossjohann, Frank Harrell, Till A. Heilmann, Peter Heslin, Stephan 3663Grossjohann, Frank Harrell, Till A. Heilmann, Peter Heslin, Stephan
3531Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, David Kastrup, Adrian Lanz, 3664Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, David Kastrup, Adrian Lanz,
3532Juri Linkov, Rory Molinari, Stefan Monnier, Laurent Mugnier, Dan 3665Juri Linkov, Wolfgang Mayer, Rory Molinari, Stefan Monnier, Laurent
3533Nicolaescu, Sudeep Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, 3666Mugnier, Dan Nicolaescu, Sudeep Kumar Palat, Daniel Polani, Alan Shutko,
3534Richard Stanton, Allan Strand, Jan Vroonhof, Christoph Wedler, Alan 3667Robin Socha, Richard Stanton, Allan Strand, Jan Vroonhof, Christoph
3535Williams, Roland Winkler, Hans-Christoph Wirth, Eli Zaretskii}. 3668Wedler, Alan Williams, Roland Winkler, Hans-Christoph Wirth, Eli
3536 3669Zaretskii}.
3537 3670
3538The @code{view-crossref} feature was inspired by @i{Peter Galbraith's} 3671The @code{view-crossref} feature was inspired by @i{Peter Galbraith's}
3539@file{bib-cite.el}. 3672@file{bib-cite.el}.
3540 3673
3541Finally thanks to @i{Uwe Bolick} who first got me interested in 3674Finally thanks to @i{Uwe Bolick} who first got me interested in
3542supporting LaTeX labels and references with an editor (which was 3675supporting @LaTeX{} labels and references with an editor (which was
3543MicroEmacs at the time). 3676MicroEmacs at the time).
3544 3677
3545@node Commands, Options, Imprint, Top 3678@node Commands, Options, Imprint, Top
3546@chapter Commands 3679@chapter Commands
3547@cindex Commands, list of 3680@cindex Commands, list of
3548 3681
3549Here is a summary of @b{Ref@TeX{}}'s commands which can be executed from 3682Here is a summary of @RefTeX{}'s commands which can be executed from
3550LaTeX files. Command which are executed from the special buffers are 3683@LaTeX{} files. Command which are executed from the special buffers are
3551not described here. All commands are available from the @code{Ref} 3684not described here. All commands are available from the @code{Ref}
3552menu. See @xref{Key Bindings}. 3685menu. See @xref{Key Bindings}.
3553 3686
@@ -3567,8 +3700,8 @@ it. With one or two @kbd{C-u} prefixes, enforce document rescan first.
3567@end deffn 3700@end deffn
3568 3701
3569@deffn Command reftex-citation 3702@deffn Command reftex-citation
3570Make a citation using BibTeX database files. After prompting for a regular 3703Make a citation using @BibTeX{} database files. After prompting for a regular
3571expression, scans the buffers with BibTeX entries (taken from the 3704expression, scans the buffers with @BibTeX{} entries (taken from the
3572@code{\bibliography} command or a @code{thebibliography} environment) 3705@code{\bibliography} command or a @code{thebibliography} environment)
3573and offers the matching entries for selection. The selected entry is 3706and offers the matching entries for selection. The selected entry is
3574formatted according to @code{reftex-cite-format} and inserted into the 3707formatted according to @code{reftex-cite-format} and inserted into the
@@ -3588,8 +3721,8 @@ expression to match all entries in all files.
3588@deffn Command reftex-index 3721@deffn Command reftex-index
3589Query for an index macro and insert it along with its arguments. The 3722Query for an index macro and insert it along with its arguments. The
3590index macros available are those defined in @code{reftex-index-macro} or 3723index macros available are those defined in @code{reftex-index-macro} or
3591by a call to @code{reftex-add-index-macros}, typically from an AUCTeX 3724by a call to @code{reftex-add-index-macros}, typically from an @AUCTeX{}
3592style file. @b{Ref@TeX{}} provides completion for the index tag and the 3725style file. @RefTeX{} provides completion for the index tag and the
3593index key, and will prompt for other arguments. 3726index key, and will prompt for other arguments.
3594@end deffn 3727@end deffn
3595 3728
@@ -3600,8 +3733,8 @@ to make an index entry. The phrase indexed is the current selection or
3600the word near point. When called with one @kbd{C-u} prefix, let the 3733the word near point. When called with one @kbd{C-u} prefix, let the
3601user have a chance to edit the index entry. When called with 2 3734user have a chance to edit the index entry. When called with 2
3602@kbd{C-u} as prefix, also ask for the index macro and other stuff. When 3735@kbd{C-u} as prefix, also ask for the index macro and other stuff. When
3603called inside TeX math mode as determined by the @file{texmathp.el} 3736called inside @TeX{} math mode as determined by the @file{texmathp.el}
3604library which is part of AUCTeX, the string is first processed with the 3737library which is part of @AUCTeX{}, the string is first processed with the
3605@code{reftex-index-math-format}, which see. 3738@code{reftex-index-math-format}, which see.
3606@end deffn 3739@end deffn
3607 3740
@@ -3610,7 +3743,7 @@ Add current selection or the word at point to the phrases buffer.
3610When you are in transient-mark-mode and the region is active, the 3743When you are in transient-mark-mode and the region is active, the
3611selection will be used - otherwise the word at point. 3744selection will be used - otherwise the word at point.
3612You get a chance to edit the entry in the phrases buffer - to save the 3745You get a chance to edit the entry in the phrases buffer - to save the
3613buffer and return to the LaTeX document, finish with @kbd{C-c C-c}. 3746buffer and return to the @LaTeX{} document, finish with @kbd{C-c C-c}.
3614@end deffn 3747@end deffn
3615 3748
3616@deffn Command reftex-index-visit-phrases-buffer 3749@deffn Command reftex-index-visit-phrases-buffer
@@ -3644,9 +3777,9 @@ the command @code{reftex-view-crossref-from-bibtex}. With one or two
3644@end deffn 3777@end deffn
3645 3778
3646@deffn Command reftex-view-crossref-from-bibtex 3779@deffn Command reftex-view-crossref-from-bibtex
3647View location in a LaTeX document which cites the BibTeX entry at point. 3780View location in a @LaTeX{} document which cites the @BibTeX{} entry at point.
3648Since BibTeX files can be used by many LaTeX documents, this function 3781Since @BibTeX{} files can be used by many @LaTeX{} documents, this function
3649prompts upon first use for a buffer in @b{Ref@TeX{}} mode. To reset this 3782prompts upon first use for a buffer in @RefTeX{} mode. To reset this
3650link to a document, call the function with a prefix arg. Calling 3783link to a document, call the function with a prefix arg. Calling
3651this function several times find successive citation locations. 3784this function several times find successive citation locations.
3652@end deffn 3785@end deffn
@@ -3677,7 +3810,7 @@ active TAGS table is required.
3677 3810
3678@deffn Command reftex-isearch-minor-mode 3811@deffn Command reftex-isearch-minor-mode
3679Toggle a minor mode which enables incremental search to work globally 3812Toggle a minor mode which enables incremental search to work globally
3680on the entire multifile document. Files will be searched in th 3813on the entire multifile document. Files will be searched in the
3681sequence they appear in the document. 3814sequence they appear in the document.
3682@end deffn 3815@end deffn
3683 3816
@@ -3699,7 +3832,7 @@ Renumber all simple labels in the document to make them sequentially.
3699Simple labels are the ones created by RefTeX, consisting only of the 3832Simple labels are the ones created by RefTeX, consisting only of the
3700prefix and a number. After the command completes, all these labels will 3833prefix and a number. After the command completes, all these labels will
3701have sequential numbers throughout the document. Any references to the 3834have sequential numbers throughout the document. Any references to the
3702labels will be changed as well. For this, @b{Ref@TeX{}} looks at the 3835labels will be changed as well. For this, @RefTeX{} looks at the
3703arguments of any macros which either start or end with the string 3836arguments of any macros which either start or end with the string
3704@samp{ref}. This command should be used with care, in particular in 3837@samp{ref}. This command should be used with care, in particular in
3705multifile documents. You should not use it if another document refers 3838multifile documents. You should not use it if another document refers
@@ -3711,21 +3844,30 @@ Produce a list of all duplicate labels in the document.
3711@end deffn 3844@end deffn
3712 3845
3713@deffn Command reftex-create-bibtex-file 3846@deffn Command reftex-create-bibtex-file
3714Create a new BibTeX database file with all entries referenced in document. 3847@vindex reftex-create-bibtex-header
3715The command prompts for a filename and writes the collected entries to 3848@vindex reftex-create-bibtex-footer
3716that file. Only entries referenced in the current document with 3849Create a new @BibTeX{} database file with all entries referenced in
3717any @code{\cite}-like macros are used. 3850document. The command prompts for a filename and writes the collected
3718The sequence in the new file is the same as it was in the old database. 3851entries to that file. Only entries referenced in the current document
3852with any @code{\cite}-like macros are used. The sequence in the new
3853file is the same as it was in the old database.
3854
3855Entries referenced from other entries must appear after all referencing
3856entries.
3857
3858You can define strings to be used as header or footer for the created
3859files in the variables @code{reftex-create-bibtex-header} or
3860@code{reftex-create-bibtex-footer} respectively.
3719@end deffn 3861@end deffn
3720 3862
3721@deffn Command reftex-customize 3863@deffn Command reftex-customize
3722Run the customize browser on the @b{Ref@TeX{}} group. 3864Run the customize browser on the @RefTeX{} group.
3723@end deffn 3865@end deffn
3724@deffn Command reftex-show-commentary 3866@deffn Command reftex-show-commentary
3725Show the commentary section from @file{reftex.el}. 3867Show the commentary section from @file{reftex.el}.
3726@end deffn 3868@end deffn
3727@deffn Command reftex-info 3869@deffn Command reftex-info
3728Run info on the top @b{Ref@TeX{}} node. 3870Run info on the top @RefTeX{} node.
3729@end deffn 3871@end deffn
3730@deffn Command reftex-parse-document 3872@deffn Command reftex-parse-document
3731Parse the entire document in order to update the parsing information. 3873Parse the entire document in order to update the parsing information.
@@ -3739,7 +3881,7 @@ removes the parse file associated with the current document.
3739@chapter Options, Keymaps, Hooks 3881@chapter Options, Keymaps, Hooks
3740@cindex Options, list of 3882@cindex Options, list of
3741 3883
3742Here is a complete list of @b{Ref@TeX{}}'s configuration variables. All 3884Here is a complete list of @RefTeX{}'s configuration variables. All
3743variables have customize support - so if you are not familiar with Emacs 3885variables have customize support - so if you are not familiar with Emacs
3744Lisp (and even if you are) you might find it more comfortable to use 3886Lisp (and even if you are) you might find it more comfortable to use
3745@code{customize} to look at and change these variables. @kbd{M-x 3887@code{customize} to look at and change these variables. @kbd{M-x
@@ -3765,14 +3907,14 @@ reftex-customize} will get you there.
3765@cindex Table of contents, options 3907@cindex Table of contents, options
3766 3908
3767@defopt reftex-include-file-commands 3909@defopt reftex-include-file-commands
3768List of LaTeX commands which input another file. 3910List of @LaTeX{} commands which input another file.
3769The file name is expected after the command, either in braces or separated 3911The file name is expected after the command, either in braces or separated
3770by whitespace. 3912by whitespace.
3771@end defopt 3913@end defopt
3772 3914
3773@defopt reftex-max-section-depth 3915@defopt reftex-max-section-depth
3774Maximum depth of section levels in document structure. 3916Maximum depth of section levels in document structure.
3775Standard LaTeX needs 7, default is 12. 3917Standard @LaTeX{} needs 7, default is 12.
3776@end defopt 3918@end defopt
3777 3919
3778@defopt reftex-section-levels 3920@defopt reftex-section-levels
@@ -3910,7 +4052,7 @@ itself and has the following structure:
3910@end example 4052@end example
3911 4053
3912Each list entry describes either an environment carrying a counter for 4054Each list entry describes either an environment carrying a counter for
3913use with @code{\label} and @code{\ref}, or a LaTeX macro defining a 4055use with @code{\label} and @code{\ref}, or a @LaTeX{} macro defining a
3914label as (or inside) one of its arguments. The elements of each list 4056label as (or inside) one of its arguments. The elements of each list
3915entry are: 4057entry are:
3916 4058
@@ -3947,7 +4089,7 @@ list, to cover cases in which different environments carry the same
3947label type (like @code{equation} and @code{eqnarray}). If the type 4089label type (like @code{equation} and @code{eqnarray}). If the type
3948indicator is @code{nil} and the macro has a label argument @samp{@{*@}}, 4090indicator is @code{nil} and the macro has a label argument @samp{@{*@}},
3949the macro defines neutral labels just like @code{\label}. In this case 4091the macro defines neutral labels just like @code{\label}. In this case
3950the reminder of this entry is ignored. 4092the remainder of this entry is ignored.
3951 4093
3952@item @var{label-prefix} 4094@item @var{label-prefix}
3953Label prefix string, like @samp{tab:}. The prefix is a short string 4095Label prefix string, like @samp{tab:}. The prefix is a short string
@@ -3968,7 +4110,7 @@ Example: In a file @file{intro.tex}, @samp{eq:%f:} will become
3968@samp{eq:intro:}. 4110@samp{eq:intro:}.
3969 4111
3970@item @var{reference-format} 4112@item @var{reference-format}
3971Format string for reference insert in buffer. @samp{%s} will be 4113Format string for reference insertion in buffer. @samp{%s} will be
3972replaced by the label. When the format starts with @samp{~}, this 4114replaced by the label. When the format starts with @samp{~}, this
3973@samp{~} will only be inserted when the character before point is 4115@samp{~} will only be inserted when the character before point is
3974@emph{not} a whitespace. 4116@emph{not} a whitespace.
@@ -3996,7 +4138,7 @@ If an integer, use the nth argument of the macro. As a special case,
39961000 means to get text after the last macro argument. 41381000 means to get text after the last macro argument.
3997@item 4139@item
3998If a string, use as regexp to search @emph{backward} from the label. 4140If a string, use as regexp to search @emph{backward} from the label.
3999Context is then the text following the end of the match. E.g. putting 4141Context is then the text following the end of the match. E.g. setting
4000this to @samp{\\caption[[@{]} will use the caption in a figure or table 4142this to @samp{\\caption[[@{]} will use the caption in a figure or table
4001environment. @samp{\\begin@{eqnarray@}\|\\\\} works for 4143environment. @samp{\\begin@{eqnarray@}\|\\\\} works for
4002eqnarrays. 4144eqnarrays.
@@ -4021,7 +4163,7 @@ context:
4021@end example 4163@end example
4022@end itemize 4164@end itemize
4023 4165
4024Label context is used in two ways by @b{Ref@TeX{}}: For display in the label 4166Label context is used in two ways by @RefTeX{}: For display in the label
4025menu, and to derive a label string. If you want to use a different 4167menu, and to derive a label string. If you want to use a different
4026method for each of these, specify them as a dotted pair. 4168method for each of these, specify them as a dotted pair.
4027E.g. @code{(nil . t)} uses the text after the label (@code{nil}) for 4169E.g. @code{(nil . t)} uses the text after the label (@code{nil}) for
@@ -4033,7 +4175,7 @@ List of magic words which identify a reference to be of this type. If
4033the word before point is equal to one of these words when calling 4175the word before point is equal to one of these words when calling
4034@code{reftex-reference}, the label list offered will be automatically 4176@code{reftex-reference}, the label list offered will be automatically
4035restricted to labels of the correct type. If the first element of this 4177restricted to labels of the correct type. If the first element of this
4036word--list is the symbol `regexp', the strings are interpreted as regular 4178word list is the symbol `regexp', the strings are interpreted as regular
4037expressions. 4179expressions.
4038 4180
4039@item @var{toc-level} 4181@item @var{toc-level}
@@ -4047,7 +4189,7 @@ made.
4047@end table 4189@end table
4048 4190
4049If the type indicator characters of two or more entries are the same, 4191If the type indicator characters of two or more entries are the same,
4050@b{Ref@TeX{}} will use 4192@RefTeX{} will use
4051@itemize @minus 4193@itemize @minus
4052@item 4194@item
4053the first non-@code{nil} format and prefix 4195the first non-@code{nil} format and prefix
@@ -4081,7 +4223,7 @@ replaced with the environment or macro.
4081@defopt reftex-trust-label-prefix 4223@defopt reftex-trust-label-prefix
4082Non-@code{nil} means, trust the label prefix when determining label type. 4224Non-@code{nil} means, trust the label prefix when determining label type.
4083It is customary to use special label prefixes to distinguish different label 4225It is customary to use special label prefixes to distinguish different label
4084types. The label prefixes have no syntactic meaning in LaTeX (unless 4226types. The label prefixes have no syntactic meaning in @LaTeX{} (unless
4085special packages like fancyref) are being used. RefTeX can and by 4227special packages like fancyref) are being used. RefTeX can and by
4086default does parse around each label to detect the correct label type, 4228default does parse around each label to detect the correct label type,
4087but this process can be slow when a document contains thousands of 4229but this process can be slow when a document contains thousands of
@@ -4122,7 +4264,7 @@ Flags governing label insertion. The value has the form
4122(@var{derive} @var{prompt}) 4264(@var{derive} @var{prompt})
4123@end example 4265@end example
4124 4266
4125If @var{derive} is @code{t}, @b{Ref@TeX{}} will try to derive a sensible 4267If @var{derive} is @code{t}, @RefTeX{} will try to derive a sensible
4126label from context. A section label for example will be derived from 4268label from context. A section label for example will be derived from
4127the section heading. The conversion of the context to a valid label is 4269the section heading. The conversion of the context to a valid label is
4128governed by the specifications given in 4270governed by the specifications given in
@@ -4171,7 +4313,7 @@ buffer.
4171 4313
4172@deffn Hook reftex-string-to-label-function 4314@deffn Hook reftex-string-to-label-function
4173Function to turn an arbitrary string into a valid label. 4315Function to turn an arbitrary string into a valid label.
4174@b{Ref@TeX{}}'s default function uses the variable 4316@RefTeX{}'s default function uses the variable
4175@code{reftex-derive-label-parameters}. 4317@code{reftex-derive-label-parameters}.
4176@end deffn 4318@end deffn
4177 4319
@@ -4278,35 +4420,38 @@ This is used to string together whole reference sets, like
4278@code{reftex-reference}. 4420@code{reftex-reference}.
4279@end defopt 4421@end defopt
4280 4422
4281@defopt reftex-vref-is-default 4423@defopt reftex-ref-style-alist
4282Non-@code{nil} means, the varioref macro @code{\vref} is used as 4424Alist of reference styles. Each element is a list of the style name,
4283default. In the selection buffer, the @kbd{v} key toggles the reference 4425the name of the @LaTeX{} package associated with the style or @code{t}
4284macro between @code{\ref} and @code{\vref}. The value of this variable 4426for any package, and an alist of macros where the first entry of each
4285determines the default which is active when entering the selection 4427item is the reference macro and the second a key for selecting the macro
4286process. Instead of @code{nil} or @code{t}, this may also be a string 4428when the macro type is being prompted for. (See also
4287of type letters indicating the label types for which it should be 4429@code{reftex-ref-macro-prompt}.) The keys, represented as characters,
4288true. 4430have to be unique.
4289@end defopt 4431@end defopt
4290 4432
4291@defopt reftex-fref-is-default 4433@defopt reftex-ref-style-default-list
4292Non-@code{nil} means, the fancyref macro @code{\fref} is used as 4434List of reference styles to be activated by default. The order is
4293default. In the selection buffer, the @kbd{V} key toggles the reference 4435significant and controls the order in which macros can be cycled in the
4294macro between @code{\ref}, @code{\fref} and @code{\Fref}. The value of 4436buffer for selecting a label. The entries in the list have to match the
4295this variable determines the default which is active when entering the 4437respective reference style names used in the variable
4296selection process. Instead of @code{nil} or @code{t}, this may also be 4438@code{reftex-ref-style-alist}.
4297a string of type letters indicating the label types for which it should 4439@end defopt
4298be true. 4440
4441@defopt reftex-ref-macro-prompt
4442Controls if @code{reftex-reference} prompts for the reference macro.
4299@end defopt 4443@end defopt
4300 4444
4301@deffn Hook reftex-format-ref-function 4445@deffn Hook reftex-format-ref-function
4302If non-@code{nil}, should be a function which produces the string to 4446If non-@code{nil}, should be a function which produces the string to
4303insert as a reference. Note that the insertion format can also be 4447insert as a reference. Note that the insertion format can also be
4304changed with @code{reftex-label-alist}. This hook also is used by the 4448changed with @code{reftex-label-alist}. This hook also is used by the
4305special commands to insert @code{\vref} and @code{\fref} references, so 4449special commands to insert e.g. @code{\vref} and @code{\fref}
4306even if you set this, your setting will be ignored by the special 4450references, so even if you set this, your setting will be ignored by the
4307commands. The function will be called with two arguments, the 4451special commands. The function will be called with three arguments, the
4308@var{label} and the @var{default-format} (usually @samp{~\ref@{%s@}}). 4452@var{label}, the @var{default format} which normally is
4309It should return the string to insert into the buffer. 4453@samp{~\ref@{%s@}} and the @var{reference style}. The function should
4454return the string to insert into the buffer.
4310@end deffn 4455@end deffn
4311 4456
4312@defopt reftex-level-indent 4457@defopt reftex-level-indent
@@ -4315,11 +4460,11 @@ Number of spaces to be used for indentation per section level.
4315 4460
4316@defopt reftex-guess-label-type 4461@defopt reftex-guess-label-type
4317Non-@code{nil} means, @code{reftex-reference} will try to guess the 4462Non-@code{nil} means, @code{reftex-reference} will try to guess the
4318label type. To do that, @b{Ref@TeX{}} will look at the word before the 4463label type. To do that, @RefTeX{} will look at the word before the
4319cursor and compare it with the magic words given in 4464cursor and compare it with the magic words given in
4320@code{reftex-label-alist}. When it finds a match, @b{Ref@TeX{}} will 4465@code{reftex-label-alist}. When it finds a match, @RefTeX{} will
4321immediately offer the correct label menu - otherwise it will prompt you 4466immediately offer the correct label menu - otherwise it will prompt you
4322for a label type. If you set this variable to @code{nil}, @b{Ref@TeX{}} 4467for a label type. If you set this variable to @code{nil}, @RefTeX{}
4323will always prompt for a label type. 4468will always prompt for a label type.
4324@end defopt 4469@end defopt
4325 4470
@@ -4351,7 +4496,7 @@ The keymap which is active in the labels selection process
4351@cindex Creating citations, options 4496@cindex Creating citations, options
4352 4497
4353@defopt reftex-bibliography-commands 4498@defopt reftex-bibliography-commands
4354LaTeX commands which specify the BibTeX databases to use with the document. 4499@LaTeX{} commands which specify the @BibTeX{} databases to use with the document.
4355@end defopt 4500@end defopt
4356 4501
4357@defopt reftex-bibfile-ignore-regexps 4502@defopt reftex-bibfile-ignore-regexps
@@ -4359,20 +4504,20 @@ List of regular expressions to exclude files in
4359@code{\\bibliography@{..@}}. File names matched by any of these regexps 4504@code{\\bibliography@{..@}}. File names matched by any of these regexps
4360will not be parsed. Intended for files which contain only 4505will not be parsed. Intended for files which contain only
4361@code{@@string} macro definitions and the like, which are ignored by 4506@code{@@string} macro definitions and the like, which are ignored by
4362@b{Ref@TeX{}} anyway. 4507@RefTeX{} anyway.
4363@end defopt 4508@end defopt
4364 4509
4365@defopt reftex-default-bibliography 4510@defopt reftex-default-bibliography
4366List of BibTeX database files which should be used if none are specified. 4511List of @BibTeX{} database files which should be used if none are specified.
4367When @code{reftex-citation} is called from a document with neither 4512When @code{reftex-citation} is called from a document with neither
4368a @samp{\bibliography@{...@}} statement nor a @code{thebibliography} 4513a @samp{\bibliography@{...@}} statement nor a @code{thebibliography}
4369environment, @b{Ref@TeX{}} will scan these files instead. Intended for 4514environment, @RefTeX{} will scan these files instead. Intended for
4370using @code{reftex-citation} in non-LaTeX files. The files will be 4515using @code{reftex-citation} in non-@LaTeX{} files. The files will be
4371searched along the BIBINPUTS or TEXBIB path. 4516searched along the BIBINPUTS or TEXBIB path.
4372@end defopt 4517@end defopt
4373 4518
4374@defopt reftex-sort-bibtex-matches 4519@defopt reftex-sort-bibtex-matches
4375Sorting of the entries found in BibTeX databases by reftex-citation. 4520Sorting of the entries found in @BibTeX{} databases by reftex-citation.
4376Possible values: 4521Possible values:
4377@example 4522@example
4378nil @r{Do not sort entries.} 4523nil @r{Do not sort entries.}
@@ -4393,7 +4538,7 @@ In the format, the following percent escapes will be expanded.
4393 4538
4394@table @code 4539@table @code
4395@item %l 4540@item %l
4396The BibTeX label of the citation. 4541The @BibTeX{} label of the citation.
4397@item %a 4542@item %a
4398List of author names, see also @code{reftex-cite-punctuation}. 4543List of author names, see also @code{reftex-cite-punctuation}.
4399@item %2a 4544@item %2a
@@ -4405,7 +4550,7 @@ Works like @samp{%a}, but on list of editor names. (@samp{%2e} and
4405@samp{%E} work a well). 4550@samp{%E} work a well).
4406@end table 4551@end table
4407 4552
4408It is also possible to access all other BibTeX database fields: 4553It is also possible to access all other @BibTeX{} database fields:
4409 4554
4410@example 4555@example
4411%b booktitle %c chapter %d edition %h howpublished 4556%b booktitle %c chapter %d edition %h howpublished
@@ -4426,7 +4571,7 @@ after the string has been formatted.
4426A pair of square brackets indicates an optional argument, and RefTeX 4571A pair of square brackets indicates an optional argument, and RefTeX
4427will prompt for the values of these arguments. 4572will prompt for the values of these arguments.
4428 4573
4429Beware that all this only works with BibTeX database files. When 4574Beware that all this only works with @BibTeX{} database files. When
4430citations are made from the @code{\bibitems} in an explicit 4575citations are made from the @code{\bibitems} in an explicit
4431@code{thebibliography} environment, only @samp{%l} is available. 4576@code{thebibliography} environment, only @samp{%l} is available.
4432 4577
@@ -4505,6 +4650,24 @@ The keymap which is active in the citation-key selection process
4505(@pxref{Creating Citations}). 4650(@pxref{Creating Citations}).
4506@end deffn 4651@end deffn
4507 4652
4653@defopt reftex-cite-key-separator
4654String used to separate several keys in a single @samp{\\cite} macro.
4655Per default this is @samp{","} but if you often have to deal with a lot
4656of entries and need to break the macro across several lines you might
4657want to change it to @samp{", "}.
4658@end defopt
4659
4660@defopt reftex-create-bibtex-header
4661Header to insert in BibTeX files generated by
4662@code{reftex-create-bibtex-file}.
4663@end defopt
4664
4665@defopt reftex-create-bibtex-footer
4666Footer to insert in BibTeX files generated by
4667@code{reftex-create-bibtex-file}.
4668@end defopt
4669
4670
4508@node Options (Index Support), Options (Viewing Cross-References), Options (Creating Citations), Options 4671@node Options (Index Support), Options (Viewing Cross-References), Options (Creating Citations), Options
4509@section Index Support 4672@section Index Support
4510@cindex Options, Index support 4673@cindex Options, Index support
@@ -4553,7 +4716,7 @@ should be @samp{Molecules!}.
4553@var{exclude} can be a function. If this function exists and returns a 4716@var{exclude} can be a function. If this function exists and returns a
4554non-@code{nil} value, the index entry at point is ignored. This was 4717non-@code{nil} value, the index entry at point is ignored. This was
4555implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts 4718implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts
4556in the LaTeX2e @code{index} package. 4719in the @LaTeX{}2e @code{index} package.
4557 4720
4558@var{repeat}, if non-@code{nil}, means the index macro does not typeset 4721@var{repeat}, if non-@code{nil}, means the index macro does not typeset
4559the entry in the text, so that the text has to be repeated outside the 4722the entry in the text, so that the text has to be repeated outside the
@@ -4564,14 +4727,14 @@ The final entry may also be a symbol. It must have an association in
4564the variable @code{reftex-index-macros-builtin} to specify the main 4727the variable @code{reftex-index-macros-builtin} to specify the main
4565indexing package you are using. Valid values are currently 4728indexing package you are using. Valid values are currently
4566@example 4729@example
4567default @r{The LaTeX default - unnecessary to specify this one} 4730default @r{The @LaTeX{} default - unnecessary to specify this one}
4568multind @r{The multind.sty package} 4731multind @r{The multind.sty package}
4569index @r{The index.sty package} 4732index @r{The index.sty package}
4570index-shortcut @r{The index.sty packages with the ^ and _ shortcuts.} 4733index-shortcut @r{The index.sty packages with the ^ and _ shortcuts.}
4571 @r{Should not be used - only for old documents} 4734 @r{Should not be used - only for old documents}
4572@end example 4735@end example
4573Note that AUCTeX sets these things internally for @b{Ref@TeX{}} as well, 4736Note that @AUCTeX{} sets these things internally for @RefTeX{} as well,
4574so with a sufficiently new version of AUCTeX, you should not set the 4737so with a sufficiently new version of @AUCTeX{}, you should not set the
4575package here. 4738package here.
4576@end defopt 4739@end defopt
4577 4740
@@ -4584,7 +4747,7 @@ This is a list with @code{(@var{macro-key} @var{default-tag})}.
4584 4747
4585@var{default-tag} is the tag to be used if the macro requires a 4748@var{default-tag} is the tag to be used if the macro requires a
4586@var{tag} argument. When this is @code{nil} and a @var{tag} is needed, 4749@var{tag} argument. When this is @code{nil} and a @var{tag} is needed,
4587@b{Ref@TeX{}} will ask for it. When this is the empty string and the 4750@RefTeX{} will ask for it. When this is the empty string and the
4588TAG argument of the index macro is optional, the TAG argument will be 4751TAG argument of the index macro is optional, the TAG argument will be
4589omitted. 4752omitted.
4590@end defopt 4753@end defopt
@@ -4604,11 +4767,11 @@ last @r{The last used index tag will be offered as default}
4604 4767
4605@defopt reftex-index-math-format 4768@defopt reftex-index-math-format
4606Format of index entries when copied from inside math mode. When 4769Format of index entries when copied from inside math mode. When
4607@code{reftex-index-selection-or-word} is executed inside TeX math mode, 4770@code{reftex-index-selection-or-word} is executed inside @TeX{} math mode,
4608the index key copied from the buffer is processed with this format 4771the index key copied from the buffer is processed with this format
4609string through the @code{format} function. This can be used to add the 4772string through the @code{format} function. This can be used to add the
4610math delimiters (e.g. @samp{$}) to the string. Requires the 4773math delimiters (e.g. @samp{$}) to the string. Requires the
4611@file{texmathp.el} library which is part of AUCTeX. 4774@file{texmathp.el} library which is part of @AUCTeX{}.
4612@end defopt 4775@end defopt
4613 4776
4614@defopt reftex-index-phrase-file-extension 4777@defopt reftex-index-phrase-file-extension
@@ -4660,7 +4823,7 @@ When doing global indexing from the phrases buffer, searches for some
4660phrases may match at places where that phrase was already indexed. In 4823phrases may match at places where that phrase was already indexed. In
4661particular when indexing an already processed document again, this 4824particular when indexing an already processed document again, this
4662will even be the norm. When this variable is non-@code{nil}, 4825will even be the norm. When this variable is non-@code{nil},
4663@b{Ref@TeX{}} checks if the match is an index macro argument, or if an 4826@RefTeX{} checks if the match is an index macro argument, or if an
4664index macro is directly before or after the phrase. If that is the 4827index macro is directly before or after the phrase. If that is the
4665case, that match will be ignored. 4828case, that match will be ignored.
4666@end defopt 4829@end defopt
@@ -4701,7 +4864,7 @@ Normal hook which is run when a buffer is put into
4701The letters which denote sections in the index. Usually these are all 4864The letters which denote sections in the index. Usually these are all
4702capital letters. Don't use any downcase letters. Order is not 4865capital letters. Don't use any downcase letters. Order is not
4703significant, the index will be sorted by whatever the sort function 4866significant, the index will be sorted by whatever the sort function
4704thinks is correct. In addition to these letters, @b{Ref@TeX{}} will 4867thinks is correct. In addition to these letters, @RefTeX{} will
4705create a group @samp{!} which contains all entries sorted below the 4868create a group @samp{!} which contains all entries sorted below the
4706lowest specified letter. In the @file{*Index*} buffer, pressing any of 4869lowest specified letter. In the @file{*Index*} buffer, pressing any of
4707these capital letters or @kbd{!} will jump to that section. 4870these capital letters or @kbd{!} will jump to that section.
@@ -4773,7 +4936,7 @@ escapes.
4773Non-@code{nil} means, automatic citation display will revisit files if 4936Non-@code{nil} means, automatic citation display will revisit files if
4774necessary. When nil, citation display in echo area will only be active 4937necessary. When nil, citation display in echo area will only be active
4775for cached echo strings (see @code{reftex-cache-cite-echo}), or for 4938for cached echo strings (see @code{reftex-cache-cite-echo}), or for
4776BibTeX database files which are already visited by a live associated 4939@BibTeX{} database files which are already visited by a live associated
4777buffers. 4940buffers.
4778@end defopt 4941@end defopt
4779 4942
@@ -4790,7 +4953,7 @@ scans. In order to clear it, use @kbd{M-x reftex-reset-mode}.
4790@cindex Finding files, options 4953@cindex Finding files, options
4791 4954
4792@defopt reftex-texpath-environment-variables 4955@defopt reftex-texpath-environment-variables
4793List of specifications how to retrieve the search path for TeX files. 4956List of specifications how to retrieve the search path for @TeX{} files.
4794Several entries are possible. 4957Several entries are possible.
4795@itemize @minus 4958@itemize @minus
4796@item 4959@item
@@ -4809,7 +4972,7 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}.
4809@end defopt 4972@end defopt
4810 4973
4811@defopt reftex-bibpath-environment-variables 4974@defopt reftex-bibpath-environment-variables
4812List of specifications how to retrieve the search path for BibTeX 4975List of specifications how to retrieve the search path for @BibTeX{}
4813files. Several entries are possible. 4976files. Several entries are possible.
4814@itemize @minus 4977@itemize @minus
4815@item 4978@item
@@ -4847,14 +5010,14 @@ then @samp{/tex/}, and then all subdirectories of @samp{./}. If this
4847option is @code{nil}, the subdirectories of @samp{./} are searched 5010option is @code{nil}, the subdirectories of @samp{./} are searched
4848before @samp{/tex/}. This is mainly for speed - most of the time the 5011before @samp{/tex/}. This is mainly for speed - most of the time the
4849recursive path is for the system files and not for the user files. Set 5012recursive path is for the system files and not for the user files. Set
4850this to @code{nil} if the default makes @b{Ref@TeX{}} finding files with 5013this to @code{nil} if the default makes @RefTeX{} finding files with
4851equal names in wrong sequence. 5014equal names in wrong sequence.
4852@end defopt 5015@end defopt
4853 5016
4854@defopt reftex-use-external-file-finders 5017@defopt reftex-use-external-file-finders
4855Non-@code{nil} means, use external programs to find files. Normally, 5018Non-@code{nil} means, use external programs to find files. Normally,
4856@b{Ref@TeX{}} searches the paths given in the environment variables 5019@RefTeX{} searches the paths given in the environment variables
4857@code{TEXINPUTS} and @code{BIBINPUTS} to find TeX files and BibTeX 5020@code{TEXINPUTS} and @code{BIBINPUTS} to find @TeX{} files and @BibTeX{}
4858database files. With this option turned on, it calls an external 5021database files. With this option turned on, it calls an external
4859program specified in the option @code{reftex-external-file-finders} 5022program specified in the option @code{reftex-external-file-finders}
4860instead. As a side effect, the variables 5023instead. As a side effect, the variables
@@ -4881,14 +5044,14 @@ non-@code{nil}.
4881 5044
4882@defopt reftex-keep-temporary-buffers 5045@defopt reftex-keep-temporary-buffers
4883Non-@code{nil} means, keep buffers created for parsing and lookup. 5046Non-@code{nil} means, keep buffers created for parsing and lookup.
4884@b{Ref@TeX{}} sometimes needs to visit files related to the current 5047@RefTeX{} sometimes needs to visit files related to the current
4885document. We distinguish files visited for 5048document. We distinguish files visited for
4886@table @asis 5049@table @asis
4887@item PARSING 5050@item PARSING
4888Parts of a multifile document loaded when (re)-parsing the 5051Parts of a multifile document loaded when (re)-parsing the
4889document. 5052document.
4890@item LOOKUP 5053@item LOOKUP
4891BibTeX database files and TeX files loaded to find a reference, to 5054@BibTeX{} database files and @TeX{} files loaded to find a reference, to
4892display label context, etc. 5055display label context, etc.
4893@end table 5056@end table
4894The created buffers can be kept for later use, or be thrown away 5057The created buffers can be kept for later use, or be thrown away
@@ -4912,7 +5075,7 @@ away, the initialization of the buffer depends upon the variable
4912 5075
4913@defopt reftex-initialize-temporary-buffers 5076@defopt reftex-initialize-temporary-buffers
4914Non-@code{nil} means do initializations even when visiting file 5077Non-@code{nil} means do initializations even when visiting file
4915temporarily. When @code{nil}, @b{Ref@TeX{}} may turn off find-file hooks and 5078temporarily. When @code{nil}, @RefTeX{} may turn off find-file hooks and
4916other stuff to briefly visit a file. When @code{t}, the full default 5079other stuff to briefly visit a file. When @code{t}, the full default
4917initializations are done (@code{find-file-hook} etc.). Instead of 5080initializations are done (@code{find-file-hook} etc.). Instead of
4918@code{t} or @code{nil}, this variable may also be a list of hook 5081@code{t} or @code{nil}, this variable may also be a list of hook
@@ -4923,12 +5086,12 @@ functions to do a minimal initialization.
4923List of regular expressions to exclude certain input files from parsing. 5086List of regular expressions to exclude certain input files from parsing.
4924If the name of a file included via @code{\include} or @code{\input} is 5087If the name of a file included via @code{\include} or @code{\input} is
4925matched by any of the regular expressions in this list, that file is not 5088matched by any of the regular expressions in this list, that file is not
4926parsed by @b{Ref@TeX{}}. 5089parsed by @RefTeX{}.
4927@end defopt 5090@end defopt
4928 5091
4929@defopt reftex-enable-partial-scans 5092@defopt reftex-enable-partial-scans
4930Non-@code{nil} means, re-parse only 1 file when asked to re-parse. 5093Non-@code{nil} means, re-parse only 1 file when asked to re-parse.
4931Re-parsing is normally requested with a @kbd{C-u} prefix to many @b{Ref@TeX{}} 5094Re-parsing is normally requested with a @kbd{C-u} prefix to many @RefTeX{}
4932commands, or with the @kbd{r} key in menus. When this option is 5095commands, or with the @kbd{r} key in menus. When this option is
4933@code{t} in a multifile document, we will only parse the current buffer, 5096@code{t} in a multifile document, we will only parse the current buffer,
4934or the file associated with the label or section heading near point in a 5097or the file associated with the label or section heading near point in a
@@ -4958,7 +5121,7 @@ This extension is added to the base name of the master file.
4958@end defopt 5121@end defopt
4959 5122
4960@defopt reftex-allow-automatic-rescan 5123@defopt reftex-allow-automatic-rescan
4961Non-@code{nil} means, @b{Ref@TeX{}} may rescan the document when this seems 5124Non-@code{nil} means, @RefTeX{} may rescan the document when this seems
4962necessary. Applies (currently) only in rare cases, when a new label 5125necessary. Applies (currently) only in rare cases, when a new label
4963cannot be placed with certainty into the internal label list. 5126cannot be placed with certainty into the internal label list.
4964@end defopt 5127@end defopt
@@ -5092,8 +5255,8 @@ map. @xref{Key Bindings}.
5092@end defopt 5255@end defopt
5093 5256
5094@defopt reftex-plug-into-AUCTeX 5257@defopt reftex-plug-into-AUCTeX
5095Plug-in flags for AUCTeX interface. This variable is a list of 5258Plug-in flags for @AUCTeX{} interface. This variable is a list of
50965 boolean flags. When a flag is non-@code{nil}, @b{Ref@TeX{}} 52595 boolean flags. When a flag is non-@code{nil}, @RefTeX{}
5097will 5260will
5098 5261
5099@example 5262@example
@@ -5110,7 +5273,7 @@ Supplying labels in new sections and environments applies when creating
5110sections with @kbd{C-c C-s} and environments with @kbd{C-c C-e}.@* 5273sections with @kbd{C-c C-s} and environments with @kbd{C-c C-e}.@*
5111Supplying macro arguments applies when you insert such a macro 5274Supplying macro arguments applies when you insert such a macro
5112interactively with @kbd{C-c @key{RET}}.@* 5275interactively with @kbd{C-c @key{RET}}.@*
5113See the AUCTeX documentation for more information. 5276See the @AUCTeX{} documentation for more information.
5114@end defopt 5277@end defopt
5115 5278
5116@defopt reftex-revisit-to-follow 5279@defopt reftex-revisit-to-follow
@@ -5130,10 +5293,10 @@ argument.
5130@section Keymaps and Hooks 5293@section Keymaps and Hooks
5131@cindex Keymaps 5294@cindex Keymaps
5132 5295
5133@b{Ref@TeX{}} has the usual general keymap and load-- and mode-hook. 5296@RefTeX{} has the usual general keymap, load hook and mode hook.
5134 5297
5135@deffn Keymap reftex-mode-map 5298@deffn Keymap reftex-mode-map
5136The keymap for @b{Ref@TeX{}} mode. 5299The keymap for @RefTeX{} mode.
5137@end deffn 5300@end deffn
5138 5301
5139@deffn {Normal Hook} reftex-load-hook 5302@deffn {Normal Hook} reftex-load-hook
@@ -5141,20 +5304,54 @@ Normal hook which is being run when loading @file{reftex.el}.
5141@end deffn 5304@end deffn
5142 5305
5143@deffn {Normal Hook} reftex-mode-hook 5306@deffn {Normal Hook} reftex-mode-hook
5144Normal hook which is being run when turning on @b{Ref@TeX{}} mode. 5307Normal hook which is being run when turning on @RefTeX{} mode.
5145@end deffn 5308@end deffn
5146 5309
5147Furthermore, the 4 modes used for referencing labels, creating 5310Furthermore, the four modes used for referencing labels, creating
5148citations, the table of contents buffer and the phrases buffer have 5311citations, the table of contents buffer and the phrases buffer have
5149their own keymaps and mode hooks. See the respective sections. There 5312their own keymaps and mode hooks. See the respective sections. There
5150are many more hooks which are described in the relevant sections about 5313are many more hooks which are described in the relevant sections about
5151options for a specific part of @b{Ref@TeX{}}. 5314options for a specific part of @RefTeX{}.
5152 5315
5153@node Changes, GNU Free Documentation License, Keymaps and Hooks, Top 5316@node Changes, GNU Free Documentation License, Keymaps and Hooks, Top
5154@chapter Changes 5317@chapter Changes
5155@cindex Changes 5318@cindex Changes
5156 5319
5157Here is a list of recent changes to @b{Ref@TeX{}}. 5320Here is a list of recent changes to @RefTeX{}.
5321
5322@noindent @b{Version 4.33}
5323
5324@itemize @bullet
5325@item
5326Update to GPLv3.
5327@item
5328Parse files are created in a way that does not interfere with recentf
5329mode.
5330@end itemize
5331
5332@noindent @b{Version 4.32}
5333
5334@itemize @bullet
5335@item
5336First release by @AUCTeX{} project.
5337@item
5338Installation routine rewritten after structure of source package
5339changed.
5340@item
5341Activation of @RefTeX{} changed, so make sure you read the installation
5342instructions and remove obsolete cruft related to @RefTeX{} from your
5343init file.
5344@item
5345Fixed bug where point would end up in the wrong buffer when jumping
5346between several @LaTeX{} and phrases buffers.
5347@item
5348Fixed bug where @BibTeX{} keys with hyphens were parsed incorrectly.
5349@item
5350Some performance improvements.
5351@item
5352The separator used between multiple citations in a \cite macro can now
5353be changed by customizing the variable @code{reftex-cite-key-separator}.
5354@end itemize
5158 5355
5159@noindent @b{Version 4.28} 5356@noindent @b{Version 4.28}
5160@itemize @bullet 5357@itemize @bullet
@@ -5504,7 +5701,7 @@ Option @code{reftex-bibfile-ignore-list} renamed to @code{-regexps}.
5504@item 5701@item
5505Expansion of recursive tex and bib path rewritten. 5702Expansion of recursive tex and bib path rewritten.
5506@item 5703@item
5507Fixed problem where @b{Ref@TeX{}} did not scan unsaved buffers. 5704Fixed problem where @RefTeX{} did not scan unsaved buffers.
5508@item 5705@item
5509Fixed bug with section numbering after *-red sections. 5706Fixed bug with section numbering after *-red sections.
5510@end itemize 5707@end itemize
@@ -5571,15 +5768,15 @@ variable @code{reftex-auto-view-crossref}.
5571AUCTeX interface updates: 5768AUCTeX interface updates:
5572@itemize @minus 5769@itemize @minus
5573@item 5770@item
5574AUCTeX 9.9c and later notifies @b{Ref@TeX{}} about new sections. 5771AUCTeX 9.9c and later notifies @RefTeX{} about new sections.
5575@item 5772@item
5576@b{Ref@TeX{}} notifies AUCTeX about new labels. 5773@RefTeX{} notifies AUCTeX about new labels.
5577@item 5774@item
5578@code{TeX-arg-ref} no longer used (introduction was unnecessary). 5775@code{TeX-arg-ref} no longer used (introduction was unnecessary).
5579@item 5776@item
5580@code{reftex-arg-label} and @code{reftex-arg-cite} fixed up. 5777@code{reftex-arg-label} and @code{reftex-arg-cite} fixed up.
5581@item 5778@item
5582Settings added to @b{Ref@TeX{}} via style files remain local. 5779Settings added to @RefTeX{} via style files remain local.
5583@end itemize 5780@end itemize
5584@item 5781@item
5585Fixed bug with @code{reftex-citation} in non-latex buffers. 5782Fixed bug with @code{reftex-citation} in non-latex buffers.
@@ -5601,7 +5798,7 @@ Fixed bug with empty context strings.
5601@noindent @b{Version 3.21} 5798@noindent @b{Version 3.21}
5602@itemize @bullet 5799@itemize @bullet
5603@item 5800@item
5604New options for all faces used by @b{Ref@TeX{}}. They're in the 5801New options for all faces used by @RefTeX{}. They're in the
5605customization group @code{reftex-fontification-configurations}. 5802customization group @code{reftex-fontification-configurations}.
5606@end itemize 5803@end itemize
5607 5804
@@ -5627,7 +5824,7 @@ Fixed some problems regarding the interaction with VIPER mode.
5627@item 5824@item
5628Follow-mode is now only used after point motion. 5825Follow-mode is now only used after point motion.
5629@item 5826@item
5630@b{Ref@TeX{}} now finally does not fontify temporary files anymore. 5827@RefTeX{} now finally does not fontify temporary files anymore.
5631@end itemize 5828@end itemize
5632 5829
5633@noindent @b{Version 3.17} 5830@noindent @b{Version 3.17}
@@ -5740,7 +5937,7 @@ Search for input and @file{.bib} files with recursive path definitions.
5740@noindent @b{Version 3.00} 5937@noindent @b{Version 3.00}
5741@itemize @bullet 5938@itemize @bullet
5742@item 5939@item
5743@b{Ref@TeX{}} should work better for very large projects: 5940@RefTeX{} should work better for very large projects:
5744@item 5941@item
5745The new parser works without creating a master buffer. 5942The new parser works without creating a master buffer.
5746@item 5943@item
@@ -5748,19 +5945,19 @@ Rescanning can be limited to a part of a multifile document.
5748@item 5945@item
5749Information from the parser can be stored in a file. 5946Information from the parser can be stored in a file.
5750@item 5947@item
5751@b{Ref@TeX{}} can deal with macros having a naked label as an argument. 5948@RefTeX{} can deal with macros having a naked label as an argument.
5752@item 5949@item
5753Macros may have white space and newlines between arguments. 5950Macros may have white space and newlines between arguments.
5754@item 5951@item
5755Multiple identical section headings no longer confuse 5952Multiple identical section headings no longer confuse
5756@code{reftex-toc}. 5953@code{reftex-toc}.
5757@item 5954@item
5758@b{Ref@TeX{}} should work correctly in combination with buffer-altering 5955@RefTeX{} should work correctly in combination with buffer-altering
5759packages like outline, folding, x-symbol, iso-cvt, isotex, etc. 5956packages like outline, folding, x-symbol, iso-cvt, isotex, etc.
5760@item 5957@item
5761All labeled environments discussed in @emph{The LaTeX Companion} by 5958All labeled environments discussed in @emph{The LaTeX Companion} by
5762Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of 5959Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of
5763@b{Ref@TeX{}}'s defaults. 5960@RefTeX{}'s defaults.
5764@end itemize 5961@end itemize
5765 5962
5766@noindent @b{Version 2.17} 5963@noindent @b{Version 2.17}
@@ -5858,7 +6055,7 @@ MS-DOS support.
5858@noindent @b{Version 1.07} 6055@noindent @b{Version 1.07}
5859@itemize @bullet 6056@itemize @bullet
5860@item 6057@item
5861@b{Ref@TeX{}} gets its own menu. 6058@RefTeX{} gets its own menu.
5862@end itemize 6059@end itemize
5863 6060
5864@noindent @b{Version 1.05} 6061@noindent @b{Version 1.05}