aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/reftex.texi1969
1 files changed, 1133 insertions, 836 deletions
diff --git a/man/reftex.texi b/man/reftex.texi
index 9ce77b35dc2..a2eb8a63bc7 100644
--- a/man/reftex.texi
+++ b/man/reftex.texi
@@ -1,25 +1,49 @@
1\input texinfo @c -*-texinfo-*- 1\input texinfo @c -*-texinfo-*-
2@c %**start of header 2@c %**start of header
3@setfilename ../info/reftex 3@setfilename reftex
4@settitle RefTeX User Manual 4@settitle RefTeX User Manual
5@dircategory Emacs
6@direntry
7* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations.
8@end direntry
5@synindex ky cp 9@synindex ky cp
6@syncodeindex vr cp 10@syncodeindex vr cp
7@syncodeindex fn cp 11@syncodeindex fn cp
8@set VERSION 4.19 12
9@set EDITION 4.19 13@c Version and Contact Info
10@set DATE August 2002 14@set VERSION 4.24
15@set EDITION 4.24
16@set DATE August 2004
17@set AUCTEXSITE @uref{http://www.nongnu.org/auctex/,AUCTeX distribution site}
18@set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/,maintainers webpage}
19@set MAINTAINER Carsten Dominik
20@set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
21@set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
22@set XEMACSFTP @uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site}.
11@c %**end of header 23@c %**end of header
24@finalout
25
26@c Macro definitions
27
28@c Subheadings inside a table. Need a difference between info and the rest.
29@macro tablesubheading{text}
30@ifinfo
31@subsubheading \text\
32@end ifinfo
33@ifnotinfo
34@item @b{\text\}
35@end ifnotinfo
36@end macro
12 37
13@copying 38@ifinfo
14This file documents @b{Ref@TeX{}}, a package to do labels, references, 39This file documents @b{Ref@TeX{}}, a package to do labels, references,
15citations and indices for LaTeX documents with Emacs. 40citations and indices for LaTeX documents with Emacs.
16 41
17This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for 42This is edition @value{EDITION} of the @b{Ref@TeX{}} User Manual for
18@b{Ref@TeX{}} @value{VERSION}. 43@b{Ref@TeX{}} @value{VERSION}
19 44
20Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 45Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
21 46
22@quotation
23Permission is granted to copy, distribute and/or modify this document 47Permission is granted to copy, distribute and/or modify this document
24under the terms of the GNU Free Documentation License, Version 1.1 or 48under the terms of the GNU Free Documentation License, Version 1.1 or
25any later version published by the Free Software Foundation; with no 49any later version published by the Free Software Foundation; with no
@@ -36,27 +60,7 @@ This document is part of a collection distributed under the GNU Free
36Documentation License. If you want to distribute this document 60Documentation License. If you want to distribute this document
37separately from the collection, you can do so by adding a copy of the 61separately from the collection, you can do so by adding a copy of the
38license to the document, as described in section 6 of the license. 62license to the document, as described in section 6 of the license.
39@end quotation
40@end copying
41
42@dircategory Emacs
43@direntry
44* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations.
45@end direntry
46
47@finalout
48
49@c Macro definitions
50
51@c Subheadings inside a table. Need a difference between info and the rest.
52@macro tablesubheading{text}
53@ifinfo
54@subsubheading \text\
55@end ifinfo 63@end ifinfo
56@ifnotinfo
57@item @b{\text\}
58@end ifnotinfo
59@end macro
60 64
61@titlepage 65@titlepage
62@title Ref@TeX{} User Manual 66@title Ref@TeX{} User Manual
@@ -65,21 +69,44 @@ license to the document, as described in section 6 of the license.
65 69
66@author by Carsten Dominik 70@author by Carsten Dominik
67@page 71@page
68@vskip 0pt plus 1filll 72Copyright @copyright{} 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
69@insertcopying 73
74@sp 2
75This is edition @value{EDITION} of the @cite{Ref@TeX{} User Manual} for
76@b{Ref@TeX{}} version @value{VERSION}, @value{DATE}.
77
78@sp 2
79
80Permission is granted to copy, distribute and/or modify this document
81under the terms of the GNU Free Documentation License, Version 1.1 or
82any later version published by the Free Software Foundation; with no
83Invariant Sections, with the Front-Cover texts being ``A GNU
84Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
85license is included in the section entitled ``GNU Free Documentation
86License'' in the Emacs manual.
87
88(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
89this GNU Manual, like GNU software. Copies published by the Free
90Software Foundation raise funds for GNU development.''
91
92This document is part of a collection distributed under the GNU Free
93Documentation License. If you want to distribute this document
94separately from the collection, you can do so by adding a copy of the
95license to the document, as described in section 6 of the license.
70@end titlepage 96@end titlepage
97@page
71 98
72@ifnottex 99@ifnottex
73@node Top,,,(dir) 100@node Top,,,(dir)
74 101
75@b{Ref@TeX{}} is a package for managing Labels, References, 102@b{Ref@TeX{}} is a package for managing Labels, References,
76Citations and index entries with GNU Emacs.@refill 103Citations and index entries with GNU Emacs.
77 104
78Don't be discouraged by the size of this manual, which covers 105Don't be discouraged by the size of this manual, which covers
79@b{Ref@TeX{}} in great depth. All you need to know to use 106@b{Ref@TeX{}} in great depth. All you need to know to use
80@b{Ref@TeX{}} can be summarized on two pages (@pxref{RefTeX in a 107@b{Ref@TeX{}} can be summarized on two pages (@pxref{RefTeX in a
81Nutshell}). You can go back later to other parts of this document when 108Nutshell}). You can go back later to other parts of this document when
82needed.@refill 109needed.
83 110
84@menu 111@menu
85* Introduction:: Quick-Start information. 112* Introduction:: Quick-Start information.
@@ -116,7 +143,7 @@ Introduction
116 143
117* Installation:: How to install and activate RefTeX. 144* Installation:: How to install and activate RefTeX.
118* RefTeX in a Nutshell:: A brief summary and quick guide. 145* RefTeX in a Nutshell:: A brief summary and quick guide.
119 146
120Labels and References 147Labels and References
121 148
122* Creating Labels:: 149* Creating Labels::
@@ -145,6 +172,7 @@ Citations
145* Citation Info:: View the corresponding database entry. 172* Citation Info:: View the corresponding database entry.
146* Chapterbib and Bibunits:: Multiple bibliographies in a Document. 173* Chapterbib and Bibunits:: Multiple bibliographies in a Document.
147* Citations Outside LaTeX:: How to make citations in Emails etc. 174* Citations Outside LaTeX:: How to make citations in Emails etc.
175* BibTeX Database Subsets:: Extract parts of a big database.
148 176
149Index Support 177Index Support
150 178
@@ -196,7 +224,7 @@ and @code{\index}. Using these macros usually requires looking up
196different parts of the document and searching through BibTeX database 224different parts of the document and searching through BibTeX database
197files. @b{Ref@TeX{}} automates these time--consuming tasks almost 225files. @b{Ref@TeX{}} automates these time--consuming tasks almost
198entirely. It also provides functions to display the structure of a 226entirely. It also provides functions to display the structure of a
199document and to move around in this structure quickly.@refill 227document and to move around in this structure quickly.
200 228
201@iftex 229@iftex
202Don't be discouraged by the size of this manual, which covers @b{Ref@TeX{}} 230Don't be discouraged by the size of this manual, which covers @b{Ref@TeX{}}
@@ -217,17 +245,15 @@ reports or suggestions.
217@section Installation 245@section Installation
218@cindex Installation 246@cindex Installation
219 247
220@b{Ref@TeX{}} is bundled and pre--installed with Emacs since version 20.2. 248@b{Ref@TeX{}} is bundled and pre--installed with Emacs since version
221It was also bundled and pre--installed with XEmacs 19.16--20.x. XEmacs 24920.2. It was also bundled and pre--installed with XEmacs 19.16--20.x.
22221.x users want to install the corresponding plug-in package which is 250XEmacs 21.x users want to install the corresponding plug-in package
223available from the 251which is available from the @value{XEMACSFTP}. See the XEmacs 21.x
224@uref{ftp://ftp.xemacs.org/pub/xemacs/packages/,XEmacs ftp site}. See 252documentation on package installation for details.
225the XEmacs 21.x documentation on package installation for
226details.@refill
227 253
228Users of earlier Emacs distributions (including Emacs 19) can get a copy 254Users of earlier Emacs distributions (including Emacs 19) can get a copy
229of the @b{Ref@TeX{}} distribution from the maintainers web-page. 255of the @b{Ref@TeX{}} distribution from the maintainers web-page.
230@xref{Imprint}, for more information.@refill 256@xref{Imprint}, for more information.
231 257
232@section Environment 258@section Environment
233@cindex Finding files 259@cindex Finding files
@@ -254,7 +280,7 @@ read @ref{Finding Files}.
254@vindex latex-mode-hook 280@vindex latex-mode-hook
255To turn @b{Ref@TeX{}} Mode on and off in a particular buffer, use 281To turn @b{Ref@TeX{}} Mode on and off in a particular buffer, use
256@kbd{M-x reftex-mode}. To turn on @b{Ref@TeX{}} Mode for all LaTeX 282@kbd{M-x reftex-mode}. To turn on @b{Ref@TeX{}} Mode for all LaTeX
257files, add the following lines to your @file{.emacs} file:@refill 283files, add the following lines to your @file{.emacs} file:
258 284
259@example 285@example
260(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode 286(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
@@ -275,7 +301,7 @@ files, add the following lines to your @file{.emacs} file:@refill
275a table of contents of the document. This buffer can display sections, 301a table of contents of the document. This buffer can display sections,
276labels and index entries defined in the document. From the buffer, you 302labels and index entries defined in the document. From the buffer, you
277can jump quickly to every part of your document. Press @kbd{?} to get 303can jump quickly to every part of your document. Press @kbd{?} to get
278help.@refill 304help.
279 305
280@item 306@item
281@b{Labels and References}@* @b{Ref@TeX{}} helps to create unique labels 307@b{Labels and References}@* @b{Ref@TeX{}} helps to create unique labels
@@ -283,11 +309,11 @@ and to find the correct key for references quickly. It distinguishes
283labels for different environments, knows about all standard 309labels for different environments, knows about all standard
284environments (and many others), and can be configured to recognize any 310environments (and many others), and can be configured to recognize any
285additional labeled environments you have defined yourself (variable 311additional labeled environments you have defined yourself (variable
286@code{reftex-label-alist}).@refill 312@code{reftex-label-alist}).
287 313
288@itemize @bullet 314@itemize @bullet
289@item 315@item
290@b{Creating Labels}@* 316@b{Creating Labels}@*
291Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point. 317Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point.
292@b{Ref@TeX{}} will either 318@b{Ref@TeX{}} will either
293@itemize @minus 319@itemize @minus
@@ -295,20 +321,20 @@ Type @kbd{C-c (} (@code{reftex-label}) to insert a label at point.
295derive a label from context (default for section labels) 321derive a label from context (default for section labels)
296@item 322@item
297prompt for a label string (default for figures and tables) or 323prompt for a label string (default for figures and tables) or
298@item 324@item
299insert a simple label made of a prefix and a number (all other 325insert a simple label made of a prefix and a number (all other
300environments)@refill 326environments)
301@end itemize 327@end itemize
302@noindent 328@noindent
303Which labels are created how is configurable with the variable 329Which labels are created how is configurable with the variable
304@code{reftex-insert-label-flags}.@refill 330@code{reftex-insert-label-flags}.
305 331
306@item 332@item
307@b{Referencing Labels}@* To make a reference, type @kbd{C-c )} 333@b{Referencing Labels}@* To make a reference, type @kbd{C-c )}
308(@code{reftex-reference}). This shows an outline of the document with 334(@code{reftex-reference}). This shows an outline of the document with
309all labels of a certain type (figure, equation,...) and some label 335all labels of a certain type (figure, equation,...) and some label
310context. Selecting a label inserts a @code{\ref@{@var{label}@}} macro 336context. Selecting a label inserts a @code{\ref@{@var{label}@}} macro
311into the original buffer.@refill 337into the original buffer.
312@end itemize 338@end itemize
313 339
314@item 340@item
@@ -319,7 +345,7 @@ specified in the @code{\bibliography} command) and pull out a list of
319matches for you to choose from. The list is @emph{formatted} and 345matches for you to choose from. The list is @emph{formatted} and
320sorted. The selected article is referenced as @samp{\cite@{@var{key}@}} 346sorted. The selected article is referenced as @samp{\cite@{@var{key}@}}
321(see the variable @code{reftex-cite-format} if you want to insert 347(see the variable @code{reftex-cite-format} if you want to insert
322different macros).@refill 348different macros).
323 349
324@item 350@item
325@b{Index Support}@* 351@b{Index Support}@*
@@ -328,7 +354,7 @@ entries into an alphabetically sorted @file{*Index*} buffer which you
328can use to check and edit the entries. @b{Ref@TeX{}} knows about the 354can use to check and edit the entries. @b{Ref@TeX{}} knows about the
329standard index macros and can be configured to recognize any additional 355standard index macros and can be configured to recognize any additional
330macros you have defined (@code{reftex-index-macros}). Multiple indices 356macros you have defined (@code{reftex-index-macros}). Multiple indices
331are supported.@refill 357are supported.
332 358
333@itemize @bullet 359@itemize @bullet
334@item 360@item
@@ -337,20 +363,20 @@ To index the current selection or the word at point, type @kbd{C-c /}
337(@code{reftex-index-selection-or-word}). The default macro 363(@code{reftex-index-selection-or-word}). The default macro
338@code{reftex-index-default-macro} will be used. For a more complex entry 364@code{reftex-index-default-macro} will be used. For a more complex entry
339type @kbd{C-c <} (@code{reftex-index}), select any of the index macros 365type @kbd{C-c <} (@code{reftex-index}), select any of the index macros
340and enter the arguments with completion.@refill 366and enter the arguments with completion.
341 367
342@item 368@item
343@b{The Index Phrases File (Delayed Indexing)}@* 369@b{The Index Phrases File (Delayed Indexing)}@*
344Type @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) to add 370Type @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) to add
345the current word or selection to a special @emph{index phrase file}. 371the current word or selection to a special @emph{index phrase file}.
346@b{Ref@TeX{}} can later search the document for occurrences of these 372@b{Ref@TeX{}} can later search the document for occurrences of these
347phrases and let you interactively index the matches.@refill 373phrases and let you interactively index the matches.
348 374
349@item 375@item
350@b{Displaying and Editing the Index}@* 376@b{Displaying and Editing the Index}@*
351To display the compiled index in a special buffer, type @kbd{C-c >} 377To display the compiled index in a special buffer, type @kbd{C-c >}
352(@code{reftex-display-index}). From that buffer you can check and edit 378(@code{reftex-display-index}). From that buffer you can check and edit
353all entries.@refill 379all entries.
354@end itemize 380@end itemize
355 381
356@page 382@page
@@ -360,10 +386,10 @@ When point is on the @var{key} argument of a cross--referencing macro
360@code{\index}, and variations) or inside a BibTeX database entry, you 386@code{\index}, and variations) or inside a BibTeX database entry, you
361can press @kbd{C-c &} (@code{reftex-view-crossref}) to display 387can press @kbd{C-c &} (@code{reftex-view-crossref}) to display
362corresponding locations in the document and associated BibTeX database 388corresponding locations in the document and associated BibTeX database
363files.@refill @* 389files. @*
364When the enclosing macro is @code{\cite} or @code{\ref} and no other 390When the enclosing macro is @code{\cite} or @code{\ref} and no other
365message occupies the echo area, information about the citation or label 391message occupies the echo area, information about the citation or label
366will automatically be displayed in the echo area.@refill 392will automatically be displayed in the echo area.
367 393
368@item 394@item
369@b{Multifile Documents}@* 395@b{Multifile Documents}@*
@@ -371,7 +397,7 @@ Multifile Documents are fully supported. The included files must have a
371file variable @code{TeX-master} or @code{tex-main-file} pointing to the 397file variable @code{TeX-master} or @code{tex-main-file} pointing to the
372master file. @b{Ref@TeX{}} provides cross-referencing information from 398master file. @b{Ref@TeX{}} provides cross-referencing information from
373all parts of the document, and across document borders 399all parts of the document, and across document borders
374(@file{xr.sty}).@refill 400(@file{xr.sty}).
375 401
376@item 402@item
377@b{Document Parsing}@* @b{Ref@TeX{}} needs to parse the document in 403@b{Document Parsing}@* @b{Ref@TeX{}} needs to parse the document in
@@ -380,14 +406,14 @@ once and updates its list internally when @code{reftex-label} and
380@code{reftex-index} are used. To enforce reparsing, call any of the 406@code{reftex-index} are used. To enforce reparsing, call any of the
381commands described above with a raw @kbd{C-u} prefix, or press the 407commands described above with a raw @kbd{C-u} prefix, or press the
382@kbd{r} key in the label selection buffer, the table of contents 408@kbd{r} key in the label selection buffer, the table of contents
383buffer, or the index buffer.@refill 409buffer, or the index buffer.
384 410
385@item 411@item
386@b{AUCTeX} @* If your major LaTeX mode is AUCTeX, @b{Ref@TeX{}} can 412@b{AUCTeX} @* If your major LaTeX mode is AUCTeX, @b{Ref@TeX{}} can
387cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). AUCTeX 413cooperate with it (see variable @code{reftex-plug-into-AUCTeX}). AUCTeX
388contains style files which trigger appropriate settings in 414contains style files which trigger appropriate settings in
389@b{Ref@TeX{}}, so that for many of the popular LaTeX packages no 415@b{Ref@TeX{}}, so that for many of the popular LaTeX packages no
390additional customizations will be necessary.@refill 416additional customizations will be necessary.
391 417
392@item 418@item
393@b{Useful Settings}@* 419@b{Useful Settings}@*
@@ -397,7 +423,7 @@ To integrate RefTeX with AUCTeX, use
397@end lisp 423@end lisp
398 424
399To make your own LaTeX macro definitions known to @b{Ref@TeX{}}, 425To make your own LaTeX macro definitions known to @b{Ref@TeX{}},
400customize the variables@refill 426customize the variables
401@example 427@example
402@code{reftex-label-alist} @r{(for label macros/environments)} 428@code{reftex-label-alist} @r{(for label macros/environments)}
403@code{reftex-section-levels} @r{(for sectioning commands)} 429@code{reftex-section-levels} @r{(for sectioning commands)}
@@ -407,7 +433,7 @@ customize the variables@refill
407@end example 433@end example
408If you have a large number of macros defined, you may want to write 434If you have a large number of macros defined, you may want to write
409an AUCTeX style file to support them with both AUCTeX and 435an AUCTeX style file to support them with both AUCTeX and
410@b{Ref@TeX{}}.@refill 436@b{Ref@TeX{}}.
411 437
412@item @b{Where Next?}@* Go ahead and use @b{Ref@TeX{}}. Use its menus 438@item @b{Where Next?}@* Go ahead and use @b{Ref@TeX{}}. Use its menus
413until you have picked up the key bindings. For an overview of what you 439until you have picked up the key bindings. For an overview of what you
@@ -415,12 +441,13 @@ can do in each of the different special buffers, press @kbd{?}. Read
415the manual if you get stuck, of if you are curious what else might be 441the manual if you get stuck, of if you are curious what else might be
416available. The first part of the manual explains in 442available. The first part of the manual explains in
417a tutorial way how to use and customize @b{Ref@TeX{}}. The second 443a tutorial way how to use and customize @b{Ref@TeX{}}. The second
418part is a command and variable reference.@refill 444part is a command and variable reference.
419@end enumerate 445@end enumerate
420 446
421@node Table of Contents, Labels and References, Introduction, Top 447@node Table of Contents, Labels and References, Introduction, Top
422@chapter Table of Contents 448@chapter Table of Contents
423@cindex @file{*toc*} buffer 449@cindex @file{*toc*} buffer
450@cindex Structure editing
424@cindex Table of contents buffer 451@cindex Table of contents buffer
425@findex reftex-toc 452@findex reftex-toc
426@kindex C-c = 453@kindex C-c =
@@ -429,16 +456,16 @@ Pressing the keys @kbd{C-c =} pops up a buffer showing the table of
429contents of the document. By default, this @file{*toc*} buffer shows 456contents of the document. By default, this @file{*toc*} buffer shows
430only the sections of a document. Using the @kbd{l} and @kbd{i} keys you 457only the sections of a document. Using the @kbd{l} and @kbd{i} keys you
431can display all labels and index entries defined in the document as 458can display all labels and index entries defined in the document as
432well.@refill 459well.
433 460
434With the cursor in any of the lines denoting a location in the 461With the cursor in any of the lines denoting a location in the
435document, simple key strokes will display the corresponding part in 462document, simple key strokes will display the corresponding part in
436another window, jump to that location, or perform other actions.@refill 463another window, jump to that location, or perform other actions.
437 464
438@kindex ? 465@kindex ?
439Here is a list of special commands in the @file{*toc*} buffer. A 466Here is a list of special commands in the @file{*toc*} buffer. A
440summary of this information is always available by pressing 467summary of this information is always available by pressing
441@kbd{?}.@refill 468@kbd{?}.
442 469
443@table @kbd 470@table @kbd
444 471
@@ -458,19 +485,19 @@ Goto previous entry in the table of context.
458 485
459@item C-c C-n 486@item C-c C-n
460Goto next section heading. Useful when many labels and index entries 487Goto next section heading. Useful when many labels and index entries
461separate section headings.@refill 488separate section headings.
462 489
463@item C-c C-p 490@item C-c C-p
464Goto previous section heading. 491Goto previous section heading.
465 492
466@item N z 493@item N z
467Jump to section N, using the prefix arg. For example, @kbd{3 z} jumps 494Jump to section N, using the prefix arg. For example, @kbd{3 z} jumps
468to section 3.@refill 495to section 3.
469 496
470@tablesubheading{Access to document locations} 497@tablesubheading{Access to document locations}
471@item @key{SPC} 498@item @key{SPC}
472Show the corresponding location in another window. This command does 499Show the corresponding location in another window. This command does
473@emph{not} select that other window.@refill 500@emph{not} select that other window.
474 501
475@item @key{TAB} 502@item @key{TAB}
476Goto the location in another window. 503Goto the location in another window.
@@ -478,13 +505,13 @@ Goto the location in another window.
478@item @key{RET} 505@item @key{RET}
479Go to the location and hide the @file{*toc*} buffer. This will restore 506Go to the location and hide the @file{*toc*} buffer. This will restore
480the window configuration before @code{reftex-toc} (@kbd{C-c =}) was 507the window configuration before @code{reftex-toc} (@kbd{C-c =}) was
481called.@refill 508called.
482 509
483@item mouse-2 510@item mouse-2
484@vindex reftex-highlight-selection 511@vindex reftex-highlight-selection
485Clicking with mouse button 2 on a line has the same effect as @key{RET}. 512Clicking with mouse button 2 on a line has the same effect as @key{RET}.
486See also variable @code{reftex-highlight-selection}, @ref{Options 513See also variable @code{reftex-highlight-selection}, @ref{Options
487(Fontification)}.@refill 514(Fontification)}.
488 515
489@item f 516@item f
490@vindex reftex-toc-follow-mode 517@vindex reftex-toc-follow-mode
@@ -496,25 +523,51 @@ cursor motion. The default for this flag can be set with the variable
496@code{reftex-toc-follow-mode}. Note that only context in files already 523@code{reftex-toc-follow-mode}. Note that only context in files already
497visited is shown. @b{Ref@TeX{}} will not visit a file just for follow 524visited is shown. @b{Ref@TeX{}} will not visit a file just for follow
498mode. See, however, the variable 525mode. See, however, the variable
499@code{reftex-revisit-to-follow}.@refill 526@code{reftex-revisit-to-follow}.
500 527
501@item . 528@item .
502Show calling point in another window. This is the point from where 529Show calling point in another window. This is the point from where
503@code{reftex-toc} was last called. 530@code{reftex-toc} was last called.
504 531
505@page 532@page
533@tablesubheading{Promotion and Demotion}
534
535@item <
536Promote the current section. This will convert @code{\section} to
537@code{\chapter}, @code{\subsection} to @code{\section} etc. If there is
538an active region, all sections in the region will be promoted, including
539the one at point. To avoid mistakes, @b{Ref@TeX{}} requires a fresh
540document scan before executing this command - if necessary, it will
541automatically do this scan and ask the user to repeat the promotion
542command.
543
544@item >
545Demote the current section. This is the opposite of promotion. It will
546convert @code{\chapter} to @code{\section} etc. If there is an active
547region, all sections in the region will be demoted, including the one at
548point.
549
550@item M-%
551Rename the label at point. While generally not recommended, this can be
552useful when a package like @file{fancyref} is used where the label
553prefix determines the wording of a reference. After a
554promotion/demotion it may be necessary to change a few labels from
555@samp{sec:xyz} to @samp{cha:xyz} or vice versa. This command can be
556used to do this - it launches a query replace to rename the definition
557and all references of a label.
558
506@tablesubheading{Exiting} 559@tablesubheading{Exiting}
507@item q 560@item q
508Hide the @file{*toc*} buffer, return to the position where 561Hide the @file{*toc*} buffer, return to the position where
509@code{reftex-toc} was last called.@refill 562@code{reftex-toc} was last called.
510 563
511@item k 564@item k
512Kill the @file{*toc*} buffer, return to the position where 565Kill the @file{*toc*} buffer, return to the position where
513@code{reftex-toc} was last called.@refill 566@code{reftex-toc} was last called.
514 567
515@item C-c > 568@item C-c >
516Switch to the @file{*Index*} buffer of this document. With prefix 569Switch to the @file{*Index*} buffer of this document. With prefix
517@samp{2}, restrict the index to the section at point in the @file{*toc*} 570@samp{2}, restrict the index to the section at point in the @file{*toc*}
518buffer. 571buffer.
519 572
520@tablesubheading{Controlling what gets displayed} 573@tablesubheading{Controlling what gets displayed}
@@ -527,13 +580,13 @@ arg (e.g @kbd{3 t}), ignore all toc entries with level greater than
527@var{arg} (3 in this case). Chapters are level 1, sections are level 2. 580@var{arg} (3 in this case). Chapters are level 1, sections are level 2.
528The mode line @samp{T<>} indicator shows the current value. The default 581The mode line @samp{T<>} indicator shows the current value. The default
529depth can be configured with the variable 582depth can be configured with the variable
530@code{reftex-toc-max-level}.@refill 583@code{reftex-toc-max-level}.
531 584
532@item F 585@item F
533@vindex reftex-toc-include-file-boundaries 586@vindex reftex-toc-include-file-boundaries
534Toggle the display of the file borders of a multifile document in the 587Toggle the display of the file borders of a multifile document in the
535@file{*toc*} buffer. The default for this flag can be set with the 588@file{*toc*} buffer. The default for this flag can be set with the
536variable @code{reftex-toc-include-file-boundaries}.@refill 589variable @code{reftex-toc-include-file-boundaries}.
537 590
538@item l 591@item l
539@vindex reftex-toc-include-labels 592@vindex reftex-toc-include-labels
@@ -542,7 +595,7 @@ for this flag can be set with the variable
542@code{reftex-toc-include-labels}. When called with a prefix argument, 595@code{reftex-toc-include-labels}. When called with a prefix argument,
543@b{Ref@TeX{}} will prompt for a label type and include only labels of 596@b{Ref@TeX{}} will prompt for a label type and include only labels of
544the selected type in the @file{*toc*} buffer. The mode line @samp{L<>} 597the selected type in the @file{*toc*} buffer. The mode line @samp{L<>}
545indicator shows which labels are included.@refill 598indicator shows which labels are included.
546 599
547@item i 600@item i
548@vindex reftex-toc-include-index-entries 601@vindex reftex-toc-include-index-entries
@@ -550,48 +603,58 @@ Toggle the display of index entries in the @file{*toc*} buffer. The
550default for this flag can be set with the variable 603default for this flag can be set with the variable
551@code{reftex-toc-include-index-entries}. When called with a prefix 604@code{reftex-toc-include-index-entries}. When called with a prefix
552argument, @b{Ref@TeX{}} will prompt for a specific index and include 605argument, @b{Ref@TeX{}} will prompt for a specific index and include
553only entries in the selected index in the @file{*toc*} buffer. The mode 606only entries in the selected index in the @file{*toc*} buffer. The mode
554line @samp{I<>} indicator shows which index is used.@refill 607line @samp{I<>} indicator shows which index is used.
555 608
556@item c 609@item c
557@vindex reftex-toc-include-context 610@vindex reftex-toc-include-context
558Toggle the display of label and index context in the @file{*toc*} 611Toggle the display of label and index context in the @file{*toc*}
559buffer. The default for this flag can be set with the variable 612buffer. The default for this flag can be set with the variable
560@code{reftex-toc-include-context}.@refill 613@code{reftex-toc-include-context}.
561 614
562@tablesubheading{Updating the buffer} 615@tablesubheading{Updating the buffer}
563 616
564@item g 617@item g
565Rebuild the @file{*toc*} buffer. This does @emph{not} rescan the 618Rebuild the @file{*toc*} buffer. This does @emph{not} rescan the
566document.@refill 619document.
567 620
568@item r 621@item r
569@vindex reftex-enable-partial-scans 622@vindex reftex-enable-partial-scans
570Reparse the LaTeX document and rebuild the @file{*toc*} buffer. When 623Reparse the LaTeX document and rebuild the @file{*toc*} buffer. When
571@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this 624@code{reftex-enable-partial-scans} is non-nil, rescan only the file this
572location is defined in, not the entire document.@refill 625location is defined in, not the entire document.
573 626
574@item C-u r 627@item C-u r
575Reparse the @emph{entire} LaTeX document and rebuild the @file{*toc*} 628Reparse the @emph{entire} LaTeX document and rebuild the @file{*toc*}
576buffer.@refill 629buffer.
577 630
578@item x 631@item x
579Switch to the @file{*toc*} buffer of an external document. When the 632Switch to the @file{*toc*} buffer of an external document. When the
580current document is using the @code{xr} package (@pxref{xr (LaTeX 633current document is using the @code{xr} package (@pxref{xr (LaTeX
581package)}), @b{Ref@TeX{}} will switch to one of the external 634package)}), @b{Ref@TeX{}} will switch to one of the external
582documents.@refill 635documents.
636
637
638@tablesubheading{Automatic recentering}
639
640@item d
641Toggle the display of a dedicated frame displaying just the @file{*toc*}
642buffer. Follow mode and visiting locations will not work that frame,
643but automatic recentering will make this frame always show your current
644editing location in the document (see below).
583 645
584@item a 646@item a
585Toggle the automatic recentering of the @file{*toc*} buffer. When this 647Toggle the automatic recentering of the @file{*toc*} buffer. When this
586option is on, moving around in the document will cause the @file{*toc*} 648option is on, moving around in the document will cause the @file{*toc*}
587to always highlight the current section. This can be enabled by default 649to always highlight the current section. By default, this option is
588with the variable @code{reftex-auto-recenter-toc}. 650active while the dedicated @file{*TOC*} frame exists. See also the
651variable @code{reftex-auto-recenter-toc}.
589 652
590@end table 653@end table
591 654
592@vindex reftex-toc-map 655@vindex reftex-toc-map
593In order to define additional commands for the @file{*toc*} buffer, the 656In order to define additional commands for the @file{*toc*} buffer, the
594keymap @code{reftex-toc-map} may be used.@refill 657keymap @code{reftex-toc-map} may be used.
595 658
596@findex reftex-toc-recenter 659@findex reftex-toc-recenter
597@vindex reftex-auto-recenter-toc 660@vindex reftex-auto-recenter-toc
@@ -605,13 +668,15 @@ section from which @code{reftex-toc} was called will be highlighted.
605The command @kbd{C-c -} (@code{reftex-toc-recenter}) will only redisplay 668The command @kbd{C-c -} (@code{reftex-toc-recenter}) will only redisplay
606the @file{*toc*} buffer and highlight the correct line without actually 669the @file{*toc*} buffer and highlight the correct line without actually
607selecting the @file{*toc*} window. This can be useful to quickly find 670selecting the @file{*toc*} window. This can be useful to quickly find
608out where in the document you currently are. If you want the TOC buffer 671out where in the document you currently are. You can also automate this
609to show the current section automatically whenever you stop typing, try 672by asking RefTeX to keep track of your current editing position in the
673TOC. The TOC window will then be updated whenever you stop typing for
674more than @code{reftex-idle-time} seconds. By default this works only
675with the dedicated @file{*TOC*} frame. But you can also force automatic
676recentering of the TOC window on the current frame with
610@lisp 677@lisp
611(setq reftex-auto-recenter-toc t) 678(setq reftex-auto-recenter-toc t)
612@end lisp 679@end lisp
613When this is turned on, the toc buffer will be recentered whenever Emacs
614is idle for more than @code{reftex-idle-time} seconds.
615 680
616 681
617@cindex Sectioning commands 682@cindex Sectioning commands
@@ -641,17 +706,17 @@ document. When writing a document, any part of it can be marked with a
641label, like @samp{\label@{mark@}}. LaTeX records the current value of a 706label, like @samp{\label@{mark@}}. LaTeX records the current value of a
642certain counter when a label is defined. Later references to this label 707certain counter when a label is defined. Later references to this label
643(like @samp{\ref@{mark@}}) will produce the recorded value of the 708(like @samp{\ref@{mark@}}) will produce the recorded value of the
644counter.@refill 709counter.
645 710
646Labels can be used to mark sections, figures, tables, equations, 711Labels can be used to mark sections, figures, tables, equations,
647footnotes, items in enumerate lists etc. LaTeX is context sensitive in 712footnotes, items in enumerate lists etc. LaTeX is context sensitive in
648doing this: A label defined in a figure environment automatically 713doing this: A label defined in a figure environment automatically
649records the figure counter, not the section counter.@refill 714records the figure counter, not the section counter.
650 715
651Several different environments can share a common counter and therefore 716Several different environments can share a common counter and therefore
652a common label category. E.g. labels in both @code{equation} and 717a common label category. E.g. labels in both @code{equation} and
653@code{eqnarray} environments record the value of the same counter - the 718@code{eqnarray} environments record the value of the same counter - the
654equation counter.@refill 719equation counter.
655 720
656@menu 721@menu
657* Creating Labels:: 722* Creating Labels::
@@ -677,7 +742,7 @@ In order to create a label in a LaTeX document, press @kbd{C-c (}
677and will figure out the environment it currently is in and adapt the 742and will figure out the environment it currently is in and adapt the
678label to that environment. A label usually consists of a short prefix 743label to that environment. A label usually consists of a short prefix
679indicating the type of the label and a unique mark. @b{Ref@TeX{}} has 744indicating the type of the label and a unique mark. @b{Ref@TeX{}} has
6803 different modes to create this mark.@refill 7453 different modes to create this mark.
681 746
682@enumerate 747@enumerate
683@item 748@item
@@ -698,7 +763,7 @@ change things: @code{reftex-translate-to-ascii-function},
698where the section heading is used to construct a label. In fact, 763where the section heading is used to construct a label. In fact,
699@b{Ref@TeX{}}'s default settings use this method only for section 764@b{Ref@TeX{}}'s default settings use this method only for section
700labels. You will be asked to confirm the derived label, or edit 765labels. You will be asked to confirm the derived label, or edit
701it.@refill 766it.
702 767
703@item 768@item
704We may also use a simple unique number to identify a label. This is 769We may also use a simple unique number to identify a label. This is
@@ -709,7 +774,7 @@ tends to write documents with many equations and finds it impossible
709to come up with good names for each of them. These simple labels are 774to come up with good names for each of them. These simple labels are
710inserted without query, and are therefore very fast. Good descriptive 775inserted without query, and are therefore very fast. Good descriptive
711names are not really necessary as @b{Ref@TeX{}} will provide context to 776names are not really necessary as @b{Ref@TeX{}} will provide context to
712reference a label (@pxref{Referencing Labels}).@refill 777reference a label (@pxref{Referencing Labels}).
713 778
714@item 779@item
715The third method is to ask the user for a label. This is most 780The third method is to ask the user for a label. This is most
@@ -719,13 +784,13 @@ tables. Of course, one can enter the label directly by typing the full
719@samp{\label@{mark@}}. The advantage of using @code{reftex-label} 784@samp{\label@{mark@}}. The advantage of using @code{reftex-label}
720anyway is that @b{Ref@TeX{}} will know that a new label has been defined. 785anyway is that @b{Ref@TeX{}} will know that a new label has been defined.
721It will then not be necessary to rescan the document in order to access 786It will then not be necessary to rescan the document in order to access
722this label later.@refill 787this label later.
723@end enumerate 788@end enumerate
724 789
725@vindex reftex-insert-label-flags 790@vindex reftex-insert-label-flags
726If you want to change the way certain labels are created, check out the 791If you want to change the way certain labels are created, check out the
727variable @code{reftex-insert-label-flags} (@pxref{Options (Creating 792variable @code{reftex-insert-label-flags} (@pxref{Options (Creating
728Labels)}).@refill 793Labels)}).
729 794
730If you are using AUCTeX to write your LaTeX documents, you can 795If you are using AUCTeX to write your LaTeX documents, you can
731set it up to delegate the creation of labels to 796set it up to delegate the creation of labels to
@@ -741,16 +806,25 @@ set it up to delegate the creation of labels to
741@kindex C-c ) 806@kindex C-c )
742@findex reftex-reference 807@findex reftex-reference
743 808
809@vindex reftex-trust-label-prefix
810@b{Ref@TeX{}} scans the document in order to find all labels. To make
811referencing labels easier, it assigns to each label a category, the
812@emph{label type} (for example section, table, figure, equation, etc.).
813In order to determine the label type, RefTeX parses around each label
814to see in what kind of environments it is located. You can speed up
815the parsing by using type-specific prefixes for labels and configuring
816the variable @code{reftex-trust-label-prefix}.
817
744Referencing Labels is really at the heart of @b{Ref@TeX{}}. Press @kbd{C-c 818Referencing Labels is really at the heart of @b{Ref@TeX{}}. Press @kbd{C-c
745)} in order to reference a label (reftex-reference). This will start a 819)} in order to reference a label (reftex-reference). This will start a
746selection process and finally insert the complete @samp{\ref@{label@}} 820selection process and finally insert the complete @samp{\ref@{label@}}
747into the buffer.@refill 821into the buffer.
748 822
749First, @b{Ref@TeX{}} will determine the label category which is required. 823First, @b{Ref@TeX{}} will determine the label category which is required.
750Often that can be figured out from context. For example, if you 824Often that can be figured out from context. For example, if you
751write @samp{As shown in eq.} and the press @kbd{C-c )}, @b{Ref@TeX{}} knows 825write @samp{As shown in eq.} and the press @kbd{C-c )}, @b{Ref@TeX{}} knows
752that an equation label is going to be referenced. If it cannot figure 826that an equation label is going to be referenced. If it cannot figure
753out what label category is needed, it will query for one.@refill 827out what label category is needed, it will query for one.
754 828
755You will then be presented with a label selection menu. This is a 829You will then be presented with a label selection menu. This is a
756special buffer which contains an outline of the document along with all 830special buffer which contains an outline of the document along with all
@@ -759,7 +833,7 @@ there will be one line of context of the label definition, which is some
759text in the buffer near the label definition. Usually this is 833text in the buffer near the label definition. Usually this is
760sufficient to identify the label. If you are unsure about a certain 834sufficient to identify the label. If you are unsure about a certain
761label, pressing @key{SPC} will show the label definition point in 835label, pressing @key{SPC} will show the label definition point in
762another window.@refill 836another window.
763 837
764In order to reference a label, move to cursor to the correct label and 838In order to reference a label, move to cursor to the correct label and
765press @key{RET}. You can also reference several labels with a single 839press @key{RET}. You can also reference several labels with a single
@@ -769,7 +843,7 @@ key (see below).
769@kindex ? 843@kindex ?
770Here is a list of special commands in the selection buffer. A summary 844Here is a list of special commands in the selection buffer. A summary
771of this information is always available from the selection process by 845of this information is always available from the selection process by
772pressing @kbd{?}.@refill 846pressing @kbd{?}.
773 847
774 848
775 849
@@ -790,7 +864,7 @@ Go to previous label.
790 864
791@item b 865@item b
792Jump back to the position where you last left the selection buffer. 866Jump back to the position where you last left the selection buffer.
793Normally this should get you back to the last referenced label.@refill 867Normally this should get you back to the last referenced label.
794 868
795@item C-c C-n 869@item C-c C-n
796Goto next section heading. 870Goto next section heading.
@@ -799,13 +873,13 @@ Goto next section heading.
799Goto previous section heading. 873Goto previous section heading.
800 874
801@item N z 875@item N z
802Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to 876Jump to section N, using the prefix arg. For example @kbd{3 z} jumps to
803section 3.@refill 877section 3.
804 878
805@tablesubheading{Displaying Context} 879@tablesubheading{Displaying Context}
806@item @key{SPC} 880@item @key{SPC}
807Show the surroundings of the definition of the current label in another 881Show the surroundings of the definition of the current label in another
808window. See also the @kbd{f} key.@refill 882window. See also the @kbd{f} key.
809 883
810@item f 884@item f
811@vindex reftex-revisit-to-follow 885@vindex reftex-revisit-to-follow
@@ -814,23 +888,23 @@ always display the full context of the current label. This is similar
814to pressing @key{SPC} after each cursor motion. Note that only context 888to pressing @key{SPC} after each cursor motion. Note that only context
815in files already visited is shown. @b{RefTeX} will not visit a file 889in files already visited is shown. @b{RefTeX} will not visit a file
816just for follow mode. See, however, the variable 890just for follow mode. See, however, the variable
817@code{reftex-revisit-to-follow}.@refill 891@code{reftex-revisit-to-follow}.
818 892
819@item . 893@item .
820Show insertion point in another window. This is the point from where you 894Show insertion point in another window. This is the point from where you
821called @code{reftex-reference}.@refill 895called @code{reftex-reference}.
822 896
823@tablesubheading{Selecting a label and creating the reference} 897@tablesubheading{Selecting a label and creating the reference}
824@item @key{RET} 898@item @key{RET}
825Insert a reference to the label at point into the buffer from which the 899Insert a reference to the label at point into the buffer from which the
826selection process was started. When entries have been marked, @key{RET} 900selection process was started. When entries have been marked, @key{RET}
827references all marked labels.@refill 901references all marked labels.
828 902
829@item mouse-2 903@item mouse-2
830@vindex reftex-highlight-selection 904@vindex reftex-highlight-selection
831Clicking with mouse button 2 on a label will accept it like @key{RET} 905Clicking with mouse button 2 on a label will accept it like @key{RET}
832would. See also variable @code{reftex-highlight-selection}, @ref{Options 906would. See also variable @code{reftex-highlight-selection}, @ref{Options
833(Misc)}.@refill 907(Misc)}.
834 908
835@vindex reftex-multiref-punctuation 909@vindex reftex-multiref-punctuation
836@item m - + , 910@item m - + ,
@@ -853,11 +927,11 @@ Unmark a marked entry.
853@item a 927@item a
854Accept the marked entries and put all labels as a comma-separated list 928Accept the marked entries and put all labels as a comma-separated list
855into one @emph{single} @code{\ref} macro. Some packages like 929into one @emph{single} @code{\ref} macro. Some packages like
856@file{saferef.sty} support multiple references in this way.@refill 930@file{saferef.sty} support multiple references in this way.
857 931
858@item l 932@item l
859Use the last referenced label(s) again. This is equivalent to moving to 933Use the last referenced label(s) again. This is equivalent to moving to
860that label and pressing @key{RET}.@refill 934that label and pressing @key{RET}.
861 935
862@item @key{TAB} 936@item @key{TAB}
863Enter a label with completion. This may also be a label which does not 937Enter a label with completion. This may also be a label which does not
@@ -871,7 +945,7 @@ Toggle between @code{\ref} and @code{\vref} macro for references. The
871@code{\vref} macro is defined in the @code{varioref} LaTeX package. 945@code{\vref} macro is defined in the @code{varioref} LaTeX package.
872With this key you can force @b{Ref@TeX{}} to insert a @code{\vref} 946With this key you can force @b{Ref@TeX{}} to insert a @code{\vref}
873macro. The current state of this flag is displayed by the @samp{S<>} 947macro. The current state of this flag is displayed by the @samp{S<>}
874indicator in the mode line of the selection buffer.@refill 948indicator in the mode line of the selection buffer.
875 949
876@item V 950@item V
877@cindex @code{fancyref}, LaTeX package 951@cindex @code{fancyref}, LaTeX package
@@ -889,39 +963,39 @@ selection buffer.
889 963
890@item q 964@item q
891Exit the selection process without inserting any reference into the 965Exit the selection process without inserting any reference into the
892buffer.@refill 966buffer.
893 967
894@tablesubheading{Controlling what gets displayed} 968@tablesubheading{Controlling what gets displayed}
895@vindex reftex-label-menu-flags 969@vindex reftex-label-menu-flags
896The defaults for the following flags can be configured with the variable 970The defaults for the following flags can be configured with the variable
897@code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}). 971@code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}).
898 972
899@item c 973@item c
900Toggle the display of the one-line label definition context in the 974Toggle the display of the one-line label definition context in the
901selection buffer.@refill 975selection buffer.
902 976
903@item F 977@item F
904Toggle the display of the file borders of a multifile document in the 978Toggle the display of the file borders of a multifile document in the
905selection buffer.@refill 979selection buffer.
906 980
907@item t 981@item t
908Toggle the display of the table of contents in the selection buffer. 982Toggle the display of the table of contents in the selection buffer.
909With prefix @var{arg}, change the maximum level of toc entries displayed 983With prefix @var{arg}, change the maximum level of toc entries displayed
910to @var{arg}. Chapters are level 1, section are level 2.@refill 984to @var{arg}. Chapters are level 1, section are level 2.
911 985
912@item # 986@item #
913Toggle the display of a label counter in the selection buffer.@refill 987Toggle the display of a label counter in the selection buffer.
914 988
915@item % 989@item %
916Toggle the display of labels hidden in comments in the selection 990Toggle the display of labels hidden in comments in the selection
917buffers. Sometimes, you may have commented out parts of your document. 991buffers. Sometimes, you may have commented out parts of your document.
918If these parts contain label definitions, @b{Ref@TeX{}} can still display 992If these parts contain label definitions, @b{Ref@TeX{}} can still display
919and reference these labels.@refill 993and reference these labels.
920 994
921@tablesubheading{Updating the buffer} 995@tablesubheading{Updating the buffer}
922@item g 996@item g
923Update the menu. This will rebuilt the menu from the internal label 997Update the menu. This will rebuilt the menu from the internal label
924list, but not reparse the document (see @kbd{r}).@refill 998list, but not reparse the document (see @kbd{r}).
925 999
926@item r 1000@item r
927@vindex reftex-enable-partial-scans 1001@vindex reftex-enable-partial-scans
@@ -929,27 +1003,27 @@ Reparse the document to update the information on all labels and rebuild
929the menu. If the variable @code{reftex-enable-partial-scans} is 1003the menu. If the variable @code{reftex-enable-partial-scans} is
930non-@code{nil} and your document is a multifile document, this will 1004non-@code{nil} and your document is a multifile document, this will
931reparse only a part of the document (the file in which the label at 1005reparse only a part of the document (the file in which the label at
932point was defined).@refill 1006point was defined).
933 1007
934@item C-u r 1008@item C-u r
935Reparse the @emph{entire} document. 1009Reparse the @emph{entire} document.
936 1010
937@item s 1011@item s
938Switch the label category. After prompting for another label category, 1012Switch the label category. After prompting for another label category,
939a menu for that category will be shown.@refill 1013a menu for that category will be shown.
940 1014
941@item x 1015@item x
942Reference a label from an external document. With the LaTeX package 1016Reference a label from an external document. With the LaTeX package
943@code{xr} it is possible to reference labels defined in another 1017@code{xr} it is possible to reference labels defined in another
944document. This key will switch to the label menu of an external 1018document. This key will switch to the label menu of an external
945document and let you select a label from there (@pxref{xr (LaTeX 1019document and let you select a label from there (@pxref{xr (LaTeX
946package),,xr}).@refill 1020package),,xr}).
947 1021
948@end table 1022@end table
949 1023
950@vindex reftex-select-label-map 1024@vindex reftex-select-label-map
951In order to define additional commands for the selection process, the 1025In order to define additional commands for the selection process, the
952keymap @code{reftex-select-label-map} may be used.@refill 1026keymap @code{reftex-select-label-map} may be used.
953 1027
954@node Builtin Label Environments, Defining Label Environments, Referencing Labels, Labels and References 1028@node Builtin Label Environments, Defining Label Environments, Referencing Labels, Labels and References
955@section Builtin Label Environments 1029@section Builtin Label Environments
@@ -963,7 +1037,7 @@ keymap @code{reftex-select-label-map} may be used.@refill
963with a label (i.e. which carry their own counters). By default, @b{Ref@TeX{}} 1037with a label (i.e. which carry their own counters). By default, @b{Ref@TeX{}}
964recognizes all labeled environments and macros discussed in @cite{The 1038recognizes all labeled environments and macros discussed in @cite{The
965LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley 1039LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley
9661994.}. These are:@refill 10401994.}. These are:
967 1041
968@itemize @minus 1042@itemize @minus
969@item 1043@item
@@ -979,7 +1053,7 @@ LaTeX Companion by Goossens, Mittelbach & Samarin, Addison-Wesley
979@cindex LaTeX core 1053@cindex LaTeX core
980@code{figure}, @code{figure*}, @code{table}, @code{table*}, @code{equation}, 1054@code{figure}, @code{figure*}, @code{table}, @code{table*}, @code{equation},
981@code{eqnarray}, @code{enumerate}, the @code{\footnote} macro (this is 1055@code{eqnarray}, @code{enumerate}, the @code{\footnote} macro (this is
982the LaTeX core stuff)@refill 1056the LaTeX core stuff)
983@item 1057@item
984@cindex AMS-LaTeX 1058@cindex AMS-LaTeX
985@cindex @code{amsmath}, LaTeX package 1059@cindex @code{amsmath}, LaTeX package
@@ -994,7 +1068,7 @@ the LaTeX core stuff)@refill
994@cindex @code{subequations}, AMS-LaTeX environment 1068@cindex @code{subequations}, AMS-LaTeX environment
995@code{align}, @code{gather}, @code{multline}, @code{flalign}, 1069@code{align}, @code{gather}, @code{multline}, @code{flalign},
996@code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations} 1070@code{alignat}, @code{xalignat}, @code{xxalignat}, @code{subequations}
997(from AMS-LaTeX's @file{amsmath.sty} package)@refill 1071(from AMS-LaTeX's @file{amsmath.sty} package)
998@item 1072@item
999@cindex @code{endnote}, LaTeX package 1073@cindex @code{endnote}, LaTeX package
1000@cindex LaTeX packages, @code{endnote} 1074@cindex LaTeX packages, @code{endnote}
@@ -1039,7 +1113,7 @@ the @code{\endnote} macro (from @file{endnotes.sty})
1039@cindex @code{subfigure}, LaTeX environment 1113@cindex @code{subfigure}, LaTeX environment
1040@cindex @code{subfigure*}, LaTeX environment 1114@cindex @code{subfigure*}, LaTeX environment
1041@code{subfigure}, @code{subfigure*}, the @code{\subfigure} macro 1115@code{subfigure}, @code{subfigure*}, the @code{\subfigure} macro
1042(@file{subfigure.sty})@refill 1116(@file{subfigure.sty})
1043@item 1117@item
1044@cindex @code{supertab}, LaTeX package 1118@cindex @code{supertab}, LaTeX package
1045@cindex LaTeX packages, @code{supertab} 1119@cindex LaTeX packages, @code{supertab}
@@ -1054,7 +1128,7 @@ the @code{\endnote} macro (from @file{endnotes.sty})
1054 1128
1055If you want to use other labeled environments, defined with 1129If you want to use other labeled environments, defined with
1056@code{\newtheorem}, @b{Ref@TeX{}} needs to be configured to recognize 1130@code{\newtheorem}, @b{Ref@TeX{}} needs to be configured to recognize
1057them (@pxref{Defining Label Environments}).@refill 1131them (@pxref{Defining Label Environments}).
1058 1132
1059@node Defining Label Environments, Reference Info, Builtin Label Environments, Labels and References 1133@node Defining Label Environments, Reference Info, Builtin Label Environments, Labels and References
1060@section Defining Label Environments 1134@section Defining Label Environments
@@ -1077,7 +1151,7 @@ Here we will discuss a few examples, in order to make things clearer.
1077It can also be instructive to look at the constant 1151It can also be instructive to look at the constant
1078@code{reftex-label-alist-builtin} which contains the entries for 1152@code{reftex-label-alist-builtin} which contains the entries for
1079all the builtin environments and macros (@pxref{Builtin Label 1153all the builtin environments and macros (@pxref{Builtin Label
1080Environments}).@refill 1154Environments}).
1081 1155
1082@menu 1156@menu
1083* Theorem and Axiom:: Defined with @code{\newenvironment}. 1157* Theorem and Axiom:: Defined with @code{\newenvironment}.
@@ -1096,7 +1170,7 @@ Environments}).@refill
1096@cindex @code{\newtheorem} 1170@cindex @code{\newtheorem}
1097 1171
1098Suppose you are using @code{\newtheorem} in LaTeX in order to define two 1172Suppose you are using @code{\newtheorem} in LaTeX in order to define two
1099new environments, @code{theorem} and @code{axiom}@refill 1173new environments, @code{theorem} and @code{axiom}
1100 1174
1101@example 1175@example
1102\newtheorem@{axiom@}@{Axiom@} 1176\newtheorem@{axiom@}@{Axiom@}
@@ -1128,7 +1202,7 @@ The type indicator characters @code{?a} and @code{?h} are used for
1128prompts when @b{Ref@TeX{}} queries for a label type. @code{?h} 1202prompts when @b{Ref@TeX{}} queries for a label type. @code{?h}
1129was chosen for @code{theorem} since @code{?t} is already taken by 1203was chosen for @code{theorem} since @code{?t} is already taken by
1130@code{table}. Note that also @code{?s}, @code{?f}, @code{?e}, 1204@code{table}. Note that also @code{?s}, @code{?f}, @code{?e},
1131@code{?i}, @code{?n} are already used for standard environments.@refill 1205@code{?i}, @code{?n} are already used for standard environments.
1132 1206
1133@noindent 1207@noindent
1134The labels for Axioms and Theorems will have the prefixes @samp{ax:} and 1208The labels for Axioms and Theorems will have the prefixes @samp{ax:} and
@@ -1149,28 +1223,28 @@ labels for the new environments.
1149 1223
1150@noindent 1224@noindent
1151The @samp{~\ref@{%s@}} is a format string indicating how to insert 1225The @samp{~\ref@{%s@}} is a format string indicating how to insert
1152references to these labels.@refill 1226references to these labels.
1153 1227
1154@noindent 1228@noindent
1155The next item indicates how to grab context of the label definition.@refill 1229The next item indicates how to grab context of the label definition.
1156@itemize @minus 1230@itemize @minus
1157@item 1231@item
1158@code{t} means to get it from a default location (from the beginning of 1232@code{t} means to get it from a default location (from the beginning of
1159a @code{\macro} or after the @code{\begin} statement). @code{t} is 1233a @code{\macro} or after the @code{\begin} statement). @code{t} is
1160@emph{not} a good choice for eqnarray and similar environments.@refill 1234@emph{not} a good choice for eqnarray and similar environments.
1161@item 1235@item
1162@code{nil} means to use the text right after the label definition.@refill 1236@code{nil} means to use the text right after the label definition.
1163@item 1237@item
1164For more complex ways of getting context, see the variable 1238For more complex ways of getting context, see the variable
1165@code{reftex-label-alist} (@ref{Options (Defining Label 1239@code{reftex-label-alist} (@ref{Options (Defining Label
1166Environments)}).@refill 1240Environments)}).
1167@end itemize 1241@end itemize
1168 1242
1169The following list of strings is used to guess the correct label type 1243The following list of strings is used to guess the correct label type
1170from the word before point when creating a reference. E.g. if you 1244from the word before point when creating a reference. E.g. if you
1171write: @samp{As we have shown in Theorem} and then press @kbd{C-c )}, 1245write: @samp{As we have shown in Theorem} and then press @kbd{C-c )},
1172@b{Ref@TeX{}} will know that you are looking for a theorem label and 1246@b{Ref@TeX{}} will know that you are looking for a theorem label and
1173restrict the menu to only these labels without even asking.@refill 1247restrict the menu to only these labels without even asking.
1174 1248
1175The final item in each entry is the level at which the environment 1249The final item in each entry is the level at which the environment
1176should produce entries in the table of context buffer. If the number is 1250should produce entries in the table of context buffer. If the number is
@@ -1178,11 +1252,11 @@ positive, the environment will produce numbered entries (like
1178@code{\section}), if it is negative the entries will be unnumbered (like 1252@code{\section}), if it is negative the entries will be unnumbered (like
1179@code{\section*}). Use this only for environments which structure the 1253@code{\section*}). Use this only for environments which structure the
1180document similar to sectioning commands. For everything else, omit the 1254document similar to sectioning commands. For everything else, omit the
1181item.@refill 1255item.
1182 1256
1183To do the same configuration with @code{customize}, you need to click on 1257To do the same configuration with @code{customize}, you need to click on
1184the @code{[INS]} button twice to create two templates and fill them in 1258the @code{[INS]} button twice to create two templates and fill them in
1185like this:@refill 1259like this:
1186 1260
1187@example 1261@example
1188Reftex Label Alist: [Hide] 1262Reftex Label Alist: [Hide]
@@ -1218,7 +1292,7 @@ the new environments to work, you might want to add the letters @samp{a}
1218and @samp{h} to some of the flags in the variables 1292and @samp{h} to some of the flags in the variables
1219@code{reftex-insert-label-flags} (@pxref{Options (Creating Labels)}) 1293@code{reftex-insert-label-flags} (@pxref{Options (Creating Labels)})
1220and @code{reftex-label-menu-flags} (@pxref{Options (Referencing 1294and @code{reftex-label-menu-flags} (@pxref{Options (Referencing
1221Labels)}).@refill 1295Labels)}).
1222 1296
1223 1297
1224@node Quick Equation, Figure Wrapper, Theorem and Axiom , Defining Label Environments 1298@node Quick Equation, Figure Wrapper, Theorem and Axiom , Defining Label Environments
@@ -1252,7 +1326,7 @@ The first element in this list is now the macro with empty braces as an
1252an equation label, the different @code{nil} elements indicate to use the 1326an equation label, the different @code{nil} elements indicate to use the
1253default values for equations. The @samp{1} as the fifth element 1327default values for equations. The @samp{1} as the fifth element
1254indicates that the context of the label definition should be the 1st 1328indicates that the context of the label definition should be the 1st
1255argument of the macro.@refill 1329argument of the macro.
1256 1330
1257Here is again how this would look in the customization buffer: 1331Here is again how this would look in the customization buffer:
1258 1332
@@ -1295,7 +1369,7 @@ which would be called like
1295 1369
1296Now we need to tell @b{Ref@TeX{}} that the 4th argument of the 1370Now we need to tell @b{Ref@TeX{}} that the 4th argument of the
1297@code{\myfig} macro @emph{is itself} a figure label, and where to find 1371@code{\myfig} macro @emph{is itself} a figure label, and where to find
1298the context.@refill 1372the context.
1299 1373
1300@lisp 1374@lisp
1301(setq reftex-label-alist 1375(setq reftex-label-alist
@@ -1308,19 +1382,19 @@ indicates that this is a figure label which will be listed together with
1308labels from normal figure environments. The @code{nil} entries for 1382labels from normal figure environments. The @code{nil} entries for
1309prefix and reference format mean to use the defaults for figure labels. 1383prefix and reference format mean to use the defaults for figure labels.
1310The @samp{3} for the context method means to grab the 3rd macro argument 1384The @samp{3} for the context method means to grab the 3rd macro argument
1311- the caption.@refill 1385- the caption.
1312 1386
1313As a side effect of this configuration, @code{reftex-label} will now 1387As a side effect of this configuration, @code{reftex-label} will now
1314insert the required naked label (without the @code{\label} macro) when 1388insert the required naked label (without the @code{\label} macro) when
1315point is directly after the opening parenthesis of a @code{\myfig} macro 1389point is directly after the opening parenthesis of a @code{\myfig} macro
1316argument.@refill 1390argument.
1317 1391
1318Again, here the configuration in the customization buffer: 1392Again, here the configuration in the customization buffer:
1319 1393
1320@example 1394@example
1321[INS] [DEL] Package or Detailed : [Value Menu] Detailed: 1395[INS] [DEL] Package or Detailed : [Value Menu] Detailed:
1322 Environment or \macro : [Value Menu] String: \myfig[]@{@}@{@}@{*@}@{@} 1396 Environment or \macro : [Value Menu] String: \myfig[]@{@}@{@}@{*@}@{@}
1323 Type specification : [Value Menu] Char : f 1397 Type specification : [Value Menu] Char : f
1324 Label prefix string : [Value Menu] Default 1398 Label prefix string : [Value Menu] Default
1325 Label reference format: [Value Menu] Default 1399 Label reference format: [Value Menu] Default
1326 Context method : [Value Menu] Macro arg nr: 3 1400 Context method : [Value Menu] Macro arg nr: 3
@@ -1341,7 +1415,7 @@ want to add some magic words, for another language. Changing only the
1341information associated with a label category is done by giving 1415information associated with a label category is done by giving
1342@code{nil} for the environment name and then specify the items you want 1416@code{nil} for the environment name and then specify the items you want
1343to define. Here is an example which adds German magic words to all 1417to define. Here is an example which adds German magic words to all
1344predefined label categories.@refill 1418predefined label categories.
1345 1419
1346@lisp 1420@lisp
1347(setq reftex-label-alist 1421(setq reftex-label-alist
@@ -1370,7 +1444,7 @@ do this:
1370@end lisp 1444@end lisp
1371 1445
1372@b{Ref@TeX{}} has also a predefined symbol for this special purpose. The 1446@b{Ref@TeX{}} has also a predefined symbol for this special purpose. The
1373following is equivalent to the line above.@refill 1447following is equivalent to the line above.
1374 1448
1375@lisp 1449@lisp
1376(setq reftex-label-alist '(AMSTeX)) 1450(setq reftex-label-alist '(AMSTeX))
@@ -1378,7 +1452,7 @@ following is equivalent to the line above.@refill
1378 1452
1379Note that this is automatically done by the @file{amsmath.el} style file 1453Note that this is automatically done by the @file{amsmath.el} style file
1380of AUCTeX (@pxref{Style Files}) - so if you use AUCTeX, 1454of AUCTeX (@pxref{Style Files}) - so if you use AUCTeX,
1381this configuration will not be necessary.@refill 1455this configuration will not be necessary.
1382 1456
1383@node Non-Standard Environments, Putting it Together, Using \eqref, Defining Label Environments 1457@node Non-Standard Environments, Putting it Together, Using \eqref, Defining Label Environments
1384@subsection Non-standard Environments 1458@subsection Non-standard Environments
@@ -1397,7 +1471,7 @@ it must return a buffer position indicating the start of this
1397environment. The return value must be @code{nil} on failure to detect 1471environment. The return value must be @code{nil} on failure to detect
1398the environment. The function is called with one argument @var{bound}. 1472the environment. The function is called with one argument @var{bound}.
1399If non-@code{nil}, @var{bound} is a boundary for backwards searches 1473If non-@code{nil}, @var{bound} is a boundary for backwards searches
1400which should be observed. We will discuss two examples.@refill 1474which should be observed. We will discuss two examples.
1401 1475
1402@cindex LaTeX commands, abbreviated 1476@cindex LaTeX commands, abbreviated
1403 1477
@@ -1409,7 +1483,7 @@ to search backward for these macros. When the first match is
1409@code{\be}, point is in this environment and the function must return 1483@code{\be}, point is in this environment and the function must return
1410the beginning of the match. To avoid scanning too far, we can also look 1484the beginning of the match. To avoid scanning too far, we can also look
1411for empty lines which cannot occur inside an equation environment. 1485for empty lines which cannot occur inside an equation environment.
1412Here is the setup:@refill 1486Here is the setup:
1413 1487
1414@lisp 1488@lisp
1415;; Setup entry in reftex-label-alist, using all defaults for equations 1489;; Setup entry in reftex-label-alist, using all defaults for equations
@@ -1417,7 +1491,7 @@ Here is the setup:@refill
1417 1491
1418(defun detect-be-ee (bound) 1492(defun detect-be-ee (bound)
1419 ;; Search backward for the macros or an empty line 1493 ;; Search backward for the macros or an empty line
1420 (if (re-search-backward 1494 (if (re-search-backward
1421 "\\(^[ \t]*\n\\|\\\\ee\\>\\)\\|\\(\\\\be\\>\\)" bound t) 1495 "\\(^[ \t]*\n\\|\\\\ee\\>\\)\\|\\(\\\\be\\>\\)" bound t)
1422 (if (match-beginning 2) 1496 (if (match-beginning 2)
1423 (match-beginning 2) ; Return start of environment 1497 (match-beginning 2) ; Return start of environment
@@ -1429,7 +1503,7 @@ Here is the setup:@refill
1429@cindex LaTeX packages, @code{linguex} 1503@cindex LaTeX packages, @code{linguex}
1430A more complex example is the @file{linguex.sty} package which defines 1504A more complex example is the @file{linguex.sty} package which defines
1431list macros @samp{\ex.}, @samp{\a.}, @samp{\b.} etc. for lists which are 1505list macros @samp{\ex.}, @samp{\a.}, @samp{\b.} etc. for lists which are
1432terminated by @samp{\z.} or by an empty line.@refill 1506terminated by @samp{\z.} or by an empty line.
1433 1507
1434@example 1508@example
1435\ex. \label@{ex:12@} Some text in an exotic language ... 1509\ex. \label@{ex:12@} Some text in an exotic language ...
@@ -1456,14 +1530,14 @@ for @b{Ref@TeX{}}.
1456(defun detect-linguex (bound) 1530(defun detect-linguex (bound)
1457 (let ((cnt 0)) 1531 (let ((cnt 0))
1458 (catch 'exit 1532 (catch 'exit
1459 (while 1533 (while
1460 ;; Search backward for all possible delimiters 1534 ;; Search backward for all possible delimiters
1461 (re-search-backward 1535 (re-search-backward
1462 (concat "\\(^[ \t]*\n\\)\\|\\(\\\\z\\.\\)\\|" 1536 (concat "\\(^[ \t]*\n\\)\\|\\(\\\\z\\.\\)\\|"
1463 "\\(\\ex[ig]?\\.\\)\\|\\(\\\\a\\.\\)") 1537 "\\(\\ex[ig]?\\.\\)\\|\\(\\\\a\\.\\)")
1464 nil t) 1538 nil t)
1465 ;; Check which delimiter was matched. 1539 ;; Check which delimiter was matched.
1466 (cond 1540 (cond
1467 ((match-beginning 1) 1541 ((match-beginning 1)
1468 ;; empty line terminates all - return nil 1542 ;; empty line terminates all - return nil
1469 (throw 'exit nil)) 1543 (throw 'exit nil))
@@ -1519,7 +1593,7 @@ message.
1519@b{Ref@TeX{}} can also display the label definition corresponding to a 1593@b{Ref@TeX{}} can also display the label definition corresponding to a
1520@code{\ref} macro, or all reference locations corresponding to a 1594@code{\ref} macro, or all reference locations corresponding to a
1521@code{\label} macro. @xref{Viewing Cross-References}, for more 1595@code{\label} macro. @xref{Viewing Cross-References}, for more
1522information.@refill 1596information.
1523 1597
1524@node xr (LaTeX package), varioref (LaTeX package), Reference Info, Labels and References 1598@node xr (LaTeX package), varioref (LaTeX package), Reference Info, Labels and References
1525@section @code{xr}: Cross-Document References 1599@section @code{xr}: Cross-Document References
@@ -1532,7 +1606,7 @@ information.@refill
1532 1606
1533The LaTeX package @code{xr} makes it possible to create references to 1607The LaTeX package @code{xr} makes it possible to create references to
1534labels defined in external documents. The preamble of a document using 1608labels defined in external documents. The preamble of a document using
1535@code{xr} will contain something like this:@refill 1609@code{xr} will contain something like this:
1536 1610
1537@example 1611@example
1538\usepackage@{xr@} 1612\usepackage@{xr@}
@@ -1543,18 +1617,18 @@ labels defined in external documents. The preamble of a document using
1543@noindent 1617@noindent
1544and we can make references to any labels defined in these 1618and we can make references to any labels defined in these
1545external documents by using the prefixes @samp{V1-} and @samp{V3-}, 1619external documents by using the prefixes @samp{V1-} and @samp{V3-},
1546respectively.@refill 1620respectively.
1547 1621
1548@b{Ref@TeX{}} can be used to create such references as well. Start the 1622@b{Ref@TeX{}} can be used to create such references as well. Start the
1549referencing process normally, by pressing @kbd{C-c )}. Select a label 1623referencing process normally, by pressing @kbd{C-c )}. Select a label
1550type if necessary. When you see the label selection buffer, pressing 1624type if necessary. When you see the label selection buffer, pressing
1551@kbd{x} will switch to the label selection buffer of one of the external 1625@kbd{x} will switch to the label selection buffer of one of the external
1552documents. You may then select a label as before and @b{Ref@TeX{}} will 1626documents. You may then select a label as before and @b{Ref@TeX{}} will
1553insert it along with the required prefix.@refill 1627insert it along with the required prefix.
1554 1628
1555For this kind of inter-document cross-references, saving of parsing 1629For this kind of inter-document cross-references, saving of parsing
1556information and the use of multiple selection buffers can mean a large 1630information and the use of multiple selection buffers can mean a large
1557speed-up (@pxref{Optimizations}).@refill 1631speed-up (@pxref{Optimizations}).
1558 1632
1559@node varioref (LaTeX package), fancyref (LaTeX package), xr (LaTeX package), Labels and References 1633@node varioref (LaTeX package), fancyref (LaTeX package), xr (LaTeX package), Labels and References
1560@section @code{varioref}: Variable Page References 1634@section @code{varioref}: Variable Page References
@@ -1572,7 +1646,7 @@ always use @code{\vref}, you may want to make it the default by
1572customizing the variable @code{reftex-vref-is-default}. If this 1646customizing the variable @code{reftex-vref-is-default}. If this
1573toggling seems too inconvenient, you can also use the command 1647toggling seems too inconvenient, you can also use the command
1574@code{reftex-varioref-vref}@footnote{bind it to @kbd{C-c v}.}. 1648@code{reftex-varioref-vref}@footnote{bind it to @kbd{C-c v}.}.
1575Or use AUCTeX to create your macros (@pxref{AUCTeX}).@refill 1649Or use AUCTeX to create your macros (@pxref{AUCTeX}).
1576 1650
1577@node fancyref (LaTeX package), , varioref (LaTeX package), Labels and References 1651@node fancyref (LaTeX package), , varioref (LaTeX package), Labels and References
1578@section @code{fancyref}: Fancy Cross References 1652@section @code{fancyref}: Fancy Cross References
@@ -1594,7 +1668,7 @@ shows the current status of this switch. If this cycling seems
1594inconvenient, you can also use the commands @code{reftex-fancyref-fref} 1668inconvenient, you can also use the commands @code{reftex-fancyref-fref}
1595and @code{reftex-fancyref-Fref}@footnote{bind them to @kbd{C-c 1669and @code{reftex-fancyref-Fref}@footnote{bind them to @kbd{C-c
1596f} and @kbd{C-c F}.}. Or use AUCTeX to create your macros 1670f} and @kbd{C-c F}.}. Or use AUCTeX to create your macros
1597(@pxref{AUCTeX}).@refill 1671(@pxref{AUCTeX}).
1598 1672
1599@node Citations, Index Support, Labels and References, Top 1673@node Citations, Index Support, Labels and References, Top
1600@chapter Citations 1674@chapter Citations
@@ -1605,7 +1679,7 @@ Citations in LaTeX are done with the @code{\cite} macro or variations of
1605it. The argument of the macro is a citation key which identifies an 1679it. The argument of the macro is a citation key which identifies an
1606article or book in either a BibTeX database file or in an explicit 1680article or book in either a BibTeX database file or in an explicit
1607@code{thebibliography} environment in the document. @b{Ref@TeX{}}'s 1681@code{thebibliography} environment in the document. @b{Ref@TeX{}}'s
1608support for citations helps to select the correct key quickly.@refill 1682support for citations helps to select the correct key quickly.
1609 1683
1610@menu 1684@menu
1611* Creating Citations:: How to create them. 1685* Creating Citations:: How to create them.
@@ -1613,6 +1687,7 @@ support for citations helps to select the correct key quickly.@refill
1613* Citation Info:: View the corresponding database entry. 1687* Citation Info:: View the corresponding database entry.
1614* Chapterbib and Bibunits:: Multiple bibliographies in a Document. 1688* Chapterbib and Bibunits:: Multiple bibliographies in a Document.
1615* Citations Outside LaTeX:: How to make citations in Emails etc. 1689* Citations Outside LaTeX:: How to make citations in Emails etc.
1690* BibTeX Database Subsets:: Extract parts of a big database.
1616@end menu 1691@end menu
1617 1692
1618@node Creating Citations, Citation Styles, , Citations 1693@node Creating Citations, Citation Styles, , Citations
@@ -1628,7 +1703,7 @@ In order to create a citation, press @kbd{C-c [}. @b{Ref@TeX{}} then
1628prompts for a regular expression which will be used to search through 1703prompts for a regular expression which will be used to search through
1629the database and present the list of matches to choose from in a 1704the database and present the list of matches to choose from in a
1630selection process similar to that for selecting labels 1705selection process similar to that for selecting labels
1631(@pxref{Referencing Labels}).@refill 1706(@pxref{Referencing Labels}).
1632 1707
1633The regular expression uses an extended syntax: @samp{&&} defines a 1708The regular expression uses an extended syntax: @samp{&&} defines a
1634logic @code{and} for regular expressions. For example 1709logic @code{and} for regular expressions. For example
@@ -1638,7 +1713,7 @@ Einstein. When entering the regular expression, you can complete on
1638known citation keys. RefTeX also offers a default when prompting for a 1713known citation keys. RefTeX also offers a default when prompting for a
1639regular expression. This default is the word before the cursor or the 1714regular expression. This default is the word before the cursor or the
1640word before the current @samp{\cite} command. Sometimes this may be a 1715word before the current @samp{\cite} command. Sometimes this may be a
1641good search key.@refill 1716good search key.
1642 1717
1643@cindex @code{\bibliography} 1718@cindex @code{\bibliography}
1644@cindex @code{thebibliography}, LaTeX environment 1719@cindex @code{thebibliography}, LaTeX environment
@@ -1653,12 +1728,12 @@ If you do not use BibTeX, but the document contains an explicit
1653information from there. Note that in this case the information 1728information from there. Note that in this case the information
1654presented in the selection buffer will just be a copy of relevant 1729presented in the selection buffer will just be a copy of relevant
1655@code{\bibitem} entries, not the structured listing available with 1730@code{\bibitem} entries, not the structured listing available with
1656BibTeX database files.@refill 1731BibTeX database files.
1657 1732
1658@kindex ? 1733@kindex ?
1659In the selection buffer, the following keys provide special commands. A 1734In the selection buffer, the following keys provide special commands. A
1660summary of this information is always available from the selection 1735summary of this information is always available from the selection
1661process by pressing @kbd{?}.@refill 1736process by pressing @kbd{?}.
1662 1737
1663@table @kbd 1738@table @kbd
1664@tablesubheading{General} 1739@tablesubheading{General}
@@ -1678,24 +1753,24 @@ Go to previous article.
1678@tablesubheading{Access to full database entries} 1753@tablesubheading{Access to full database entries}
1679@item @key{SPC} 1754@item @key{SPC}
1680Show the database entry corresponding to the article at point, in 1755Show the database entry corresponding to the article at point, in
1681another window. See also the @kbd{f} key.@refill 1756another window. See also the @kbd{f} key.
1682 1757
1683@item f 1758@item f
1684Toggle follow mode. When follow mode is active, the other window will 1759Toggle follow mode. When follow mode is active, the other window will
1685always display the full database entry of the current article. This is 1760always display the full database entry of the current article. This is
1686equivalent to pressing @key{SPC} after each cursor motion. With BibTeX 1761equivalent to pressing @key{SPC} after each cursor motion. With BibTeX
1687entries, follow mode can be rather slow.@refill 1762entries, follow mode can be rather slow.
1688 1763
1689@tablesubheading{Selecting entries and creating the citation} 1764@tablesubheading{Selecting entries and creating the citation}
1690@item @key{RET} 1765@item @key{RET}
1691Insert a citation referencing the article at point into the buffer from 1766Insert a citation referencing the article at point into the buffer from
1692which the selection process was started.@refill 1767which the selection process was started.
1693 1768
1694@item mouse-2 1769@item mouse-2
1695@vindex reftex-highlight-selection 1770@vindex reftex-highlight-selection
1696Clicking with mouse button 2 on a citation will accept it like @key{RET} 1771Clicking with mouse button 2 on a citation will accept it like @key{RET}
1697would. See also variable @code{reftex-highlight-selection}, @ref{Options 1772would. See also variable @code{reftex-highlight-selection}, @ref{Options
1698(Misc)}.@refill 1773(Misc)}.
1699 1774
1700@item m 1775@item m
1701Mark the current entry. When one or several entries are marked, 1776Mark the current entry. When one or several entries are marked,
@@ -1707,11 +1782,21 @@ Unmark a marked entry.
1707 1782
1708@item a 1783@item a
1709Accept all (marked) entries in the selection buffer and create a single 1784Accept all (marked) entries in the selection buffer and create a single
1710@code{\cite} macro referring to them.@refill 1785@code{\cite} macro referring to them.
1711 1786
1712@item A 1787@item A
1713Accept all (marked) entries in the selection buffer and create a 1788Accept all (marked) entries in the selection buffer and create a
1714separate @code{\cite} macro for each of it.@refill 1789separate @code{\cite} macro for each of it.
1790
1791@item e
1792Create a new BibTeX database file which contains all @i{marked} entries
1793in the selection buffer. If no entries are marked, all entries are
1794selected.
1795
1796@item E
1797Create a new BibTeX database file which contains all @i{unmarked}
1798entries in the selection buffer. If no entries are marked, all entries
1799are selected.
1715 1800
1716@item @key{TAB} 1801@item @key{TAB}
1717Enter a citation key with completion. This may also be a key which does 1802Enter a citation key with completion. This may also be a key which does
@@ -1719,30 +1804,30 @@ not yet exist.
1719 1804
1720@item . 1805@item .
1721Show insertion point in another window. This is the point from where you 1806Show insertion point in another window. This is the point from where you
1722called @code{reftex-citation}.@refill 1807called @code{reftex-citation}.
1723 1808
1724@tablesubheading{Exiting} 1809@tablesubheading{Exiting}
1725@item q 1810@item q
1726Exit the selection process without inserting a citation into the 1811Exit the selection process without inserting a citation into the
1727buffer.@refill 1812buffer.
1728 1813
1729@tablesubheading{Updating the buffer} 1814@tablesubheading{Updating the buffer}
1730 1815
1731@item g 1816@item g
1732Start over with a new regular expression. The full database will be 1817Start over with a new regular expression. The full database will be
1733rescanned with the new expression (see also @kbd{r}).@refill 1818rescanned with the new expression (see also @kbd{r}).
1734 1819
1735@c FIXME: Should we use something else here? r is usually rescan! 1820@c FIXME: Should we use something else here? r is usually rescan!
1736@item r 1821@item r
1737Refine the current selection with another regular expression. This will 1822Refine the current selection with another regular expression. This will
1738@emph{not} rescan the entire database, but just the already selected 1823@emph{not} rescan the entire database, but just the already selected
1739entries.@refill 1824entries.
1740 1825
1741@end table 1826@end table
1742 1827
1743@vindex reftex-select-bib-map 1828@vindex reftex-select-bib-map
1744In order to define additional commands for this selection process, the 1829In order to define additional commands for this selection process, the
1745keymap @code{reftex-select-bib-map} may be used.@refill 1830keymap @code{reftex-select-bib-map} may be used.
1746 1831
1747@node Citation Styles, Citation Info, Creating Citations, Citations 1832@node Citation Styles, Citation Info, Creating Citations, Citations
1748@section Citation Styles 1833@section Citation Styles
@@ -1782,11 +1867,15 @@ SELECT A CITATION FORMAT
1782[y] \citeyear@{%l@} 1867[y] \citeyear@{%l@}
1783@end example 1868@end example
1784 1869
1870@vindex reftex-cite-prompt-optional-args
1871If cite formats contain empty paris of square brackets, RefTeX can
1872will prompt for values of these optional arguments if you call the
1873@code{reftex-citation} command with a @kbd{C-u} prefix.
1785Following the most generic of these packages, @code{natbib}, the builtin 1874Following the most generic of these packages, @code{natbib}, the builtin
1786citation packages always accept the @kbd{t} key for a @emph{textual} 1875citation packages always accept the @kbd{t} key for a @emph{textual}
1787citation (like: @code{Jones et al. (1997) have shown...}) as well as 1876citation (like: @code{Jones et al. (1997) have shown...}) as well as
1788the @kbd{p} key for a parenthetical citation (like: @code{As shown 1877the @kbd{p} key for a parenthetical citation (like: @code{As shown
1789earlier (Jones et al, 1997)}).@refill 1878earlier (Jones et al, 1997)}).
1790 1879
1791To make one of these styles the default, customize the variable 1880To make one of these styles the default, customize the variable
1792@code{reftex-cite-format} or put into @file{.emacs}: 1881@code{reftex-cite-format} or put into @file{.emacs}:
@@ -1798,7 +1887,7 @@ To make one of these styles the default, customize the variable
1798You can also use AUCTeX style files to automatically set the 1887You can also use AUCTeX style files to automatically set the
1799citation style based on the @code{usepackage} commands in a given 1888citation style based on the @code{usepackage} commands in a given
1800document. @xref{Style Files}, for information on how to set up the style 1889document. @xref{Style Files}, for information on how to set up the style
1801files correctly.@refill 1890files correctly.
1802 1891
1803@node Citation Info, Chapterbib and Bibunits, Citation Styles, Citations, Top 1892@node Citation Info, Chapterbib and Bibunits, Citation Styles, Citations, Top
1804@section Citation Info 1893@section Citation Info
@@ -1819,7 +1908,7 @@ only displayed if the echo area is not occupied by a different message.
1819@b{Ref@TeX{}} can also display the @code{\bibitem} or BibTeX database 1908@b{Ref@TeX{}} can also display the @code{\bibitem} or BibTeX database
1820entry corresponding to a @code{\cite} macro, or all citation locations 1909entry corresponding to a @code{\cite} macro, or all citation locations
1821corresponding to a @code{\bibitem} or BibTeX database entry. 1910corresponding to a @code{\bibitem} or BibTeX database entry.
1822@xref{Viewing Cross-References}.@refill 1911@xref{Viewing Cross-References}.
1823 1912
1824@node Chapterbib and Bibunits, Citations Outside LaTeX, Citation Info, Citations 1913@node Chapterbib and Bibunits, Citations Outside LaTeX, Citation Info, Citations
1825@section Chapterbib and Bibunits 1914@section Chapterbib and Bibunits
@@ -1836,7 +1925,7 @@ separate file (as it is required for @code{chapterbib} anyway). Then
1836you have multiple bibliographies within a @emph{single file}, this may 1925you have multiple bibliographies within a @emph{single file}, this may
1837or may not be the case. 1926or may not be the case.
1838 1927
1839@node Citations Outside LaTeX, , Chapterbib and Bibunits, Citations 1928@node Citations Outside LaTeX, BibTeX Database Subsets, Chapterbib and Bibunits, Citations
1840@section Citations outside LaTeX 1929@section Citations outside LaTeX
1841@cindex Citations outside LaTeX 1930@cindex Citations outside LaTeX
1842@vindex reftex-default-bibliography 1931@vindex reftex-default-bibliography
@@ -1850,7 +1939,7 @@ Setting the variable @code{reftex-cite-format} to the symbol
1850@code{locally} does a decent job of putting all relevant information 1939@code{locally} does a decent job of putting all relevant information
1851about a citation directly into the buffer. Here is the lisp code to add 1940about a citation directly into the buffer. Here is the lisp code to add
1852the @kbd{C-c [} binding to the mail buffer. It also provides a local 1941the @kbd{C-c [} binding to the mail buffer. It also provides a local
1853binding for @code{reftex-cite-format}.@refill 1942binding for @code{reftex-cite-format}.
1854 1943
1855@lisp 1944@lisp
1856(add-hook 'mail-setup-hook 1945(add-hook 'mail-setup-hook
@@ -1861,6 +1950,34 @@ binding for @code{reftex-cite-format}.@refill
1861 (reftex-citation)))))) 1950 (reftex-citation))))))
1862@end lisp 1951@end lisp
1863 1952
1953@node BibTeX Database Subsets, , Citations Outside LaTeX, Citations
1954@section Database Subsets
1955@cindex BibTeX database subsets
1956@findex reftex-create-bibtex-file
1957
1958@b{Ref@TeX{}} offers two ways to create a new BibTeX database file.
1959
1960The first option produces a file which contains only the entries
1961actually referenced in the current document. This can be useful if
1962the database in only meant for a single document and you want to clean
1963it of old and unused ballast. It can also be useful while writing a
1964document together with collaborators, in order to avoid sending around
1965the entire (possibly very large) database. To create the file, use
1966@kbd{M-x reftex-create-bibtex-file}, also available from the menu
1967under @code{Ref->Global Actions->Create Bibtex File}. The command will
1968prompt for a BibTeX file name and write the extracted entries to that
1969file.
1970
1971The second option makes use of the selection process started by the
1972command @kbd{C-c [} (@pxref{Creating Citations}). This command uses a
1973regular expression to select entries, and lists them in a formatted
1974selection buffer. After pressing the @kbd{e} key (mnemonics: Export),
1975the command will prompt for the name of a new BibTeX file and write
1976the selected entries to that file. You can also first mark some
1977entries in the selection buffer with the @kbd{m} key and then export
1978either the @i{marked} entries (with the @kbd{e} key) or the
1979@i{unmarked} entries (with the @kbd{E} key).
1980
1864@node Index Support, Viewing Cross-References, Citations, Top 1981@node Index Support, Viewing Cross-References, Citations, Top
1865@chapter Index Support 1982@chapter Index Support
1866@cindex Index Support 1983@cindex Index Support
@@ -1875,7 +1992,7 @@ Index entries are created with the @code{\index@{@var{entry}@}} macro.
1875All entries defined in a document are written out to the @file{.aux} 1992All entries defined in a document are written out to the @file{.aux}
1876file. A separate tool must be used to convert this information into a 1993file. A separate tool must be used to convert this information into a
1877nicely formatted index. Tools used with LaTeX include @code{MakeIndex} 1994nicely formatted index. Tools used with LaTeX include @code{MakeIndex}
1878and @code{xindy}.@refill 1995and @code{xindy}.
1879 1996
1880Indexing is a very difficult task. It must follow strict conventions to 1997Indexing is a very difficult task. It must follow strict conventions to
1881make the index consistent and complete. There are basically two 1998make the index consistent and complete. There are basically two
@@ -1893,7 +2010,7 @@ to define special purpose macros which define an item and at the same
1893time make an index entry, possibly with special formatting to make the 2010time make an index entry, possibly with special formatting to make the
1894reference page in the index bold or underlined. To make @b{Ref@TeX{}} 2011reference page in the index bold or underlined. To make @b{Ref@TeX{}}
1895support for indexing possible, these special macros must be added to 2012support for indexing possible, these special macros must be added to
1896@b{Ref@TeX{}}'s configuration (@pxref{Defining Index Macros}).@refill 2013@b{Ref@TeX{}}'s configuration (@pxref{Defining Index Macros}).
1897 2014
1898@item 2015@item
1899The rest of the index is often just a collection of where in the 2016The rest of the index is often just a collection of where in the
@@ -1901,7 +2018,7 @@ document certain words or phrases are being used. This part is
1901difficult to develop along with the document, because consistent entries 2018difficult to develop along with the document, because consistent entries
1902for each occurrence are needed and are best selected when the document 2019for each occurrence are needed and are best selected when the document
1903is ready. @b{Ref@TeX{}} supports this with an @emph{index phrases file} 2020is ready. @b{Ref@TeX{}} supports this with an @emph{index phrases file}
1904which collects phrases and helps indexing the phrases globally.@refill 2021which collects phrases and helps indexing the phrases globally.
1905@end enumerate 2022@end enumerate
1906 2023
1907Before you start, you need to make sure that @b{Ref@TeX{}} knows about 2024Before you start, you need to make sure that @b{Ref@TeX{}} knows about
@@ -1913,7 +2030,7 @@ argument, and @b{Ref@TeX{}} needs to be configured for those. A
1913sufficiently new version of AUCTeX (9.10c or later) will do this 2030sufficiently new version of AUCTeX (9.10c or later) will do this
1914automatically. If you really don't use AUCTeX (you should!), this 2031automatically. If you really don't use AUCTeX (you should!), this
1915configuration needs to be done by hand with the menu (@code{Ref->Index 2032configuration needs to be done by hand with the menu (@code{Ref->Index
1916Style}), or globally for all your documents with@refill 2033Style}), or globally for all your documents with
1917 2034
1918@lisp 2035@lisp
1919(setq reftex-index-macros '(multind)) @r{or} 2036(setq reftex-index-macros '(multind)) @r{or}
@@ -1957,7 +2074,7 @@ available index macros and for its arguments. Completion will be
1957available for the index entry and, if applicable, the index tag. The 2074available for the index entry and, if applicable, the index tag. The
1958index tag is a string identifying one of multiple indices. With the 2075index tag is a string identifying one of multiple indices. With the
1959@file{multind} and @file{index} packages, this tag is the first argument 2076@file{multind} and @file{index} packages, this tag is the first argument
1960to the redefined @code{\index} macro.@refill 2077to the redefined @code{\index} macro.
1961 2078
1962@node The Index Phrases File, Displaying and Editing the Index, Creating Index Entries, Index Support 2079@node The Index Phrases File, Displaying and Editing the Index, Creating Index Entries, Index Support
1963@section The Index Phrases File 2080@section The Index Phrases File
@@ -1977,7 +2094,7 @@ of the available index macros. This list is initialized from
1977@code{reftex-index-macros} (@pxref{Defining Index Macros}). You can 2094@code{reftex-index-macros} (@pxref{Defining Index Macros}). You can
1978edit the header as needed, but if you define new LaTeX indexing macros, 2095edit the header as needed, but if you define new LaTeX indexing macros,
1979don't forget to add them to @code{reftex-index-macros} as well. Here is 2096don't forget to add them to @code{reftex-index-macros} as well. Here is
1980a phrase file header example:@refill 2097a phrase file header example:
1981 2098
1982@example 2099@example
1983% -*- mode: reftex-index-phrases -*- 2100% -*- mode: reftex-index-phrases -*-
@@ -1999,7 +2116,7 @@ indicates if @var{word} is indexed by the macro as
1999@samp{\index@{@var{word}@}@var{word}} (@var{repeat} = @code{t}). In the 2116@samp{\index@{@var{word}@}@var{word}} (@var{repeat} = @code{t}). In the
2000above example it is assumed that the macro @code{\index*@{@var{word}@}} 2117above example it is assumed that the macro @code{\index*@{@var{word}@}}
2001already typesets its argument in the text, so that it is unnecessary to 2118already typesets its argument in the text, so that it is unnecessary to
2002repeat @var{word} outside the macro.@refill 2119repeat @var{word} outside the macro.
2003 2120
2004@menu 2121@menu
2005* Collecting Phrases:: Collecting from document or external. 2122* Collecting Phrases:: Collecting from document or external.
@@ -2015,13 +2132,13 @@ repeat @var{word} outside the macro.@refill
2015 2132
2016Phrases for indexing can be collected while writing the document. The 2133Phrases for indexing can be collected while writing the document. The
2017command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word}) 2134command @kbd{C-c \} (@code{reftex-index-phrase-selection-or-word})
2018copies the current selection (if active) or the word near point into the 2135copies the current selection (if active) or the word near point into the
2019phrases buffer. It then selects this buffer, so that the phrase line 2136phrases buffer. It then selects this buffer, so that the phrase line
2020can be edited. To return to the LaTeX document, press @kbd{C-c C-c} 2137can be edited. To return to the LaTeX document, press @kbd{C-c C-c}
2021(@code{reftex-index-phrases-save-and-return}). 2138(@code{reftex-index-phrases-save-and-return}).
2022 2139
2023You can also prepare the list of index phrases in a different way and 2140You can also prepare the list of index phrases in a different way and
2024copy it into the phrases file. For example you might want to start from 2141copy it into the phrases file. For example you might want to start from
2025a word list of the document and remove all words which should not be 2142a word list of the document and remove all words which should not be
2026indexed. 2143indexed.
2027 2144
@@ -2030,7 +2147,7 @@ The phrase lines in the phrase buffer must have a specific format.
2030format. A phrase line looks like this: 2147format. A phrase line looks like this:
2031 2148
2032@example 2149@example
2033[@var{key}] <TABs> @var{phrase} [<TABs> @var{arg}[&&@var{arg}]... [ || @var{arg}]...] 2150[@var{key}] <TABs> @var{phrase} [<TABs> @var{arg}[&&@var{arg}]... [ || @var{arg}]...]
2034@end example 2151@end example
2035 2152
2036@code{<TABs>} stands for white space containing at least one @key{TAB}. 2153@code{<TABs>} stands for white space containing at least one @key{TAB}.
@@ -2049,7 +2166,7 @@ index entries, separate the different index arguments with @samp{ &&
2049able to choose at each match between several different index arguments, 2166able to choose at each match between several different index arguments,
2050separate them with @samp{ || }@footnote{@samp{||} with optional spaces, 2167separate them with @samp{ || }@footnote{@samp{||} with optional spaces,
2051see @code{reftex-index-phrases-logical-or-regexp}.}. Here is an 2168see @code{reftex-index-phrases-logical-or-regexp}.}. Here is an
2052example:@refill 2169example:
2053 2170
2054@example 2171@example
2055%-------------------------------------------------------------------- 2172%--------------------------------------------------------------------
@@ -2071,7 +2188,7 @@ occurrence of @samp{Mars} you will be able choose between indexing it as
2071a subitem of @samp{Planets}, @samp{Gods} or @samp{Chocolate Bars}. 2188a subitem of @samp{Planets}, @samp{Gods} or @samp{Chocolate Bars}.
2072Finally, every occurrence of @samp{Pluto} will be indexed as 2189Finally, every occurrence of @samp{Pluto} will be indexed as
2073@samp{\index@{Planets!Pluto@}\index@{Kuiper Belt Objects!Pluto@}Pluto} 2190@samp{\index@{Planets!Pluto@}\index@{Kuiper Belt Objects!Pluto@}Pluto}
2074and will therefore create two different index entries.@refill 2191and will therefore create two different index entries.
2075 2192
2076@node Consistency Checks, Global Indexing, Collecting Phrases, The Index Phrases File 2193@node Consistency Checks, Global Indexing, Collecting Phrases, The Index Phrases File
2077@subsection Consistency Checks 2194@subsection Consistency Checks
@@ -2087,13 +2204,13 @@ alphabetically - this is done with the command @kbd{C-c C-s}
2087buffer alphabetically by search phrase. If you want to group certain 2204buffer alphabetically by search phrase. If you want to group certain
2088phrases and only sort within the groups, insert empty lines between the 2205phrases and only sort within the groups, insert empty lines between the
2089groups. Sorting will only change the sequence of phrases within each 2206groups. Sorting will only change the sequence of phrases within each
2090group (see the variable @code{reftex-index-phrases-sort-in-blocks}).@refill 2207group (see the variable @code{reftex-index-phrases-sort-in-blocks}).
2091 2208
2092@kindex C-c C-i 2209@kindex C-c C-i
2093A useful command is @kbd{C-c C-i} (@code{reftex-index-phrases-info}) 2210A useful command is @kbd{C-c C-i} (@code{reftex-index-phrases-info})
2094which lists information about the phrase at point, including an example 2211which lists information about the phrase at point, including an example
2095of how the index entry will look like and the number of expected matches 2212of how the index entry will look like and the number of expected matches
2096in the document.@refill 2213in the document.
2097 2214
2098@kindex C-c C-t 2215@kindex C-c C-t
2099Another important check is to find out if there are double or 2216Another important check is to find out if there are double or
@@ -2104,7 +2221,7 @@ second phrase will not match because of the index macro inserted before
2104(@code{reftex-index-find-next-conflict-phrase}) finds the next phrase in 2221(@code{reftex-index-find-next-conflict-phrase}) finds the next phrase in
2105the buffer which is either duplicate or a subphrase of another phrase. 2222the buffer which is either duplicate or a subphrase of another phrase.
2106In order to check the whole buffer like this, start at the beginning and 2223In order to check the whole buffer like this, start at the beginning and
2107execute this command repeatedly.@refill 2224execute this command repeatedly.
2108 2225
2109@node Global Indexing, , Consistency Checks, The Index Phrases File 2226@node Global Indexing, , Consistency Checks, The Index Phrases File
2110@subsection Global Indexing 2227@subsection Global Indexing
@@ -2119,13 +2236,13 @@ There are several commands which start indexing: @kbd{C-c C-x} acts on
2119the current phrase line, @kbd{C-c C-r} on all lines in the current 2236the current phrase line, @kbd{C-c C-r} on all lines in the current
2120region and @kbd{C-c C-a} on all phrase lines in the buffer. It is 2237region and @kbd{C-c C-a} on all phrase lines in the buffer. It is
2121probably good to do indexing in small chunks since your concentration 2238probably good to do indexing in small chunks since your concentration
2122may not last long enough to do everything in one go.@refill 2239may not last long enough to do everything in one go.
2123 2240
2124@b{Ref@TeX{}} will start at the first phrase line and search the phrase 2241@b{Ref@TeX{}} will start at the first phrase line and search the phrase
2125globally in the whole document. At each match it will stop, compute the 2242globally in the whole document. At each match it will stop, compute the
2126replacement string and offer you the following choices@footnote{Windows 2243replacement string and offer you the following choices@footnote{Windows
2127users: Restrict yourself to the described keys during indexing. Pressing 2244users: Restrict yourself to the described keys during indexing. Pressing
2128@key{Help} at the indexing prompt can apparently hang Emacs.}:@refill 2245@key{Help} at the indexing prompt can apparently hang Emacs.}:
2129 2246
2130@table @kbd 2247@table @kbd
2131@item y 2248@item y
@@ -2177,7 +2294,7 @@ this match is already indexed. A match is considered indexed if it is
2177either the argument of an index macro, or if an index macro is directly 2294either the argument of an index macro, or if an index macro is directly
2178(without whitespace separation) before or after the match. Index macros 2295(without whitespace separation) before or after the match. Index macros
2179are those configured in @code{reftex-index-macros}. Intended for 2296are those configured in @code{reftex-index-macros}. Intended for
2180re-indexing a documents after changes have been made.@refill 2297re-indexing a documents after changes have been made.
2181@end table 2298@end table
2182 2299
2183Even though indexing should be the last thing you do to a document, you 2300Even though indexing should be the last thing you do to a document, you
@@ -2185,7 +2302,7 @@ are bound to make changes afterwards. Indexing then has to be applied
2185to the changed regions. The command 2302to the changed regions. The command
2186@code{reftex-index-phrases-apply-to-region} is designed for this 2303@code{reftex-index-phrases-apply-to-region} is designed for this
2187purpose. When called from a LaTeX document with active region, it will 2304purpose. When called from a LaTeX document with active region, it will
2188apply @code{reftex-index-all-phrases} to the current region.@refill 2305apply @code{reftex-index-all-phrases} to the current region.
2189 2306
2190@node Displaying and Editing the Index, Builtin Index Macros, The Index Phrases File, Index Support 2307@node Displaying and Editing the Index, Builtin Index Macros, The Index Phrases File, Index Support
2191@section Displaying and Editing the Index 2308@section Displaying and Editing the Index
@@ -2201,7 +2318,7 @@ In order to compile and display the index, press @kbd{C-c >}. If the
2201document uses multiple indices, @b{Ref@TeX{}} will ask you to select 2318document uses multiple indices, @b{Ref@TeX{}} will ask you to select
2202one. Then, all index entries will be sorted alphabetically and 2319one. Then, all index entries will be sorted alphabetically and
2203displayed in a special buffer, the @file{*Index*} buffer. From that 2320displayed in a special buffer, the @file{*Index*} buffer. From that
2204buffer you can check and edit each entry.@refill 2321buffer you can check and edit each entry.
2205 2322
2206The index can be restricted to the current section or the region. Then 2323The index can be restricted to the current section or the region. Then
2207only entries in that part of the document will go into the compiled 2324only entries in that part of the document will go into the compiled
@@ -2210,7 +2327,7 @@ index. To restrict to the current section, use a numeric prefix
2210region, make the region active and use a numeric prefix @samp{3} (press 2327region, make the region active and use a numeric prefix @samp{3} (press
2211@kbd{C-u 3 C-c >}). From within the @file{*Index*} buffer the 2328@kbd{C-u 3 C-c >}). From within the @file{*Index*} buffer the
2212restriction can be moved from one section to the next by pressing the 2329restriction can be moved from one section to the next by pressing the
2213@kbd{<} and @kbd{>} keys.@refill 2330@kbd{<} and @kbd{>} keys.
2214 2331
2215One caveat: @b{Ref@TeX{}} finds the definition point of an index entry 2332One caveat: @b{Ref@TeX{}} finds the definition point of an index entry
2216by searching near the buffer position where it had found to macro during 2333by searching near the buffer position where it had found to macro during
@@ -2220,12 +2337,12 @@ rescan the buffer to ensure the correspondence between the
2220@file{*Index*} buffer and the definition locations. It is therefore 2337@file{*Index*} buffer and the definition locations. It is therefore
2221advisable to rescan the document (with @kbd{r} or @kbd{C-u r}) 2338advisable to rescan the document (with @kbd{r} or @kbd{C-u r})
2222frequently while editing the index from the @file{*Index*} 2339frequently while editing the index from the @file{*Index*}
2223buffer.@refill 2340buffer.
2224 2341
2225@kindex ? 2342@kindex ?
2226Here is a list of special commands available in the @file{*Index*} buffer. A 2343Here is a list of special commands available in the @file{*Index*} buffer. A
2227summary of this information is always available by pressing 2344summary of this information is always available by pressing
2228@kbd{?}.@refill 2345@kbd{?}.
2229 2346
2230@table @kbd 2347@table @kbd
2231@tablesubheading{General} 2348@tablesubheading{General}
@@ -2238,25 +2355,25 @@ Prefix argument.
2238@tablesubheading{Moving around} 2355@tablesubheading{Moving around}
2239@item ! A..Z 2356@item ! A..Z
2240Pressing any capital letter will jump to the corresponding section in 2357Pressing any capital letter will jump to the corresponding section in
2241the @file{*Index*} buffer. The exclamation mark is special and jumps to 2358the @file{*Index*} buffer. The exclamation mark is special and jumps to
2242the first entries alphabetically sorted below @samp{A}. These are 2359the first entries alphabetically sorted below @samp{A}. These are
2243usually non-alphanumeric characters.@refill 2360usually non-alphanumeric characters.
2244@item n 2361@item n
2245Go to next entry.@refill 2362Go to next entry.
2246@item p 2363@item p
2247Go to previous entry.@refill 2364Go to previous entry.
2248 2365
2249@tablesubheading{Access to document locations} 2366@tablesubheading{Access to document locations}
2250@item @key{SPC} 2367@item @key{SPC}
2251Show the place in the document where this index entry is defined.@refill 2368Show the place in the document where this index entry is defined.
2252 2369
2253@item @key{TAB} 2370@item @key{TAB}
2254Go to the definition of the current index entry in another 2371Go to the definition of the current index entry in another
2255window.@refill 2372window.
2256 2373
2257@item @key{RET} 2374@item @key{RET}
2258Go to the definition of the current index entry and hide the 2375Go to the definition of the current index entry and hide the
2259@file{*Index*} buffer window.@refill 2376@file{*Index*} buffer window.
2260 2377
2261@item f 2378@item f
2262@vindex reftex-index-follow-mode 2379@vindex reftex-index-follow-mode
@@ -2268,20 +2385,20 @@ cursor motion. The default for this flag can be set with the variable
2268@code{reftex-index-follow-mode}. Note that only context in files 2385@code{reftex-index-follow-mode}. Note that only context in files
2269already visited is shown. @b{Ref@TeX{}} will not visit a file just for 2386already visited is shown. @b{Ref@TeX{}} will not visit a file just for
2270follow mode. See, however, the variable 2387follow mode. See, however, the variable
2271@code{reftex-revisit-to-follow}.@refill 2388@code{reftex-revisit-to-follow}.
2272 2389
2273@tablesubheading{Entry editing} 2390@tablesubheading{Entry editing}
2274@item e 2391@item e
2275Edit the current index entry. In the minibuffer, you can edit the 2392Edit the current index entry. In the minibuffer, you can edit the
2276index macro which defines this entry.@refill 2393index macro which defines this entry.
2277 2394
2278@item C-k 2395@item C-k
2279Kill the index entry. Currently not implemented because I don't know 2396Kill the index entry. Currently not implemented because I don't know
2280how to implement an @code{undo} function for this.@refill 2397how to implement an @code{undo} function for this.
2281 2398
2282@item * 2399@item *
2283Edit the @var{key} part of the entry. This is the initial part of the 2400Edit the @var{key} part of the entry. This is the initial part of the
2284entry which determines the location of the entry in the index.@refill 2401entry which determines the location of the entry in the index.
2285 2402
2286@item | 2403@item |
2287Edit the @var{attribute} part of the entry. This is the part after the 2404Edit the @var{attribute} part of the entry. This is the part after the
@@ -2289,82 +2406,82 @@ vertical bar. With @code{MakeIndex}, this part is an encapsulating
2289macro. With @code{xindy}, it is called @emph{attribute} and is a 2406macro. With @code{xindy}, it is called @emph{attribute} and is a
2290property of the index entry that can lead to special formatting. When 2407property of the index entry that can lead to special formatting. When
2291called with @kbd{C-u} prefix, kill the entire @var{attribute} 2408called with @kbd{C-u} prefix, kill the entire @var{attribute}
2292part.@refill 2409part.
2293 2410
2294@item @@ 2411@item @@
2295Edit the @var{visual} part of the entry. This is the part after the 2412Edit the @var{visual} part of the entry. This is the part after the
2296@samp{@@} which is used by @code{MakeIndex} to change the visual 2413@samp{@@} which is used by @code{MakeIndex} to change the visual
2297appearance of the entry in the index. When called with @kbd{C-u} 2414appearance of the entry in the index. When called with @kbd{C-u}
2298prefix, kill the entire @var{visual} part.@refill 2415prefix, kill the entire @var{visual} part.
2299 2416
2300@item ( 2417@item (
2301Toggle the beginning of page range property @samp{|(} of the 2418Toggle the beginning of page range property @samp{|(} of the
2302entry.@refill 2419entry.
2303 2420
2304@item ) 2421@item )
2305Toggle the end of page range property @samp{|)} of the entry.@refill 2422Toggle the end of page range property @samp{|)} of the entry.
2306 2423
2307@item _ 2424@item _
2308Make the current entry a subentry. This command will prompt for the 2425Make the current entry a subentry. This command will prompt for the
2309superordinate entry and insert it.@refill 2426superordinate entry and insert it.
2310 2427
2311@item ^ 2428@item ^
2312Remove the highest superordinate entry. If the current entry is a 2429Remove the highest superordinate entry. If the current entry is a
2313subitem (@samp{aaa!bbb!ccc}), this function moves it up the hierarchy 2430subitem (@samp{aaa!bbb!ccc}), this function moves it up the hierarchy
2314(@samp{bbb!ccc}).@refill 2431(@samp{bbb!ccc}).
2315 2432
2316@tablesubheading{Exiting} 2433@tablesubheading{Exiting}
2317@item q 2434@item q
2318Hide the @file{*Index*} buffer.@refill 2435Hide the @file{*Index*} buffer.
2319 2436
2320@item k 2437@item k
2321Kill the @file{*Index*} buffer.@refill 2438Kill the @file{*Index*} buffer.
2322 2439
2323@item C-c = 2440@item C-c =
2324Switch to the Table of Contents buffer of this document.@refill 2441Switch to the Table of Contents buffer of this document.
2325 2442
2326@tablesubheading{Controlling what gets displayed} 2443@tablesubheading{Controlling what gets displayed}
2327@item c 2444@item c
2328@vindex reftex-index-include-context 2445@vindex reftex-index-include-context
2329Toggle the display of short context in the @file{*Index*} buffer. The 2446Toggle the display of short context in the @file{*Index*} buffer. The
2330default for this flag can be set with the variable 2447default for this flag can be set with the variable
2331@code{reftex-index-include-context}.@refill 2448@code{reftex-index-include-context}.
2332 2449
2333@item @} 2450@item @}
2334Restrict the index to a single document section. The corresponding 2451Restrict the index to a single document section. The corresponding
2335section number will be displayed in the @code{R<>} indicator in the 2452section number will be displayed in the @code{R<>} indicator in the
2336mode line and in the header of the @file{*Index*} buffer.@refill 2453mode line and in the header of the @file{*Index*} buffer.
2337 2454
2338@item @{ 2455@item @{
2339Widen the index to contain all entries of the document.@refill 2456Widen the index to contain all entries of the document.
2340 2457
2341@item < 2458@item <
2342When the index is currently restricted, move the restriction to the 2459When the index is currently restricted, move the restriction to the
2343previous section.@refill 2460previous section.
2344 2461
2345@item > 2462@item >
2346When the index is currently restricted, move the restriction to the 2463When the index is currently restricted, move the restriction to the
2347next section.@refill 2464next section.
2348 2465
2349@tablesubheading{Updating the buffer} 2466@tablesubheading{Updating the buffer}
2350@item g 2467@item g
2351Rebuild the @file{*Index*} buffer. This does @emph{not} rescan the 2468Rebuild the @file{*Index*} buffer. This does @emph{not} rescan the
2352document. However, it sorts the entries again, so that edited entries 2469document. However, it sorts the entries again, so that edited entries
2353will move to the correct position.@refill 2470will move to the correct position.
2354 2471
2355@item r 2472@item r
2356@vindex reftex-enable-partial-scans 2473@vindex reftex-enable-partial-scans
2357Reparse the LaTeX document and rebuild the @file{*Index*} buffer. When 2474Reparse the LaTeX document and rebuild the @file{*Index*} buffer. When
2358@code{reftex-enable-partial-scans} is non-@code{nil}, rescan only the file this 2475@code{reftex-enable-partial-scans} is non-nil, rescan only the file this
2359location is defined in, not the entire document.@refill 2476location is defined in, not the entire document.
2360 2477
2361@item C-u r 2478@item C-u r
2362Reparse the @emph{entire} LaTeX document and rebuild the @file{*Index*} 2479Reparse the @emph{entire} LaTeX document and rebuild the @file{*Index*}
2363buffer.@refill 2480buffer.
2364 2481
2365@item s 2482@item s
2366Switch to a different index (for documents with multiple 2483Switch to a different index (for documents with multiple
2367indices).@refill 2484indices).
2368@end table 2485@end table
2369 2486
2370 2487
@@ -2427,7 +2544,7 @@ quick identification of these macros when @b{Ref@TeX{}} inserts new
2427index entries with @code{reftex-index}. These codes need to be 2544index entries with @code{reftex-index}. These codes need to be
2428unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the 2545unique. @code{?i}, @code{?I}, and @code{?g} are reserved for the
2429@code{\index}, @code{\index*}, and @code{\glossary} macros, 2546@code{\index}, @code{\index*}, and @code{\glossary} macros,
2430respectively. 2547respectively.
2431 2548
2432The following string is empty unless your macro adds a superordinate 2549The following string is empty unless your macro adds a superordinate
2433entry to the index key - this is the case for the @code{\astobj} macro. 2550entry to the index key - this is the case for the @code{\astobj} macro.
@@ -2450,14 +2567,14 @@ Repeat:
2450 Macro with args: \ix@{*@} 2567 Macro with args: \ix@{*@}
2451 Index Tag : [Value Menu] String: idx 2568 Index Tag : [Value Menu] String: idx
2452 Access Key : x 2569 Access Key : x
2453 Key Prefix : 2570 Key Prefix :
2454 Exclusion hook : nil 2571 Exclusion hook : nil
2455 Repeat Outside : [Toggle] off (nil) 2572 Repeat Outside : [Toggle] off (nil)
2456[INS] [DEL] List: 2573[INS] [DEL] List:
2457 Macro with args: \nindex@{*@} 2574 Macro with args: \nindex@{*@}
2458 Index Tag : [Value Menu] String: name 2575 Index Tag : [Value Menu] String: name
2459 Access Key : n 2576 Access Key : n
2460 Key Prefix : 2577 Key Prefix :
2461 Exclusion hook : nil 2578 Exclusion hook : nil
2462 Repeat Outside : [Toggle] off (nil) 2579 Repeat Outside : [Toggle] off (nil)
2463[INS] [DEL] List: 2580[INS] [DEL] List:
@@ -2481,7 +2598,7 @@ This would be done like this
2481which specifies that the macro identified with the character @code{?x} (the 2598which specifies that the macro identified with the character @code{?x} (the
2482@code{\ix} macro) should be used for indexing phrases and words already 2599@code{\ix} macro) should be used for indexing phrases and words already
2483in the buffer with @kbd{C-c /} (@code{reftex-index-selection-or-word}). 2600in the buffer with @kbd{C-c /} (@code{reftex-index-selection-or-word}).
2484The index tag is "idx".@refill 2601The index tag is "idx".
2485 2602
2486@node Viewing Cross-References, RefTeXs Menu, Index Support, Top 2603@node Viewing Cross-References, RefTeXs Menu, Index Support, Top
2487@chapter Viewing Cross--References 2604@chapter Viewing Cross--References
@@ -2495,13 +2612,13 @@ if two document locations are linked, @b{Ref@TeX{}} can display the
2495matching location(s) in another window. The @code{\label} and @code{\ref} 2612matching location(s) in another window. The @code{\label} and @code{\ref}
2496macros are one way of establishing such a link. Also, a @code{\cite} 2613macros are one way of establishing such a link. Also, a @code{\cite}
2497macro is linked to the corresponding @code{\bibitem} macro or a BibTeX 2614macro is linked to the corresponding @code{\bibitem} macro or a BibTeX
2498database entry.@refill 2615database entry.
2499 2616
2500The feature is invoked by pressing @kbd{C-c &} 2617The feature is invoked by pressing @kbd{C-c &}
2501(@code{reftex-view-crossref}) while point is on the @var{key} argument 2618(@code{reftex-view-crossref}) while point is on the @var{key} argument
2502of a macro involved in cross--referencing. You can also click with 2619of a macro involved in cross--referencing. You can also click with
2503@kbd{S-mouse-2} on the macro argument. Here is what will happen for 2620@kbd{S-mouse-2} on the macro argument. Here is what will happen for
2504individual classes of macros:@refill 2621individual classes of macros:
2505 2622
2506@table @asis 2623@table @asis
2507 2624
@@ -2512,7 +2629,7 @@ variants@footnote{all macros that start with @samp{ref} or end with
2512@samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for 2629@samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for
2513cross--reference display. This works also for labels defined in an 2630cross--reference display. This works also for labels defined in an
2514external document when the current document refers to them through the 2631external document when the current document refers to them through the
2515@code{xr} interface (@pxref{xr (LaTeX package)}).@refill 2632@code{xr} interface (@pxref{xr (LaTeX package)}).
2516 2633
2517@item @code{\label} 2634@item @code{\label}
2518@cindex @code{\label} 2635@cindex @code{\label}
@@ -2521,20 +2638,20 @@ Display a document location which references this label. Pressing
2521@kbd{C-c &} several times moves through the entire document and finds 2638@kbd{C-c &} several times moves through the entire document and finds
2522all locations. Not only the @code{\label} macro but also other macros 2639all locations. Not only the @code{\label} macro but also other macros
2523with label arguments (as configured with @code{reftex-label-alist}) are 2640with label arguments (as configured with @code{reftex-label-alist}) are
2524active for cross--reference display.@refill 2641active for cross--reference display.
2525 2642
2526@item @code{\cite} 2643@item @code{\cite}
2527@cindex @code{\cite} 2644@cindex @code{\cite}
2528Display the corresponding BibTeX database entry or @code{\bibitem}. 2645Display the corresponding BibTeX database entry or @code{\bibitem}.
2529All usual variants@footnote{all macros that either start or end with 2646All usual variants@footnote{all macros that either start or end with
2530@samp{cite}} of the @code{\cite} macro are active for cross--reference 2647@samp{cite}} of the @code{\cite} macro are active for cross--reference
2531display.@refill 2648display.
2532 2649
2533@item @code{\bibitem} 2650@item @code{\bibitem}
2534@cindex @code{\bibitem} 2651@cindex @code{\bibitem}
2535Display a document location which cites this article. Pressing 2652Display a document location which cites this article. Pressing
2536@kbd{C-c &} several times moves through the entire document and finds 2653@kbd{C-c &} several times moves through the entire document and finds
2537all locations.@refill 2654all locations.
2538 2655
2539@item BibTeX 2656@item BibTeX
2540@cindex BibTeX buffer, viewing cite locations from 2657@cindex BibTeX buffer, viewing cite locations from
@@ -2544,21 +2661,21 @@ document where the database entry at point is cited will be displayed.
2544On first use, @b{Ref@TeX{}} will prompt for a buffer which belongs to 2661On first use, @b{Ref@TeX{}} will prompt for a buffer which belongs to
2545the document you want to search. Subsequent calls will use the same 2662the document you want to search. Subsequent calls will use the same
2546document, until you break this link with a prefix argument to @kbd{C-c 2663document, until you break this link with a prefix argument to @kbd{C-c
2547&}.@refill 2664&}.
2548 2665
2549@item @code{\index} 2666@item @code{\index}
2550@cindex @code{\index} 2667@cindex @code{\index}
2551Display other locations in the document which are marked by an index 2668Display other locations in the document which are marked by an index
2552macro with the same key argument. Along with the standard @code{\index} 2669macro with the same key argument. Along with the standard @code{\index}
2553and @code{\glossary} macros, all macros configured in 2670and @code{\glossary} macros, all macros configured in
2554@code{reftex-index-macros} will be recognized.@refill 2671@code{reftex-index-macros} will be recognized.
2555@end table 2672@end table
2556 2673
2557@vindex reftex-view-crossref-extra 2674@vindex reftex-view-crossref-extra
2558While the display of cross referencing information for the above 2675While the display of cross referencing information for the above
2559mentioned macros is hard--coded, you can configure additional relations 2676mentioned macros is hard--coded, you can configure additional relations
2560in the variable @code{reftex-view-crossref-extra}. 2677in the variable @code{reftex-view-crossref-extra}.
2561 2678
2562@iftex 2679@iftex
2563@chapter All the Rest 2680@chapter All the Rest
2564@end iftex 2681@end iftex
@@ -2572,7 +2689,7 @@ in the variable @code{reftex-view-crossref-extra}.
2572which support this. From this menu you can access all of 2689which support this. From this menu you can access all of
2573@b{Ref@TeX{}}'s commands and a few of its options. There is also a 2690@b{Ref@TeX{}}'s commands and a few of its options. There is also a
2574@code{Customize} submenu which can be used to access @b{Ref@TeX{}}'s 2691@code{Customize} submenu which can be used to access @b{Ref@TeX{}}'s
2575entire set of options.@refill 2692entire set of options.
2576 2693
2577@node Key Bindings, Faces, RefTeXs Menu, Top 2694@node Key Bindings, Faces, RefTeXs Menu, Top
2578@section Default Key Bindings 2695@section Default Key Bindings
@@ -2609,10 +2726,10 @@ Here is a summary of the available key bindings.
2609 2726
2610Note that the @kbd{S-mouse-2} binding is only provided if this key is 2727Note that the @kbd{S-mouse-2} binding is only provided if this key is
2611not already used by some other package. @b{Ref@TeX{}} will not override an 2728not already used by some other package. @b{Ref@TeX{}} will not override an
2612existing binding to @kbd{S-mouse-2}.@refill 2729existing binding to @kbd{S-mouse-2}.
2613 2730
2614Personally, I also bind some functions in the users @kbd{C-c} map for 2731Personally, I also bind some functions in the users @kbd{C-c} map for
2615easier access.@refill 2732easier access.
2616 2733
2617@c FIXME: Do we need bindings for the Index macros here as well? 2734@c FIXME: Do we need bindings for the Index macros here as well?
2618@c C-c i C-c I or so???? 2735@c C-c i C-c I or so????
@@ -2658,7 +2775,7 @@ the ones defined in @file{font-lock.el}. Therefore, @b{Ref@TeX{}} will
2658use faces only when @code{font-lock} is loaded. This seems to be 2775use faces only when @code{font-lock} is loaded. This seems to be
2659reasonable because people who like faces will very likely have it 2776reasonable because people who like faces will very likely have it
2660loaded. If you wish to turn off fontification or change the involved 2777loaded. If you wish to turn off fontification or change the involved
2661faces, see @ref{Options (Fontification)}.@refill 2778faces, see @ref{Options (Fontification)}.
2662 2779
2663@node Multifile Documents, Language Support, AUCTeX, Top 2780@node Multifile Documents, Language Support, AUCTeX, Top
2664@section Multifile Documents 2781@section Multifile Documents
@@ -2666,7 +2783,7 @@ faces, see @ref{Options (Fontification)}.@refill
2666@cindex Documents, spread over files 2783@cindex Documents, spread over files
2667 2784
2668The following is relevant when working with documents spread over many 2785The following is relevant when working with documents spread over many
2669files:@refill 2786files:
2670 2787
2671@itemize @bullet 2788@itemize @bullet
2672@item 2789@item
@@ -2674,7 +2791,7 @@ files:@refill
2674several (multifile) documents at the same time without conflicts. 2791several (multifile) documents at the same time without conflicts.
2675@b{Ref@TeX{}} provides functions to run @code{grep}, @code{search} and 2792@b{Ref@TeX{}} provides functions to run @code{grep}, @code{search} and
2676@code{query-replace} on all files which are part of a multifile 2793@code{query-replace} on all files which are part of a multifile
2677document.@refill 2794document.
2678 2795
2679@item 2796@item
2680@vindex tex-main-file 2797@vindex tex-main-file
@@ -2683,7 +2800,7 @@ All files belonging to a multifile document should define a File
2683Variable (@code{TeX-master} for AUCTeX or @code{tex-main-file} for the 2800Variable (@code{TeX-master} for AUCTeX or @code{tex-main-file} for the
2684standard Emacs LaTeX mode) containing the name of the master file. For 2801standard Emacs LaTeX mode) containing the name of the master file. For
2685example, to set the file variable @code{TeX-master}, include something 2802example, to set the file variable @code{TeX-master}, include something
2686like the following at the end of each TeX file:@refill 2803like the following at the end of each TeX file:
2687 2804
2688@example 2805@example
2689%%% Local Variables: *** 2806%%% Local Variables: ***
@@ -2703,14 +2820,14 @@ this comment automatically. For more details see the documentation of
2703the AUCTeX (@pxref{Multifile,,,auctex, The AUC TeX User Manual}), the 2820the AUCTeX (@pxref{Multifile,,,auctex, The AUC TeX User Manual}), the
2704documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs, 2821documentation about the Emacs (La)TeX mode (@pxref{TeX Print,,,emacs,
2705The GNU Emacs Manual}) and the Emacs documentation on File Variables 2822The GNU Emacs Manual}) and the Emacs documentation on File Variables
2706(@pxref{File Variables,,,emacs, The GNU Emacs Manual}).@refill 2823(@pxref{File Variables,,,emacs, The GNU Emacs Manual}).
2707 2824
2708@item 2825@item
2709The context of a label definition must be found in the same file as the 2826The context of a label definition must be found in the same file as the
2710label itself in order to be processed correctly by @b{Ref@TeX{}}. The only 2827label itself in order to be processed correctly by @b{Ref@TeX{}}. The only
2711exception is that section labels referring to a section statement 2828exception is that section labels referring to a section statement
2712outside the current file can still use that section title as 2829outside the current file can still use that section title as
2713context.@refill 2830context.
2714@end itemize 2831@end itemize
2715 2832
2716@node Language Support, Finding Files, Multifile Documents, Top 2833@node Language Support, Finding Files, Multifile Documents, Top
@@ -2748,7 +2865,7 @@ see @ref{Adding Magic Words}.
2748 2865
2749@vindex reftex-multiref-punctuation 2866@vindex reftex-multiref-punctuation
2750@vindex reftex-cite-punctuation 2867@vindex reftex-cite-punctuation
2751@item 2868@item
2752@b{Ref@TeX{}} inserts ``punctuation'' for multiple references and 2869@b{Ref@TeX{}} inserts ``punctuation'' for multiple references and
2753for the author list in citations. Some of this may be language 2870for the author list in citations. Some of this may be language
2754dependent. See the variables @code{reftex-multiref-punctuation} and 2871dependent. See the variables @code{reftex-multiref-punctuation} and
@@ -2802,7 +2919,7 @@ variables and configure @b{Ref@TeX{}} to use them instead:
2802Specify the full search path directly in @b{Ref@TeX{}}'s variables. 2919Specify the full search path directly in @b{Ref@TeX{}}'s variables.
2803 2920
2804@lisp 2921@lisp
2805(setq reftex-texpath-environment-variables 2922(setq reftex-texpath-environment-variables
2806 '("./inp:/home/cd/tex//:/usr/local/tex//")) 2923 '("./inp:/home/cd/tex//:/usr/local/tex//"))
2807(setq reftex-bibpath-environment-variables 2924(setq reftex-bibpath-environment-variables
2808 '("/home/cd/tex/lit/")) 2925 '("/home/cd/tex/lit/"))
@@ -2820,7 +2937,7 @@ command depends upon the version of that program.
2820(setq reftex-use-external-file-finders t) 2937(setq reftex-use-external-file-finders t)
2821(setq reftex-external-file-finders 2938(setq reftex-external-file-finders
2822 '(("tex" . "kpsewhich -format=.tex %f") 2939 '(("tex" . "kpsewhich -format=.tex %f")
2823 ("bib" . "kpsewhich -format=.bib %f"))) 2940 ("bib" . "kpsewhich -format=.bib %f")))
2824@end lisp 2941@end lisp
2825@end itemize 2942@end itemize
2826 2943
@@ -2835,9 +2952,9 @@ the new extension must also be known to AUCTeX via the variable
2835@code{TeX-file-extension}. For example: 2952@code{TeX-file-extension}. For example:
2836 2953
2837@lisp 2954@lisp
2838(setq reftex-file-extensions 2955(setq reftex-file-extensions
2839 '(("nw" "tex" ".tex" ".ltx") ("bib" ".bib"))) 2956 '(("nw" "tex" ".tex" ".ltx") ("bib" ".bib")))
2840(setq TeX-file-extensions 2957(setq TeX-file-extensions
2841 '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo")) 2958 '( "nw" "tex" "sty" "cls" "ltx" "texi" "texinfo"))
2842@end lisp 2959@end lisp
2843 2960
@@ -2853,7 +2970,7 @@ books, where some of it still might be useful.}
2853Implementing the principle of least surprises, the default settings of 2970Implementing the principle of least surprises, the default settings of
2854@b{Ref@TeX{}} ensure a safe ride for beginners and casual users. However, 2971@b{Ref@TeX{}} ensure a safe ride for beginners and casual users. However,
2855when using @b{Ref@TeX{}} for a large project and/or on a small computer, 2972when using @b{Ref@TeX{}} for a large project and/or on a small computer,
2856there are ways to improve speed or memory usage.@refill 2973there are ways to improve speed or memory usage.
2857 2974
2858@itemize @bullet 2975@itemize @bullet
2859@item 2976@item
@@ -2887,7 +3004,7 @@ table-of-contents buffer will only prompt scanning of the file in which
2887the label or section macro near the cursor was defined. Re-parsing of 3004the label or section macro near the cursor was defined. Re-parsing of
2888the entire document is still available by using @kbd{C-u C-u} as a 3005the entire document is still available by using @kbd{C-u C-u} as a
2889prefix, or the capital @kbd{R} key in the menus. To use this feature, 3006prefix, or the capital @kbd{R} key in the menus. To use this feature,
2890try@refill 3007try
2891 3008
2892@vindex reftex-enable-partial-scans 3009@vindex reftex-enable-partial-scans
2893@lisp 3010@lisp
@@ -2906,7 +3023,7 @@ for storing information about a document with master file
2906@file{MASTER.tex}. It is written automatically when you kill a buffer 3023@file{MASTER.tex}. It is written automatically when you kill a buffer
2907in @code{reftex-mode} or when you exit Emacs. The information is 3024in @code{reftex-mode} or when you exit Emacs. The information is
2908restored when you begin working with a document in a new editing 3025restored when you begin working with a document in a new editing
2909session. To use this feature, put into @file{.emacs}:@refill 3026session. To use this feature, put into @file{.emacs}:
2910 3027
2911@vindex reftex-save-parse-info 3028@vindex reftex-save-parse-info
2912@lisp 3029@lisp
@@ -2914,6 +3031,25 @@ session. To use this feature, put into @file{.emacs}:@refill
2914@end lisp 3031@end lisp
2915 3032
2916@item 3033@item
3034@b{Identifying label types by prefix}@*
3035@cindex Parse information, saving to a file
3036@vindex reftex-trust-label-prefix
3037@b{Ref@TeX{}} normally parses around each label to check in which
3038environment this label is located, in order to assign a label type to
3039the label. If your document contains thousands of labels, document
3040parsing will take considerable time. If you have been using label prefixes
3041like tab: and fn: consistently, you can tell @b{Ref@TeX{}} to get the
3042label type directly from the prefix, without additional parsing. This
3043will be faster and also allow labels to end up in the correct category
3044if for some reason it is not possible to derive the correct type from
3045context. For example, to enable this feature for footnote and
3046equation labels, use
3047
3048@lisp
3049(setq reftex-trust-label-prefix '("fn:" "eq:"))
3050@end lisp
3051
3052@item
2917@b{Automatic Document Scans}@* 3053@b{Automatic Document Scans}@*
2918@cindex Automatic document scans 3054@cindex Automatic document scans
2919@cindex Document scanning, automatic 3055@cindex Document scanning, automatic
@@ -2927,7 +3063,7 @@ document. If this gets into your way, it can be turned off with
2927 3063
2928@b{Ref@TeX{}} will then occasionally annotate new labels in the selection 3064@b{Ref@TeX{}} will then occasionally annotate new labels in the selection
2929buffer, saying that their position in the label list in uncertain. A 3065buffer, saying that their position in the label list in uncertain. A
2930manual document scan will fix this.@refill 3066manual document scan will fix this.
2931 3067
2932@item 3068@item
2933@b{Multiple Selection Buffers}@* 3069@b{Multiple Selection Buffers}@*
@@ -2941,7 +3077,7 @@ from one selection to the next. These buffers are updated automatically
2941only when a new label has been added in the buffers category with 3077only when a new label has been added in the buffers category with
2942@code{reftex-label}. Updating the buffer takes as long as recreating it 3078@code{reftex-label}. Updating the buffer takes as long as recreating it
2943- so the time saving is limited to cases where no new labels of that 3079- so the time saving is limited to cases where no new labels of that
2944category have been added. To turn on this feature, use@refill 3080category have been added. To turn on this feature, use
2945 3081
2946@vindex reftex-use-multiple-selection-buffers 3082@vindex reftex-use-multiple-selection-buffers
2947@lisp 3083@lisp
@@ -2953,7 +3089,7 @@ category have been added. To turn on this feature, use@refill
2953You can also inhibit the automatic updating entirely. Then the 3089You can also inhibit the automatic updating entirely. Then the
2954selection buffer will always pop up very fast, but may not contain the 3090selection buffer will always pop up very fast, but may not contain the
2955most recently defined labels. You can always update the buffer by hand, 3091most recently defined labels. You can always update the buffer by hand,
2956with the @kbd{g} key. To get this behavior, use instead@refill 3092with the @kbd{g} key. To get this behavior, use instead
2957 3093
2958@vindex reftex-auto-update-selection-buffers 3094@vindex reftex-auto-update-selection-buffers
2959@lisp 3095@lisp
@@ -2976,7 +3112,7 @@ with the @kbd{g} key. To get this behavior, use instead@refill
2976@end lisp 3112@end lisp
2977 3113
2978@node AUCTeX, Multifile Documents, Faces, Top 3114@node AUCTeX, Multifile Documents, Faces, Top
2979@section AUC@TeX{} 3115@section @w{AUC @TeX{}}
2980@cindex @code{AUCTeX}, Emacs package 3116@cindex @code{AUCTeX}, Emacs package
2981@cindex Emacs packages, @code{AUCTeX} 3117@cindex Emacs packages, @code{AUCTeX}
2982 3118
@@ -2984,8 +3120,7 @@ AUCTeX is without doubt the best major mode for editing TeX and LaTeX
2984files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}). 3120files with Emacs (@pxref{Top,AUCTeX,,auctex, The AUCTeX User Manual}).
2985If AUCTeX is not part of your Emacs distribution, you can get 3121If AUCTeX is not part of your Emacs distribution, you can get
2986it@footnote{XEmacs 21.x users may want to install the corresponding 3122it@footnote{XEmacs 21.x users may want to install the corresponding
2987XEmacs package.} by ftp from the 3123XEmacs package.} by ftp from the @value{AUCTEXSITE}.
2988@uref{ftp://ftp.gnu.org/pub/gnu/auctex,AUCTeX distribution site}.
2989 3124
2990@menu 3125@menu
2991* AUCTeX-RefTeX Interface:: How both packages work together 3126* AUCTeX-RefTeX Interface:: How both packages work together
@@ -3002,7 +3137,7 @@ using @b{Ref@TeX{}}'s commands directly, you can then also use them
3002indirectly as part of the AUCTeX 3137indirectly as part of the AUCTeX
3003environment@footnote{@b{Ref@TeX{}} 4.0 and AUCTeX 9.10c will be 3138environment@footnote{@b{Ref@TeX{}} 4.0 and AUCTeX 9.10c will be
3004needed for all of this to work. Parts of it work also with earlier 3139needed for all of this to work. Parts of it work also with earlier
3005versions.}. The interface is turned on with@refill 3140versions.}. The interface is turned on with
3006 3141
3007@lisp 3142@lisp
3008(setq reftex-plug-into-AUCTeX t) 3143(setq reftex-plug-into-AUCTeX t)
@@ -3046,7 +3181,7 @@ will offer its default label which is derived from the section title.
3046@item 3181@item
3047@b{AUCTeX tells @b{Ref@TeX{}} about new sections}@* 3182@b{AUCTeX tells @b{Ref@TeX{}} about new sections}@*
3048When creating a new section with @kbd{C-c C-s}, @b{Ref@TeX{}} will not 3183When creating a new section with @kbd{C-c C-s}, @b{Ref@TeX{}} will not
3049have to rescan the buffer in order to see it.@refill 3184have to rescan the buffer in order to see it.
3050 3185
3051@item 3186@item
3052@findex reftex-arg-label 3187@findex reftex-arg-label
@@ -3070,7 +3205,7 @@ old functionality when you later decide to turn off the interface.} and
3070supplies the macro arguments with @b{Ref@TeX{}'s} mechanisms. For 3205supplies the macro arguments with @b{Ref@TeX{}'s} mechanisms. For
3071example, when you type @kbd{C-c @key{RET} ref @key{RET}}, @b{Ref@TeX{}} 3206example, when you type @kbd{C-c @key{RET} ref @key{RET}}, @b{Ref@TeX{}}
3072will supply its label selection process (@pxref{Referencing 3207will supply its label selection process (@pxref{Referencing
3073Labels}).@refill 3208Labels}).
3074 3209
3075@item 3210@item
3076@b{@b{Ref@TeX{}} tells AUCTeX about new labels, citation-- and index keys}@* 3211@b{@b{Ref@TeX{}} tells AUCTeX about new labels, citation-- and index keys}@*
@@ -3088,16 +3223,16 @@ commands of a document (@pxref{Style Files,,,auctex}). Support for
3088defines macros or environments connected with labels, citations, or the 3223defines macros or environments connected with labels, citations, or the
3089index. Many style files (e.g. @file{amsmath.el} or @file{natbib.el}) 3224index. Many style files (e.g. @file{amsmath.el} or @file{natbib.el})
3090distributed with AUCTeX already support @b{Ref@TeX{}} in this 3225distributed with AUCTeX already support @b{Ref@TeX{}} in this
3091way.@refill 3226way.
3092 3227
3093Before calling a @b{Ref@TeX{}} function, the style hook should always 3228Before calling a @b{Ref@TeX{}} function, the style hook should always
3094test for the availability of the function, so that the style file will 3229test for the availability of the function, so that the style file will
3095also work for people who do not use @b{Ref@TeX{}}. @refill 3230also work for people who do not use @b{Ref@TeX{}}.
3096 3231
3097Additions made with style files in the way described below remain local 3232Additions made with style files in the way described below remain local
3098to the current document. For example, if one package uses AMSTeX, the 3233to the current document. For example, if one package uses AMSTeX, the
3099style file will make @b{Ref@TeX{}} switch over to @code{\eqref}, but 3234style file will make @b{Ref@TeX{}} switch over to @code{\eqref}, but
3100this will not affect other documents.@refill 3235this will not affect other documents.
3101 3236
3102@findex reftex-add-label-environments 3237@findex reftex-add-label-environments
3103@findex reftex-add-to-label-alist 3238@findex reftex-add-to-label-alist
@@ -3107,7 +3242,7 @@ function @code{reftex-add-to-label-alist} which is still available as an
3107alias for compatibility.} which defines additions to 3242alias for compatibility.} which defines additions to
3108@code{reftex-label-alist}. The argument taken by this function must have 3243@code{reftex-label-alist}. The argument taken by this function must have
3109the same format as @code{reftex-label-alist}. The @file{amsmath.el} 3244the same format as @code{reftex-label-alist}. The @file{amsmath.el}
3110style file of AUCTeX for example contains the following:@refill 3245style file of AUCTeX for example contains the following:
3111 3246
3112@lisp 3247@lisp
3113@group 3248@group
@@ -3121,7 +3256,7 @@ style file of AUCTeX for example contains the following:@refill
3121@noindent 3256@noindent
3122@findex LaTeX-add-environments, @r{AUCTeX} 3257@findex LaTeX-add-environments, @r{AUCTeX}
3123while a package @code{myprop} defining a @code{proposition} environment 3258while a package @code{myprop} defining a @code{proposition} environment
3124with @code{\newtheorem} might use@refill 3259with @code{\newtheorem} might use
3125 3260
3126@lisp 3261@lisp
3127@group 3262@group
@@ -3139,7 +3274,7 @@ with @code{\newtheorem} might use@refill
3139Similarly, a style hook may contain a call to 3274Similarly, a style hook may contain a call to
3140@code{reftex-set-cite-format} to set the citation format. The style 3275@code{reftex-set-cite-format} to set the citation format. The style
3141file @file{natbib.el} for the Natbib citation style does switch 3276file @file{natbib.el} for the Natbib citation style does switch
3142@b{Ref@TeX{}}'s citation format like this:@refill 3277@b{Ref@TeX{}}'s citation format like this:
3143 3278
3144@lisp 3279@lisp
3145(TeX-add-style-hook "natbib" 3280(TeX-add-style-hook "natbib"
@@ -3148,7 +3283,7 @@ file @file{natbib.el} for the Natbib citation style does switch
3148 (reftex-set-cite-format 'natbib)))) 3283 (reftex-set-cite-format 'natbib))))
3149@end lisp 3284@end lisp
3150 3285
3151@findex reftex-add-index-macros 3286@findex reftex-add-index-macros
3152The hook may contain a call to @code{reftex-add-index-macros} to 3287The hook may contain a call to @code{reftex-add-index-macros} to
3153define additional @code{\index}-like macros. The argument must have 3288define additional @code{\index}-like macros. The argument must have
3154the same format as @code{reftex-index-macros}. It may be a symbol, to 3289the same format as @code{reftex-index-macros}. It may be a symbol, to
@@ -3210,14 +3345,14 @@ support for that: @code{reftex-view-crossref} (bound to @kbd{C-c
3210highlighting is provided (among other things) by Peter S. Galbraith's 3345highlighting is provided (among other things) by Peter S. Galbraith's
3211@file{bib-cite.el}. There is some overlap in the functionalities of 3346@file{bib-cite.el}. There is some overlap in the functionalities of
3212Bib-cite and @b{Ref@TeX{}}. Bib-cite.el comes bundled with 3347Bib-cite and @b{Ref@TeX{}}. Bib-cite.el comes bundled with
3213AUCTeX.@refill 3348AUCTeX.
3214 3349
3215Bib-cite version 3.06 and later can be configured so that bib-cite's 3350Bib-cite version 3.06 and later can be configured so that bib-cite's
3216mouse functions use @b{Ref@TeX{}} for displaying references and citations. 3351mouse functions use @b{Ref@TeX{}} for displaying references and citations.
3217This can be useful in particular when working with the LaTeX @code{xr} 3352This can be useful in particular when working with the LaTeX @code{xr}
3218package or with an explicit @code{thebibliography} environment (rather 3353package or with an explicit @code{thebibliography} environment (rather
3219than BibTeX). Bib-cite cannot handle those, but @b{Ref@TeX{}} does. To 3354than BibTeX). Bib-cite cannot handle those, but @b{Ref@TeX{}} does. To
3220make use of this feature, try@refill 3355make use of this feature, try
3221 3356
3222@vindex bib-cite-use-reftex-view-crossref 3357@vindex bib-cite-use-reftex-view-crossref
3223@lisp 3358@lisp
@@ -3234,13 +3369,13 @@ make use of this feature, try@refill
3234@b{LaTeX commands}@* 3369@b{LaTeX commands}@*
3235@cindex LaTeX commands, not found 3370@cindex LaTeX commands, not found
3236@code{\input}, @code{\include}, and @code{\section} (etc.) statements 3371@code{\input}, @code{\include}, and @code{\section} (etc.) statements
3237have to be first on a line (except for white space).@refill 3372have to be first on a line (except for white space).
3238 3373
3239@item 3374@item
3240@b{Commented regions}@* 3375@b{Commented regions}@*
3241@cindex Labels, commented out 3376@cindex Labels, commented out
3242@b{Ref@TeX{}} sees also labels in regions commented out and will refuse to 3377@b{Ref@TeX{}} sees also labels in regions commented out and will refuse to
3243make duplicates of such labels. This is considered to be a feature.@refill 3378make duplicates of such labels. This is considered to be a feature.
3244 3379
3245@item 3380@item
3246@b{Wrong section numbers}@* 3381@b{Wrong section numbers}@*
@@ -3248,7 +3383,7 @@ make duplicates of such labels. This is considered to be a feature.@refill
3248@vindex reftex-enable-partial-scans 3383@vindex reftex-enable-partial-scans
3249When using partial scans (@code{reftex-enable-partial-scans}), the section 3384When using partial scans (@code{reftex-enable-partial-scans}), the section
3250numbers in the table of contents may eventually become wrong. A full 3385numbers in the table of contents may eventually become wrong. A full
3251scan will fix this.@refill 3386scan will fix this.
3252 3387
3253@item 3388@item
3254@b{Local settings}@* 3389@b{Local settings}@*
@@ -3263,7 +3398,7 @@ documents, you should use AUCTeX and set up style files with calls to
3263@code{reftex-add-label-environments}, @code{reftex-set-cite-format}, 3398@code{reftex-add-label-environments}, @code{reftex-set-cite-format},
3264@code{reftex-add-index-macros}, and @code{reftex-add-section-levels}. 3399@code{reftex-add-index-macros}, and @code{reftex-add-section-levels}.
3265Settings made with these functions remain local to the current 3400Settings made with these functions remain local to the current
3266document. @xref{AUCTeX}.@refill 3401document. @xref{AUCTeX}.
3267 3402
3268@item 3403@item
3269@b{Funny display in selection buffer}@* 3404@b{Funny display in selection buffer}@*
@@ -3282,21 +3417,21 @@ literally for speed reasons. Then both short context and section
3282headings may look different from what you usually see on your screen. 3417headings may look different from what you usually see on your screen.
3283In rare cases @code{reftex-toc} may have problems to jump to an affected 3418In rare cases @code{reftex-toc} may have problems to jump to an affected
3284section heading. There are three possible ways to deal with 3419section heading. There are three possible ways to deal with
3285this:@refill 3420this:
3286@itemize @minus 3421@itemize @minus
3287@item 3422@item
3288@vindex reftex-keep-temporary-buffers 3423@vindex reftex-keep-temporary-buffers
3289@code{(setq reftex-keep-temporary-buffers t)}@* 3424@code{(setq reftex-keep-temporary-buffers t)}@*
3290This implies that @b{Ref@TeX{}} will load all parts of a multifile 3425This implies that @b{Ref@TeX{}} will load all parts of a multifile
3291document into Emacs (i.e. there won't be any temporary buffers).@refill 3426document into Emacs (i.e. there won't be any temporary buffers).
3292@item 3427@item
3293@vindex reftex-initialize-temporary-buffers 3428@vindex reftex-initialize-temporary-buffers
3294@code{(setq reftex-initialize-temporary-buffers t)}@* 3429@code{(setq reftex-initialize-temporary-buffers t)}@*
3295This means full initialization of temporary buffers. It involves 3430This means full initialization of temporary buffers. It involves
3296a penalty when the same unvisited file is used for lookup often.@refill 3431a penalty when the same unvisited file is used for lookup often.
3297@item 3432@item
3298Set @code{reftex-initialize-temporary-buffers} to a list of hook 3433Set @code{reftex-initialize-temporary-buffers} to a list of hook
3299functions doing a minimal initialization.@refill 3434functions doing a minimal initialization.
3300@end itemize 3435@end itemize
3301@vindex reftex-refontify-context 3436@vindex reftex-refontify-context
3302See also the variable @code{reftex-refontify-context}. 3437See also the variable @code{reftex-refontify-context}.
@@ -3332,7 +3467,7 @@ The first line is just a normal configuration for a macro. For the
3332argument (which really is a second argument to the macro @code{\begin}) 3467argument (which really is a second argument to the macro @code{\begin})
3333as a label of type @code{?p}. Argument count for this macro starts only 3468as a label of type @code{?p}. Argument count for this macro starts only
3334after the @samp{@{step+@}}, also when specifying how to get 3469after the @samp{@{step+@}}, also when specifying how to get
3335context.@refill 3470context.
3336 3471
3337@item 3472@item
3338@b{Idle timers in XEmacs}@* 3473@b{Idle timers in XEmacs}@*
@@ -3352,7 +3487,7 @@ this bug gets fixed, a real idle timer can be requested with
3352@cindex Key bindings, problems with Viper mode 3487@cindex Key bindings, problems with Viper mode
3353@findex viper-harness-minor-mode 3488@findex viper-harness-minor-mode
3354With @i{Viper} mode prior to Vipers version 3.01, you need to protect 3489With @i{Viper} mode prior to Vipers version 3.01, you need to protect
3355@b{Ref@TeX{}}'s keymaps with@refill 3490@b{Ref@TeX{}}'s keymaps with
3356 3491
3357@lisp 3492@lisp
3358(viper-harness-minor-mode "reftex") 3493(viper-harness-minor-mode "reftex")
@@ -3373,19 +3508,19 @@ With @i{Viper} mode prior to Vipers version 3.01, you need to protect
3373 3508
3374@b{Ref@TeX{}} was written by @i{Carsten Dominik} 3509@b{Ref@TeX{}} was written by @i{Carsten Dominik}
3375@email{dominik@@science.uva.nl}, with contributions by @i{Stephen 3510@email{dominik@@science.uva.nl}, with contributions by @i{Stephen
3376Eglen}. @b{Ref@TeX{}} is currently maintained by @refill 3511Eglen}. @b{Ref@TeX{}} is currently maintained by
3377 3512
3378@noindent 3513@noindent
3379Carsten Dominik @email{dominik@@science.uva.nl} 3514Carsten Dominik <dominik@@science.uva.nl>
3380 3515
3381If you have questions about @b{Ref@TeX{}}, there are several Usenet 3516If you have questions about @b{Ref@TeX{}}, there are several Usenet
3382groups which have competent readers: @code{comp.emacs}, 3517groups which have competent readers: @code{comp.emacs},
3383@code{gnu.emacs.help}, @code{comp.emacs.xemacs}, @code{comp.text.tex}. 3518@code{gnu.emacs.help}, @code{comp.emacs.xemacs}, @code{comp.text.tex},
3384You can also write directly to the maintainer. 3519@code{de.comp.text.tex}. You can also write directly to the
3520maintainer.
3385 3521
3386If you find a bug in @b{Ref@TeX{}} or its documentation, or if you want 3522If you find a bug in @b{Ref@TeX{}} or its documentation, or if you want
3387to contribute code or ideas, please 3523to contribute code or ideas, please @value{MAINTAINERCONTACT}. Remember
3388@uref{mailto:dominik@@science.uva.nl,contact the maintainer}. Remember
3389to provide all necessary information such as version numbers of Emacs 3524to provide all necessary information such as version numbers of Emacs
3390and @b{Ref@TeX{}}, and the relevant part of your configuration in 3525and @b{Ref@TeX{}}, and the relevant part of your configuration in
3391@file{.emacs}. When reporting a bug which throws an exception, please 3526@file{.emacs}. When reporting a bug which throws an exception, please
@@ -3394,31 +3529,30 @@ include a backtrace if you know how to produce one.
3394@b{Ref@TeX{}} is bundled and pre-installed with Emacs since version 20.2. 3529@b{Ref@TeX{}} is bundled and pre-installed with Emacs since version 20.2.
3395It was also bundled and pre-installed with XEmacs 19.16--20.x. XEmacs 3530It was also bundled and pre-installed with XEmacs 19.16--20.x. XEmacs
339621.x users want to install the corresponding plugin package which is 353121.x users want to install the corresponding plugin package which is
3397available from the XEmacs @code{ftp} site. See the XEmacs 21.x 3532available from the @value{XEMACSFTP}. See the XEmacs 21.x
3398documentation on package installation for details.@refill 3533documentation on package installation for details.
3399 3534
3400Users of earlier Emacs distributions (including Emacs 19) can get a 3535Users of earlier Emacs distributions (including Emacs 19) can get a
3401@b{Ref@TeX{}} distribution from the 3536@b{Ref@TeX{}} distribution from the @value{MAINTAINERSITE}. Note that
3402@uref{http://www.strw.leidenuniv.nl/~dominik/Tools/,maintainers 3537the Emacs 19 version supports many but not all features described in
3403webpage}. Note that the Emacs 19 version supports many but not all 3538this manual.
3404features described in this manual.@refill
3405 3539
3406Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped 3540Thanks to the people on the Net who have used @b{Ref@TeX{}} and helped
3407developing it with their reports. In particular thanks to @i{Fran 3541developing it with their reports. In particular thanks to @i{Fran
3408Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, Karl 3542Burstall, Alastair Burt, Lars Clausen, Soren Dayton, Stephen Eglen, Karl
3409Eichwalder, Erik Frik, Erik Frisk, Peter Galbraith, Kai Grossjohann, 3543Eichwalder, Erik Frisk, Peter Galbraith, Kai Grossjohann, Frank Harrell,
3410Frank Harrell, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, 3544Peter Heslin, Stephan Heuel, Alan Ho, Lute Kamstra, Dieter Kraft, David
3411Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier, Sudeep 3545Kastrup, Adrian Lanz, Rory Molinari, Stefan Monnier, Laurent Mugnier,
3412Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, Richard Stanton, 3546Sudeep Kumar Palat, Daniel Polani, Alan Shutko, Robin Socha, Richard
3413Allan Strand, Jan Vroonhof, Christoph Wedler, Alan Williams, Roland 3547Stanton, Allan Strand, Jan Vroonhof, Christoph Wedler, Alan Williams,
3414Winkler, Eli Zaretskii}.@refill 3548Roland Winkler, Hans-Christoph Wirth, Eli Zaretskii}.
3415 3549
3416The @code{view-crossref} feature was inspired by @i{Peter Galbraith's} 3550The @code{view-crossref} feature was inspired by @i{Peter Galbraith's}
3417@file{bib-cite.el}.@refill 3551@file{bib-cite.el}.
3418 3552
3419Finally thanks to @i{Uwe Bolick} who first got me (some years ago) into 3553Finally thanks to @i{Uwe Bolick} who first got me interested in
3420supporting LaTeX labels and references with an editor (which was 3554supporting LaTeX labels and references with an editor (which was
3421MicroEmacs at the time).@refill 3555MicroEmacs at the time).
3422 3556
3423@node Commands, Options, Imprint, Top 3557@node Commands, Options, Imprint, Top
3424@chapter Commands 3558@chapter Commands
@@ -3431,7 +3565,7 @@ menu. See @xref{Key Bindings}.
3431 3565
3432@deffn Command reftex-toc 3566@deffn Command reftex-toc
3433Show the table of contents for the current document. When called with 3567Show the table of contents for the current document. When called with
3434one ore two @kbd{C-u} prefixes, rescan the document first.@refill 3568one ore two @kbd{C-u} prefixes, rescan the document first.
3435@end deffn 3569@end deffn
3436 3570
3437@deffn Command reftex-label 3571@deffn Command reftex-label
@@ -3450,17 +3584,17 @@ expression, scans the buffers with BibTeX entries (taken from the
3450@code{\bibliography} command or a @code{thebibliography} environment) 3584@code{\bibliography} command or a @code{thebibliography} environment)
3451and offers the matching entries for selection. The selected entry is 3585and offers the matching entries for selection. The selected entry is
3452formatted according to @code{reftex-cite-format} and inserted into the 3586formatted according to @code{reftex-cite-format} and inserted into the
3453buffer.@refill @* 3587buffer. @*
3454When called with one or two @kbd{C-u} prefixes, first rescans the 3588When called with a @kbd{C-u} prefixe, prompt for optional arguments in
3455document. When called with a numeric prefix, make that many citations. 3589cite macros. When called with a numeric prefix, make that many citations.
3456When called with point inside the braces of a @code{\cite} command, it 3590When called with point inside the braces of a @code{\cite} command, it
3457will add another key, ignoring the value of 3591will add another key, ignoring the value of
3458@code{reftex-cite-format}.@refill @* 3592@code{reftex-cite-format}. @*
3459The regular expression uses an expanded syntax: @samp{&&} is interpreted 3593The regular expression uses an expanded syntax: @samp{&&} is interpreted
3460as @code{and}. Thus, @samp{aaaa&&bbb} matches entries which contain 3594as @code{and}. Thus, @samp{aaaa&&bbb} matches entries which contain
3461both @samp{aaaa} and @samp{bbb}. While entering the regexp, completion 3595both @samp{aaaa} and @samp{bbb}. While entering the regexp, completion
3462on knows citation keys is possible. @samp{=} is a good regular 3596on knows citation keys is possible. @samp{=} is a good regular
3463expression to match all entries in all files.@refill 3597expression to match all entries in all files.
3464@end deffn 3598@end deffn
3465 3599
3466@deffn Command reftex-index 3600@deffn Command reftex-index
@@ -3468,7 +3602,7 @@ Query for an index macro and insert it along with its arguments. The
3468index macros available are those defined in @code{reftex-index-macro} or 3602index macros available are those defined in @code{reftex-index-macro} or
3469by a call to @code{reftex-add-index-macros}, typically from an AUCTeX 3603by a call to @code{reftex-add-index-macros}, typically from an AUCTeX
3470style file. @b{Ref@TeX{}} provides completion for the index tag and the 3604style file. @b{Ref@TeX{}} provides completion for the index tag and the
3471index key, and will prompt for other arguments.@refill 3605index key, and will prompt for other arguments.
3472@end deffn 3606@end deffn
3473 3607
3474@deffn Command reftex-index-selection-or-word 3608@deffn Command reftex-index-selection-or-word
@@ -3480,7 +3614,7 @@ user have a chance to edit the index entry. When called with 2
3480@kbd{C-u} as prefix, also ask for the index macro and other stuff. When 3614@kbd{C-u} as prefix, also ask for the index macro and other stuff. When
3481called inside TeX math mode as determined by the @file{texmathp.el} 3615called inside TeX math mode as determined by the @file{texmathp.el}
3482library which is part of AUCTeX, the string is first processed with the 3616library which is part of AUCTeX, the string is first processed with the
3483@code{reftex-index-math-format}, which see.@refill 3617@code{reftex-index-math-format}, which see.
3484@end deffn 3618@end deffn
3485 3619
3486@deffn Command reftex-index-phrase-selection-or-word 3620@deffn Command reftex-index-phrase-selection-or-word
@@ -3507,7 +3641,7 @@ When the document has multiple indices, first prompts for the correct one.
3507When index support is turned off, offer to turn it on. 3641When index support is turned off, offer to turn it on.
3508With one or two @kbd{C-u} prefixes, rescan document first. 3642With one or two @kbd{C-u} prefixes, rescan document first.
3509With prefix 2, restrict index to current document section. 3643With prefix 2, restrict index to current document section.
3510With prefix 3, restrict index to active region.@refill 3644With prefix 3, restrict index to active region.
3511@end deffn 3645@end deffn
3512 3646
3513@deffn Command reftex-view-crossref 3647@deffn Command reftex-view-crossref
@@ -3532,25 +3666,25 @@ this function several times find successive citation locations.
3532@deffn Command reftex-create-tags-file 3666@deffn Command reftex-create-tags-file
3533Create TAGS file by running @code{etags} on the current document. The 3667Create TAGS file by running @code{etags} on the current document. The
3534TAGS file is also immediately visited with 3668TAGS file is also immediately visited with
3535@code{visit-tags-table}.@refill 3669@code{visit-tags-table}.
3536@end deffn 3670@end deffn
3537 3671
3538@deffn Command reftex-grep-document 3672@deffn Command reftex-grep-document
3539Run grep query through all files related to this document. 3673Run grep query through all files related to this document.
3540With prefix arg, force to rescan document. 3674With prefix arg, force to rescan document.
3541No active TAGS table is required.@refill 3675No active TAGS table is required.
3542@end deffn 3676@end deffn
3543 3677
3544@deffn Command reftex-search-document 3678@deffn Command reftex-search-document
3545Regexp search through all files of the current document. 3679Regexp search through all files of the current document.
3546Starts always in the master file. Stops when a match is found. 3680Starts always in the master file. Stops when a match is found.
3547No active TAGS table is required.@refill 3681No active TAGS table is required.
3548@end deffn 3682@end deffn
3549 3683
3550@deffn Command reftex-query-replace-document 3684@deffn Command reftex-query-replace-document
3551Run a query-replace-regexp of @var{from} with @var{to} over the entire 3685Run a query-replace-regexp of @var{from} with @var{to} over the entire
3552document. With prefix arg, replace only word-delimited matches. No 3686document. With prefix arg, replace only word-delimited matches. No
3553active TAGS table is required.@refill 3687active TAGS table is required.
3554@end deffn 3688@end deffn
3555 3689
3556@deffn Command reftex-goto-label 3690@deffn Command reftex-goto-label
@@ -3563,7 +3697,7 @@ another window.
3563@deffn Command reftex-change-label 3697@deffn Command reftex-change-label
3564Query replace @var{from} with @var{to} in all @code{\label} and 3698Query replace @var{from} with @var{to} in all @code{\label} and
3565@code{\ref} commands. Works on the entire multifile document. No 3699@code{\ref} commands. Works on the entire multifile document. No
3566active TAGS table is required.@refill 3700active TAGS table is required.
3567@end deffn 3701@end deffn
3568 3702
3569@deffn Command reftex-renumber-simple-labels 3703@deffn Command reftex-renumber-simple-labels
@@ -3575,11 +3709,19 @@ labels will be changed as well. For this, @b{Ref@TeX{}} looks at the
3575arguments of any macros which either start or end with the string 3709arguments of any macros which either start or end with the string
3576@samp{ref}. This command should be used with care, in particular in 3710@samp{ref}. This command should be used with care, in particular in
3577multifile documents. You should not use it if another document refers 3711multifile documents. You should not use it if another document refers
3578to this one with the @code{xr} package.@refill 3712to this one with the @code{xr} package.
3579@end deffn 3713@end deffn
3580 3714
3581@deffn Command reftex-find-duplicate-labels 3715@deffn Command reftex-find-duplicate-labels
3582Produce a list of all duplicate labels in the document.@refill 3716Produce a list of all duplicate labels in the document.
3717@end deffn
3718
3719@deffn Command reftex-create-bibtex-file
3720Create a new BibTeX database file with all entries referenced in document.
3721The command prompts for a filename and writes the collected entries to
3722that file. Only entries referenced in the current document with
3723any @code{\cite}-like macros are used.
3724The sequence in the new file is the same as it was in the old database.
3583@end deffn 3725@end deffn
3584 3726
3585@deffn Command reftex-customize 3727@deffn Command reftex-customize
@@ -3607,7 +3749,7 @@ Here is a complete list of @b{Ref@TeX{}}'s configuration variables. All
3607variables have customize support - so if you are not familiar with Emacs 3749variables have customize support - so if you are not familiar with Emacs
3608Lisp (and even if you are) you might find it more comfortable to use 3750Lisp (and even if you are) you might find it more comfortable to use
3609@code{customize} to look at and change these variables. @kbd{M-x 3751@code{customize} to look at and change these variables. @kbd{M-x
3610reftex-customize} will get you there.@refill 3752reftex-customize} will get you there.
3611 3753
3612@menu 3754@menu
3613* Options (Table of Contents):: 3755* Options (Table of Contents)::
@@ -3643,16 +3785,21 @@ Standard LaTeX needs 7, default is 12.
3643Commands and levels used for defining sections in the document. The 3785Commands and levels used for defining sections in the document. The
3644@code{car} of each cons cell is the name of the section macro. The 3786@code{car} of each cons cell is the name of the section macro. The
3645@code{cdr} is a number indicating its level. A negative level means the 3787@code{cdr} is a number indicating its level. A negative level means the
3646same as the positive value, but the section will never get a 3788same as the positive value, but the section will never get a number.
3647number. The @code{cdr} may also be a function which then has to return 3789The @code{cdr} may also be a function which then has to return the
3648the level.@refill 3790level. This list is also used for promotion and demption of sectioning
3791commands. If you are using a document class which has several sets of
3792sectioning commands, promotion only works correctly if this list is
3793sorted first by set, then within each set by level. The promotion
3794commands always select the nearest entry with the correct new level.
3795
3649@end defopt 3796@end defopt
3650 3797
3651@defopt reftex-toc-max-level 3798@defopt reftex-toc-max-level
3652The maximum level of toc entries which will be included in the TOC. 3799The maximum level of toc entries which will be included in the TOC.
3653Section headings with a bigger level will be ignored. In RefTeX, 3800Section headings with a bigger level will be ignored. In RefTeX,
3654chapters are level 1, sections level 2 etc. This variable can be 3801chapters are level 1, sections level 2 etc. This variable can be
3655changed from within the @file{*toc*} buffer with the @kbd{t} key.@refill 3802changed from within the @file{*toc*} buffer with the @kbd{t} key.
3656@end defopt 3803@end defopt
3657 3804
3658@defopt reftex-part-resets-chapter 3805@defopt reftex-part-resets-chapter
@@ -3664,11 +3811,21 @@ chapter counter and also do not show up in chapter numbers.
3664@end defopt 3811@end defopt
3665 3812
3666@defopt reftex-auto-recenter-toc 3813@defopt reftex-auto-recenter-toc
3667Non-@code{nil} means, initially turn automatic recentering of toc on. 3814Non-@code{nil} means, turn automatic recentering of @file{*TOC*} window on.
3668When active, the @file{*TOC*} buffer will always show the section you 3815When active, the @file{*TOC*} window will always show the section you
3669are currently working in. Recentering happens whenever Emacs is idle 3816are currently working in. Recentering happens whenever Emacs is idle for
3670for more than `reftex-idle-time' seconds. 3817more than @code{reftex-idle-time} seconds.
3671This feature can be turned on and off from the menu 3818
3819Value @code{t} means, turn on immediately when RefTeX gets started. Then,
3820recentering will work for any toc window created during the session.
3821
3822Value @code{frame} (the default) means, turn automatic recentering on
3823only while the dedicated TOC frame does exist, and do the recentering
3824only in that frame. So when creating that frame (with @kbd{d} key in an
3825ordinary TOC window), the automatic recentering is turned on. When the
3826frame gets destroyed, automatic recentering is turned off again.
3827
3828This feature can be turned on and off from the menu
3672(Ref->Options). 3829(Ref->Options).
3673@end defopt 3830@end defopt
3674 3831
@@ -3677,10 +3834,8 @@ Non-@code{nil} means, create TOC window by splitting window
3677horizontally. The default is to split vertically. 3834horizontally. The default is to split vertically.
3678@end defopt 3835@end defopt
3679 3836
3680@defopt reftex-toc-split-windows-horizontally-fraction 3837@defopt reftex-toc-split-windows-fraction
3681Fraction of the horizontal width of the frame to be used for TOC window. 3838Fraction of the width or height of the frame to be used for TOC window.
3682Only relevant when @code{reftex-toc-split-windows-horizontally} is
3683non-@code{nil}.
3684@end defopt 3839@end defopt
3685 3840
3686@defopt reftex-toc-keep-other-windows 3841@defopt reftex-toc-keep-other-windows
@@ -3688,19 +3843,19 @@ Non-@code{nil} means, split the selected window to display the
3688@file{*toc*} buffer. This helps to keep the window configuration, but 3843@file{*toc*} buffer. This helps to keep the window configuration, but
3689makes the @file{*toc*} small. When @code{nil}, all other windows except 3844makes the @file{*toc*} small. When @code{nil}, all other windows except
3690the selected one will be deleted, so that the @file{*toc*} window fills 3845the selected one will be deleted, so that the @file{*toc*} window fills
3691half the frame.@refill 3846half the frame.
3692@end defopt 3847@end defopt
3693 3848
3694@defopt reftex-toc-include-file-boundaries 3849@defopt reftex-toc-include-file-boundaries
3695Non-@code{nil} means, include file boundaries in @file{*toc*} buffer. 3850Non-@code{nil} means, include file boundaries in @file{*toc*} buffer.
3696This flag can be toggled from within the @file{*toc*} buffer with the 3851This flag can be toggled from within the @file{*toc*} buffer with the
3697@kbd{i} key.@refill 3852@kbd{i} key.
3698@end defopt 3853@end defopt
3699 3854
3700@defopt reftex-toc-include-labels 3855@defopt reftex-toc-include-labels
3701Non-@code{nil} means, include labels in @file{*toc*} buffer. This flag 3856Non-@code{nil} means, include labels in @file{*toc*} buffer. This flag
3702can be toggled from within the @file{*toc*} buffer with the @kbd{l} 3857can be toggled from within the @file{*toc*} buffer with the @kbd{l}
3703key.@refill 3858key.
3704@end defopt 3859@end defopt
3705 3860
3706@defopt reftex-toc-include-index-entries 3861@defopt reftex-toc-include-index-entries
@@ -3713,7 +3868,7 @@ This flag can be toggled from within the @file{*toc*} buffer with the
3713Non-@code{nil} means, include context with labels in the @file{*toc*} 3868Non-@code{nil} means, include context with labels in the @file{*toc*}
3714buffer. Context will only be shown if the labels are visible as well. 3869buffer. Context will only be shown if the labels are visible as well.
3715This flag can be toggled from within the @file{*toc*} buffer with the 3870This flag can be toggled from within the @file{*toc*} buffer with the
3716@kbd{c} key.@refill 3871@kbd{c} key.
3717@end defopt 3872@end defopt
3718 3873
3719@defopt reftex-toc-follow-mode 3874@defopt reftex-toc-follow-mode
@@ -3721,17 +3876,17 @@ Non-@code{nil} means, point in @file{*toc*} buffer (the
3721table-of-contents buffer) will cause other window to follow. The other 3876table-of-contents buffer) will cause other window to follow. The other
3722window will show the corresponding part of the document. This flag can 3877window will show the corresponding part of the document. This flag can
3723be toggled from within the @file{*toc*} buffer with the @kbd{f} 3878be toggled from within the @file{*toc*} buffer with the @kbd{f}
3724key.@refill 3879key.
3725@end defopt 3880@end defopt
3726 3881
3727@deffn {Normal Hook} reftex-toc-mode-hook 3882@deffn {Normal Hook} reftex-toc-mode-hook
3728Normal hook which is run when a @file{*toc*} buffer is 3883Normal hook which is run when a @file{*toc*} buffer is
3729created.@refill 3884created.
3730@end deffn 3885@end deffn
3731 3886
3732@deffn Keymap reftex-toc-map 3887@deffn Keymap reftex-toc-map
3733The keymap which is active in the @file{*toc*} buffer. 3888The keymap which is active in the @file{*toc*} buffer.
3734(@pxref{Table of Contents}).@refill 3889(@pxref{Table of Contents}).
3735@end deffn 3890@end deffn
3736 3891
3737@node Options (Defining Label Environments), Options (Creating Labels), Options (Table of Contents), Options 3892@node Options (Defining Label Environments), Options (Creating Labels), Options (Table of Contents), Options
@@ -3742,7 +3897,7 @@ The keymap which is active in the @file{*toc*} buffer.
3742@defopt reftex-default-label-alist-entries 3897@defopt reftex-default-label-alist-entries
3743Default label alist specifications. It is a list of symbols with 3898Default label alist specifications. It is a list of symbols with
3744associations in the constant @code{reftex-label-alist-builtin}. 3899associations in the constant @code{reftex-label-alist-builtin}.
3745@code{LaTeX} should always be the last entry.@refill 3900@code{LaTeX} should always be the last entry.
3746@end defopt 3901@end defopt
3747 3902
3748@defopt reftex-label-alist 3903@defopt reftex-label-alist
@@ -3750,7 +3905,7 @@ Set this variable to define additions and changes to the defaults in
3750@code{reftex-default-label-alist-entries}. The only things you 3905@code{reftex-default-label-alist-entries}. The only things you
3751@emph{must not} change is that @code{?s} is the type indicator for 3906@emph{must not} change is that @code{?s} is the type indicator for
3752section labels, and @key{SPC} for the @code{any} label type. These are 3907section labels, and @key{SPC} for the @code{any} label type. These are
3753hard-coded at other places in the code.@refill 3908hard-coded at other places in the code.
3754 3909
3755The value of the variable must be a list of items. Each item is a list 3910The value of the variable must be a list of items. Each item is a list
3756itself and has the following structure: 3911itself and has the following structure:
@@ -3763,7 +3918,7 @@ itself and has the following structure:
3763Each list entry describes either an environment carrying a counter for 3918Each list entry describes either an environment carrying a counter for
3764use with @code{\label} and @code{\ref}, or a LaTeX macro defining a 3919use with @code{\label} and @code{\ref}, or a LaTeX macro defining a
3765label as (or inside) one of its arguments. The elements of each list 3920label as (or inside) one of its arguments. The elements of each list
3766entry are:@refill 3921entry are:
3767 3922
3768@table @asis 3923@table @asis
3769@item @var{env-or-macro} 3924@item @var{env-or-macro}
@@ -3772,10 +3927,10 @@ Name of the environment (like @samp{table}) or macro (like
3772@samp{\myfig[]@{@}@{@}@{*@}@{@}}. Use square brackets for optional 3927@samp{\myfig[]@{@}@{@}@{*@}@{@}}. Use square brackets for optional
3773arguments, a star to mark the label argument, if any. The macro does 3928arguments, a star to mark the label argument, if any. The macro does
3774not have to have a label argument - you could also use 3929not have to have a label argument - you could also use
3775@samp{\label@{...@}} inside one of its arguments.@refill 3930@samp{\label@{...@}} inside one of its arguments.
3776 3931
3777Special names: @code{section} for section labels, @code{any} to define a 3932Special names: @code{section} for section labels, @code{any} to define a
3778group which contains all labels.@refill 3933group which contains all labels.
3779 3934
3780This may also be a function to do local parsing and identify point to be 3935This may also be a function to do local parsing and identify point to be
3781in a non-standard label environment. The function must take an 3936in a non-standard label environment. The function must take an
@@ -3783,11 +3938,11 @@ argument @var{bound} and limit backward searches to this value. It
3783should return either nil or a cons cell @code{(@var{function} 3938should return either nil or a cons cell @code{(@var{function}
3784. @var{position})} with the function symbol and the position where the 3939. @var{position})} with the function symbol and the position where the
3785special environment starts. See the Info documentation for an 3940special environment starts. See the Info documentation for an
3786example.@refill 3941example.
3787 3942
3788Finally this may also be @code{nil} if the entry is only meant to change 3943Finally this may also be @code{nil} if the entry is only meant to change
3789some settings associated with the type indicator character (see 3944some settings associated with the type indicator character (see
3790below).@refill 3945below).
3791 3946
3792@item @var{type-key} 3947@item @var{type-key}
3793Type indicator character, like @code{?t}, must be a printable ASCII 3948Type indicator character, like @code{?t}, must be a printable ASCII
@@ -3798,35 +3953,37 @@ list, to cover cases in which different environments carry the same
3798label type (like @code{equation} and @code{eqnarray}). If the type 3953label type (like @code{equation} and @code{eqnarray}). If the type
3799indicator is @code{nil} and the macro has a label argument @samp{@{*@}}, 3954indicator is @code{nil} and the macro has a label argument @samp{@{*@}},
3800the macro defines neutral labels just like @code{\label}. In this case 3955the macro defines neutral labels just like @code{\label}. In this case
3801the reminder of this entry is ignored.@refill 3956the reminder of this entry is ignored.
3802 3957
3803@item @var{label-prefix} 3958@item @var{label-prefix}
3804Label prefix string, like @samp{tab:}. The prefix is a short string 3959Label prefix string, like @samp{tab:}. The prefix is a short string
3805used as the start of a label. It may be the empty string. The prefix 3960used as the start of a label. It may be the empty string. The prefix
3806may contain the following @samp{%} escapes:@refill 3961may contain the following @samp{%} escapes:
3807 3962
3808@example 3963@example
3809%f Current file name, directory and extension stripped. 3964%f Current file name, directory and extension stripped.
3810%F Current file name relative to master file directory. 3965%F Current file name relative to master file directory.
3966%m Master file name, directory and extension stripped.
3967%M Directory name (without path) where master file is located.
3811%u User login name, on systems which support this. 3968%u User login name, on systems which support this.
3812%S A section prefix derived with variable @code{reftex-section-prefixes}. 3969%S A section prefix derived with variable @code{reftex-section-prefixes}.
3813@end example 3970@end example
3814 3971
3815@noindent 3972@noindent
3816Example: In a file @file{intro.tex}, @samp{eq:%f:} will become 3973Example: In a file @file{intro.tex}, @samp{eq:%f:} will become
3817@samp{eq:intro:}.@refill 3974@samp{eq:intro:}.
3818 3975
3819@item @var{reference-format} 3976@item @var{reference-format}
3820Format string for reference insert in buffer. @samp{%s} will be 3977Format string for reference insert in buffer. @samp{%s} will be
3821replaced by the label. When the format starts with @samp{~}, this 3978replaced by the label. When the format starts with @samp{~}, this
3822@samp{~} will only be inserted when the character before point is 3979@samp{~} will only be inserted when the character before point is
3823@emph{not} a whitespace.@refill 3980@emph{not} a whitespace.
3824 3981
3825@item @var{context-method} 3982@item @var{context-method}
3826Indication on how to find the short context. 3983Indication on how to find the short context.
3827@itemize @minus 3984@itemize @minus
3828@item 3985@item
3829If @code{nil}, use the text following the @samp{\label@{...@}} macro.@refill 3986If @code{nil}, use the text following the @samp{\label@{...@}} macro.
3830@item 3987@item
3831If @code{t}, use 3988If @code{t}, use
3832@itemize @minus 3989@itemize @minus
@@ -3835,32 +3992,32 @@ the section heading for section labels.
3835@item 3992@item
3836text following the @samp{\begin@{...@}} statement of environments (not 3993text following the @samp{\begin@{...@}} statement of environments (not
3837a good choice for environments like eqnarray or enumerate, where one has 3994a good choice for environments like eqnarray or enumerate, where one has
3838several labels in a single environment).@refill 3995several labels in a single environment).
3839@item 3996@item
3840text after the macro name (starting with the first arg) for 3997text after the macro name (starting with the first arg) for
3841macros.@refill 3998macros.
3842@end itemize 3999@end itemize
3843@item 4000@item
3844If an integer, use the nth argument of the macro. As a special case, 4001If an integer, use the nth argument of the macro. As a special case,
38451000 means to get text after the last macro argument.@refill 40021000 means to get text after the last macro argument.
3846@item 4003@item
3847If a string, use as regexp to search @emph{backward} from the label. 4004If a string, use as regexp to search @emph{backward} from the label.
3848Context is then the text following the end of the match. E.g. putting 4005Context is then the text following the end of the match. E.g. putting
3849this to @samp{\\caption[[@{]} will use the caption in a figure or table 4006this to @samp{\\caption[[@{]} will use the caption in a figure or table
3850environment. @samp{\\begin@{eqnarray@}\|\\\\} works for 4007environment. @samp{\\begin@{eqnarray@}\|\\\\} works for
3851eqnarrays.@refill 4008eqnarrays.
3852@item 4009@item
3853If any of @code{caption}, @code{item}, @code{eqnarray-like}, 4010If any of @code{caption}, @code{item}, @code{eqnarray-like},
3854@code{alignat-like}, this symbol will internally be translated into an 4011@code{alignat-like}, this symbol will internally be translated into an
3855appropriate regexp (see also the variable 4012appropriate regexp (see also the variable
3856@code{reftex-default-context-regexps}).@refill 4013@code{reftex-default-context-regexps}).
3857@item 4014@item
3858If a function, call this function with the name of the environment/macro 4015If a function, call this function with the name of the environment/macro
3859as argument. On call, point will be just after the @code{\label} macro. 4016as argument. On call, point will be just after the @code{\label} macro.
3860The function is expected to return a suitable context string. It should 4017The function is expected to return a suitable context string. It should
3861throw an exception (error) when failing to find context. As an example, 4018throw an exception (error) when failing to find context. As an example,
3862here is a function returning the 10 chars following the label macro as 4019here is a function returning the 10 chars following the label macro as
3863context:@refill 4020context:
3864 4021
3865@example 4022@example
3866(defun my-context-function (env-or-mac) 4023(defun my-context-function (env-or-mac)
@@ -3875,7 +4032,7 @@ menu, and to derive a label string. If you want to use a different
3875method for each of these, specify them as a dotted pair. 4032method for each of these, specify them as a dotted pair.
3876E.g. @code{(nil . t)} uses the text after the label (@code{nil}) for 4033E.g. @code{(nil . t)} uses the text after the label (@code{nil}) for
3877display, and text from the default position (@code{t}) to derive a label 4034display, and text from the default position (@code{t}) to derive a label
3878string. This is actually used for section labels.@refill 4035string. This is actually used for section labels.
3879 4036
3880@item @var{magic-word-list} 4037@item @var{magic-word-list}
3881List of magic words which identify a reference to be of this type. If 4038List of magic words which identify a reference to be of this type. If
@@ -3883,7 +4040,7 @@ the word before point is equal to one of these words when calling
3883@code{reftex-reference}, the label list offered will be automatically 4040@code{reftex-reference}, the label list offered will be automatically
3884restricted to labels of the correct type. If the first element of this 4041restricted to labels of the correct type. If the first element of this
3885word--list is the symbol `regexp', the strings are interpreted as regular 4042word--list is the symbol `regexp', the strings are interpreted as regular
3886expressions.@refill 4043expressions.
3887 4044
3888@item @var{toc-level} 4045@item @var{toc-level}
3889The integer level at which this environment should be added to the table 4046The integer level at which this environment should be added to the table
@@ -3892,11 +4049,11 @@ will number the entries mixed with the sectioning commands of the same
3892level. A negative value will make unnumbered entries. Useful only for 4049level. A negative value will make unnumbered entries. Useful only for
3893theorem-like environments which structure the document. Will be ignored 4050theorem-like environments which structure the document. Will be ignored
3894for macros. When omitted or @code{nil}, no TOC entries will be 4051for macros. When omitted or @code{nil}, no TOC entries will be
3895made.@refill 4052made.
3896@end table 4053@end table
3897 4054
3898If the type indicator characters of two or more entries are the same, 4055If the type indicator characters of two or more entries are the same,
3899@b{Ref@TeX{}} will use@refill 4056@b{Ref@TeX{}} will use
3900@itemize @minus 4057@itemize @minus
3901@item 4058@item
3902the first non-@code{nil} format and prefix 4059the first non-@code{nil} format and prefix
@@ -3907,7 +4064,7 @@ the magic words of all involved entries.
3907Any list entry may also be a symbol. If that has an association in 4064Any list entry may also be a symbol. If that has an association in
3908@code{reftex-label-alist-builtin}, the @code{cddr} of that association is 4065@code{reftex-label-alist-builtin}, the @code{cddr} of that association is
3909spliced into the list. However, builtin defaults should normally be set 4066spliced into the list. However, builtin defaults should normally be set
3910with the variable @code{reftex-default-label-alist-entries}.@refill 4067with the variable @code{reftex-default-label-alist-entries}.
3911@end defopt 4068@end defopt
3912 4069
3913@defopt reftex-section-prefixes 4070@defopt reftex-section-prefixes
@@ -3924,7 +4081,39 @@ names like @samp{chapter}, integer section levels (as given in
3924Alist with default regular expressions for finding context. The emacs 4081Alist with default regular expressions for finding context. The emacs
3925lisp form @w{@code{(format regexp (regexp-quote environment))}} is used 4082lisp form @w{@code{(format regexp (regexp-quote environment))}} is used
3926to calculate the final regular expression - so @samp{%s} will be 4083to calculate the final regular expression - so @samp{%s} will be
3927replaced with the environment or macro.@refill 4084replaced with the environment or macro.
4085@end defopt
4086
4087@defopt reftex-trust-label-prefix
4088Non-@code{nil} means, trust the label prefix when determining label type.
4089It is customary to use special label prefixes to distinguish different label
4090types. The label prefixes have no syntactic meaning in LaTeX (unless
4091special packages like fancyref) are being used. RefTeX can and by
4092default does parse around each label to detect the correct label type,
4093but this process can be slow when a document contains thousands of
4094labels. If you use label prefixes consistently, you may speed up
4095document parsing by setting this variable to a non-nil value. RefTeX
4096will then compare the label prefix with the prefixes found in
4097`reftex-label-alist' and derive the correct label type in this way.
4098Possible values for this option are:
4099
4100@example
4101t @r{This means to trust any label prefixes found.}
4102regexp @r{If a regexp, only prefixes matched by the regexp are trusted.}
4103list @r{List of accepted prefixes, as strings. The colon is part of}
4104 @r{the prefix, e.g. ("fn:" "eqn:" "item:").}
4105nil @r{Never trust a label prefix.}
4106@end example
4107The only disadvantage of using this feature is that the label context
4108displayed in the label selection buffer along with each label is
4109simply some text after the label definition. This is no problem if you
4110place labels keeping this in mind (e.g. @i{before} the equation, @i{at
4111the beginning} of a fig/tab caption ...). Anyway, it is probably best
4112to use the regexp or the list value types to fine-tune this feature.
4113For example, if your document contains thousands of footnotes with
4114labels fn:xxx, you may want to set this variable to the value "^fn:$" or
4115("fn:"). Then RefTeX will still do extensive parsing for any
4116non-footnote labels.
3928@end defopt 4117@end defopt
3929 4118
3930@node Options (Creating Labels), Options (Referencing Labels), Options (Defining Label Environments), Options 4119@node Options (Creating Labels), Options (Referencing Labels), Options (Defining Label Environments), Options
@@ -3945,14 +4134,14 @@ the section heading. The conversion of the context to a legal label is
3945governed by the specifications given in 4134governed by the specifications given in
3946@code{reftex-derive-label-parameters}. If @var{derive} is @code{nil}, 4135@code{reftex-derive-label-parameters}. If @var{derive} is @code{nil},
3947the default label will consist of the prefix and a unique number, like 4136the default label will consist of the prefix and a unique number, like
3948@samp{eq:23}.@refill 4137@samp{eq:23}.
3949 4138
3950If @var{prompt} is @code{t}, the user will be prompted for a label 4139If @var{prompt} is @code{t}, the user will be prompted for a label
3951string. When @var{prompt} is @code{nil}, the default label will be 4140string. When @var{prompt} is @code{nil}, the default label will be
3952inserted without query.@refill 4141inserted without query.
3953 4142
3954So the combination of @var{derive} and @var{prompt} controls label 4143So the combination of @var{derive} and @var{prompt} controls label
3955insertion. Here is a table describing all four possibilities:@refill 4144insertion. Here is a table describing all four possibilities:
3956 4145
3957@example 4146@example
3958@group 4147@group
@@ -3970,12 +4159,12 @@ letters indicating the label types for which it should be true. Thus,
3970the combination may be set differently for each label type. The default 4159the combination may be set differently for each label type. The default
3971settings @samp{"s"} and @samp{"sft"} mean: Derive section labels from 4160settings @samp{"s"} and @samp{"sft"} mean: Derive section labels from
3972headings (with confirmation). Prompt for figure and table labels. Use 4161headings (with confirmation). Prompt for figure and table labels. Use
3973simple labels without confirmation for everything else.@refill 4162simple labels without confirmation for everything else.
3974 4163
3975The available label types are: @code{s} (section), @code{f} (figure), 4164The available label types are: @code{s} (section), @code{f} (figure),
3976@code{t} (table), @code{i} (item), @code{e} (equation), @code{n} 4165@code{t} (table), @code{i} (item), @code{e} (equation), @code{n}
3977(footnote), @code{N} (endnote) plus any definitions in 4166(footnote), @code{N} (endnote) plus any definitions in
3978@code{reftex-label-alist}.@refill 4167@code{reftex-label-alist}.
3979@end defopt 4168@end defopt
3980 4169
3981@deffn Hook reftex-format-label-function 4170@deffn Hook reftex-format-label-function
@@ -3983,13 +4172,13 @@ If non-@code{nil}, should be a function which produces the string to
3983insert as a label definition. The function will be called with two 4172insert as a label definition. The function will be called with two
3984arguments, the @var{label} and the @var{default-format} (usually 4173arguments, the @var{label} and the @var{default-format} (usually
3985@samp{\label@{%s@}}). It should return the string to insert into the 4174@samp{\label@{%s@}}). It should return the string to insert into the
3986buffer.@refill 4175buffer.
3987@end deffn 4176@end deffn
3988 4177
3989@deffn Hook reftex-string-to-label-function 4178@deffn Hook reftex-string-to-label-function
3990Function to turn an arbitrary string into a legal label. 4179Function to turn an arbitrary string into a legal label.
3991@b{Ref@TeX{}}'s default function uses the variable 4180@b{Ref@TeX{}}'s default function uses the variable
3992@code{reftex-derive-label-parameters}.@refill 4181@code{reftex-derive-label-parameters}.
3993@end deffn 4182@end deffn
3994 4183
3995@deffn Hook reftex-translate-to-ascii-function 4184@deffn Hook reftex-translate-to-ascii-function
@@ -3998,12 +4187,12 @@ derive a label from it. The intended application is to convert ISO or
3998Mule characters into something legal in labels. The default function 4187Mule characters into something legal in labels. The default function
3999@code{reftex-latin1-to-ascii} removes the accents from Latin-1 4188@code{reftex-latin1-to-ascii} removes the accents from Latin-1
4000characters. X-Symbol (>=2.6) sets this variable to the much more 4189characters. X-Symbol (>=2.6) sets this variable to the much more
4001general @code{x-symbol-translate-to-ascii}.@refill 4190general @code{x-symbol-translate-to-ascii}.
4002@end deffn 4191@end deffn
4003 4192
4004@defopt reftex-derive-label-parameters 4193@defopt reftex-derive-label-parameters
4005Parameters for converting a string into a label. This variable is a 4194Parameters for converting a string into a label. This variable is a
4006list of the following items:@refill 4195list of the following items:
4007@table @asis 4196@table @asis
4008@item @var{nwords} 4197@item @var{nwords}
4009Number of words to use. 4198Number of words to use.
@@ -4030,16 +4219,16 @@ Regexp matching characters not legal in labels.
4030@end defopt 4219@end defopt
4031 4220
4032@defopt reftex-abbrev-parameters 4221@defopt reftex-abbrev-parameters
4033Parameters for abbreviation of words. A list of four parameters.@refill 4222Parameters for abbreviation of words. A list of four parameters.
4034@table @asis 4223@table @asis
4035@item @var{min-chars} 4224@item @var{min-chars}
4036Minimum number of characters remaining after abbreviation. 4225Minimum number of characters remaining after abbreviation.
4037@item @var{min-kill} 4226@item @var{min-kill}
4038Minimum number of characters to remove when abbreviating words.@refill 4227Minimum number of characters to remove when abbreviating words.
4039@item @var{before} 4228@item @var{before}
4040Character class before abbrev point in word.@refill 4229Character class before abbrev point in word.
4041@item @var{after} 4230@item @var{after}
4042Character class after abbrev point in word.@refill 4231Character class after abbrev point in word.
4043@end table 4232@end table
4044@end defopt 4233@end defopt
4045 4234
@@ -4052,21 +4241,21 @@ Character class after abbrev point in word.@refill
4052List of flags governing the label menu makeup. The flags are: 4241List of flags governing the label menu makeup. The flags are:
4053@table @asis 4242@table @asis
4054@item @var{table-of-contents} 4243@item @var{table-of-contents}
4055Show the labels embedded in a table of context.@refill 4244Show the labels embedded in a table of context.
4056@item @var{section-numbers} 4245@item @var{section-numbers}
4057Include section numbers (like 4.1.3) in table of contents.@refill 4246Include section numbers (like 4.1.3) in table of contents.
4058@item @var{counters} 4247@item @var{counters}
4059Show counters. This just numbers the labels in the menu.@refill 4248Show counters. This just numbers the labels in the menu.
4060@item @var{no-context} 4249@item @var{no-context}
4061Non-@code{nil} means do @emph{not} show the short context.@refill 4250Non-@code{nil} means do @emph{not} show the short context.
4062@item @var{follow} 4251@item @var{follow}
4063Follow full context in other window.@refill 4252Follow full context in other window.
4064@item @var{show-commented} 4253@item @var{show-commented}
4065Show labels from regions which are commented out.@refill 4254Show labels from regions which are commented out.
4066@item @var{match-everywhere} 4255@item @var{match-everywhere}
4067Obsolete flag.@refill 4256Obsolete flag.
4068@item @var{show-files} 4257@item @var{show-files}
4069Show begin and end of included files.@refill 4258Show begin and end of included files.
4070@end table 4259@end table
4071 4260
4072Each of these flags can be set to @code{t} or @code{nil}, or to a string 4261Each of these flags can be set to @code{t} or @code{nil}, or to a string
@@ -4074,15 +4263,15 @@ of type letters indicating the label types for which it should be true.
4074These strings work like character classes in regular expressions. Thus, 4263These strings work like character classes in regular expressions. Thus,
4075setting one of the flags to @samp{"sf"} makes the flag true for section 4264setting one of the flags to @samp{"sf"} makes the flag true for section
4076and figure labels, @code{nil} for everything else. Setting it to 4265and figure labels, @code{nil} for everything else. Setting it to
4077@samp{"^sf"} makes it the other way round.@refill 4266@samp{"^sf"} makes it the other way round.
4078 4267
4079The available label types are: @code{s} (section), @code{f} (figure), 4268The available label types are: @code{s} (section), @code{f} (figure),
4080@code{t} (table), @code{i} (item), @code{e} (equation), @code{n} 4269@code{t} (table), @code{i} (item), @code{e} (equation), @code{n}
4081(footnote), plus any definitions in @code{reftex-label-alist}.@refill 4270(footnote), plus any definitions in @code{reftex-label-alist}.
4082 4271
4083Most options can also be switched from the label menu itself - so if you 4272Most options can also be switched from the label menu itself - so if you
4084decide here to not have a table of contents in the label menu, you can 4273decide here to not have a table of contents in the label menu, you can
4085still get one interactively during selection from the label menu.@refill 4274still get one interactively during selection from the label menu.
4086@end defopt 4275@end defopt
4087 4276
4088@defopt reftex-multiref-punctuation 4277@defopt reftex-multiref-punctuation
@@ -4092,7 +4281,7 @@ associates the 3 marking characters @samp{,-+} with prefix strings to be
4092inserted into the buffer before the corresponding @code{\ref} macro. 4281inserted into the buffer before the corresponding @code{\ref} macro.
4093This is used to string together whole reference sets, like 4282This is used to string together whole reference sets, like
4094@samp{eqs. 1,2,3-5,6 and 7} in a single call to 4283@samp{eqs. 1,2,3-5,6 and 7} in a single call to
4095@code{reftex-reference}.@refill 4284@code{reftex-reference}.
4096@end defopt 4285@end defopt
4097 4286
4098@defopt reftex-vref-is-default 4287@defopt reftex-vref-is-default
@@ -4102,7 +4291,7 @@ macro between @code{\ref} and @code{\vref}. The value of this variable
4102determines the default which is active when entering the selection 4291determines the default which is active when entering the selection
4103process. Instead of @code{nil} or @code{t}, this may also be a string 4292process. Instead of @code{nil} or @code{t}, this may also be a string
4104of type letters indicating the label types for which it should be 4293of type letters indicating the label types for which it should be
4105true.@refill 4294true.
4106@end defopt 4295@end defopt
4107 4296
4108@defopt reftex-fref-is-default 4297@defopt reftex-fref-is-default
@@ -4123,11 +4312,11 @@ special commands to insert @code{\vref} and @code{\fref} references, so
4123even if you set this, your setting will be ignored by the special 4312even if you set this, your setting will be ignored by the special
4124commands. The function will be called with two arguments, the 4313commands. The function will be called with two arguments, the
4125@var{label} and the @var{default-format} (usually @samp{~\ref@{%s@}}). 4314@var{label} and the @var{default-format} (usually @samp{~\ref@{%s@}}).
4126It should return the string to insert into the buffer.@refill 4315It should return the string to insert into the buffer.
4127@end deffn 4316@end deffn
4128 4317
4129@defopt reftex-level-indent 4318@defopt reftex-level-indent
4130Number of spaces to be used for indentation per section level.@refill 4319Number of spaces to be used for indentation per section level.
4131@end defopt 4320@end defopt
4132 4321
4133@defopt reftex-guess-label-type 4322@defopt reftex-guess-label-type
@@ -4137,29 +4326,29 @@ cursor and compare it with the magic words given in
4137@code{reftex-label-alist}. When it finds a match, @b{Ref@TeX{}} will 4326@code{reftex-label-alist}. When it finds a match, @b{Ref@TeX{}} will
4138immediately offer the correct label menu - otherwise it will prompt you 4327immediately offer the correct label menu - otherwise it will prompt you
4139for a label type. If you set this variable to @code{nil}, @b{Ref@TeX{}} 4328for a label type. If you set this variable to @code{nil}, @b{Ref@TeX{}}
4140will always prompt for a label type.@refill 4329will always prompt for a label type.
4141@end defopt 4330@end defopt
4142 4331
4143@deffn {Normal Hook} reftex-display-copied-context-hook 4332@deffn {Normal Hook} reftex-display-copied-context-hook
4144Normal Hook which is run before context is displayed anywhere. Designed 4333Normal Hook which is run before context is displayed anywhere. Designed
4145for @w{@code{X-Symbol}}, but may have other uses as well.@refill 4334for @w{@code{X-Symbol}}, but may have other uses as well.
4146@end deffn 4335@end deffn
4147 4336
4148@deffn Hook reftex-pre-refontification-functions 4337@deffn Hook reftex-pre-refontification-functions
4149@code{X-Symbol} specific hook. Probably not useful for other purposes. 4338@code{X-Symbol} specific hook. Probably not useful for other purposes.
4150The functions get two arguments, the buffer from where the command 4339The functions get two arguments, the buffer from where the command
4151started and a symbol indicating in what context the hook is 4340started and a symbol indicating in what context the hook is
4152called.@refill 4341called.
4153@end deffn 4342@end deffn
4154 4343
4155@deffn {Normal Hook} reftex-select-label-mode-hook 4344@deffn {Normal Hook} reftex-select-label-mode-hook
4156Normal hook which is run when a selection buffer enters 4345Normal hook which is run when a selection buffer enters
4157@code{reftex-select-label-mode}.@refill 4346@code{reftex-select-label-mode}.
4158@end deffn 4347@end deffn
4159 4348
4160@deffn Keymap reftex-select-label-map 4349@deffn Keymap reftex-select-label-map
4161The keymap which is active in the labels selection process 4350The keymap which is active in the labels selection process
4162(@pxref{Referencing Labels}).@refill 4351(@pxref{Referencing Labels}).
4163@end deffn 4352@end deffn
4164 4353
4165@node Options (Creating Citations), Options (Index Support), Options (Referencing Labels), Options 4354@node Options (Creating Citations), Options (Index Support), Options (Referencing Labels), Options
@@ -4176,7 +4365,7 @@ List of regular expressions to exclude files in
4176@code{\\bibliography@{..@}}. File names matched by any of these regexps 4365@code{\\bibliography@{..@}}. File names matched by any of these regexps
4177will not be parsed. Intended for files which contain only 4366will not be parsed. Intended for files which contain only
4178@code{@@string} macro definitions and the like, which are ignored by 4367@code{@@string} macro definitions and the like, which are ignored by
4179@b{Ref@TeX{}} anyway.@refill 4368@b{Ref@TeX{}} anyway.
4180@end defopt 4369@end defopt
4181 4370
4182@defopt reftex-default-bibliography 4371@defopt reftex-default-bibliography
@@ -4185,12 +4374,12 @@ When @code{reftex-citation} is called from a document with neither
4185a @samp{\bibliography@{...@}} statement nor a @code{thebibliography} 4374a @samp{\bibliography@{...@}} statement nor a @code{thebibliography}
4186environment, @b{Ref@TeX{}} will scan these files instead. Intended for 4375environment, @b{Ref@TeX{}} will scan these files instead. Intended for
4187using @code{reftex-citation} in non-LaTeX files. The files will be 4376using @code{reftex-citation} in non-LaTeX files. The files will be
4188searched along the BIBINPUTS or TEXBIB path.@refill 4377searched along the BIBINPUTS or TEXBIB path.
4189@end defopt 4378@end defopt
4190 4379
4191@defopt reftex-sort-bibtex-matches 4380@defopt reftex-sort-bibtex-matches
4192Sorting of the entries found in BibTeX databases by reftex-citation. 4381Sorting of the entries found in BibTeX databases by reftex-citation.
4193Possible values:@refill 4382Possible values:
4194@example 4383@example
4195nil @r{Do not sort entries.} 4384nil @r{Do not sort entries.}
4196author @r{Sort entries by author name.} 4385author @r{Sort entries by author name.}
@@ -4203,10 +4392,10 @@ reverse-year @r{Sort entries by decreasing year.}
4203The format of citations to be inserted into the buffer. It can be a 4392The format of citations to be inserted into the buffer. It can be a
4204string, an alist or a symbol. In the simplest case this is just the string 4393string, an alist or a symbol. In the simplest case this is just the string
4205@samp{\cite@{%l@}}, which is also the default. See the definition of 4394@samp{\cite@{%l@}}, which is also the default. See the definition of
4206@code{reftex-cite-format-builtin} for more complex examples.@refill 4395@code{reftex-cite-format-builtin} for more complex examples.
4207 4396
4208If @code{reftex-cite-format} is a string, it will be used as the format. 4397If @code{reftex-cite-format} is a string, it will be used as the format.
4209In the format, the following percent escapes will be expanded.@refill 4398In the format, the following percent escapes will be expanded.
4210 4399
4211@table @code 4400@table @code
4212@item %l 4401@item %l
@@ -4219,7 +4408,7 @@ Like %a, but abbreviate more than 2 authors like Jones et al.
4219First author name only. 4408First author name only.
4220@item %e 4409@item %e
4221Works like @samp{%a}, but on list of editor names. (@samp{%2e} and 4410Works like @samp{%a}, but on list of editor names. (@samp{%2e} and
4222@samp{%E} work a well).@refill 4411@samp{%E} work a well).
4223@end table 4412@end table
4224 4413
4225It is also possible to access all other BibTeX database fields: 4414It is also possible to access all other BibTeX database fields:
@@ -4235,71 +4424,91 @@ It is also possible to access all other BibTeX database fields:
4235 4424
4236@noindent 4425@noindent
4237Usually, only @samp{%l} is needed. The other stuff is mainly for the 4426Usually, only @samp{%l} is needed. The other stuff is mainly for the
4238echo area display, and for @code{(setq reftex-comment-citations t)}.@refill 4427echo area display, and for @code{(setq reftex-comment-citations t)}.
4239 4428
4240@samp{%<} as a special operator kills punctuation and space around it 4429@samp{%<} as a special operator kills punctuation and space around it
4241after the string has been formatted.@refill 4430after the string has been formatted.
4431
4432A pair of square brackets indicates an optional argument, and RefTeX
4433will prompt for the values of these arguments.
4242 4434
4243Beware that all this only works with BibTeX database files. When 4435Beware that all this only works with BibTeX database files. When
4244citations are made from the @code{\bibitems} in an explicit 4436citations are made from the @code{\bibitems} in an explicit
4245@code{thebibliography} environment, only @samp{%l} is available.@refill 4437@code{thebibliography} environment, only @samp{%l} is available.
4246 4438
4247If @code{reftex-cite-format} is an alist of characters and strings, the 4439If @code{reftex-cite-format} is an alist of characters and strings, the
4248user will be prompted for a character to select one of the possible 4440user will be prompted for a character to select one of the possible
4249format strings.@refill 4441format strings.
4250 4442
4251In order to configure this variable, you can either set 4443In order to configure this variable, you can either set
4252@code{reftex-cite-format} directly yourself or set it to the 4444@code{reftex-cite-format} directly yourself or set it to the
4253@emph{symbol} of one of the predefined styles. The predefined symbols 4445@emph{symbol} of one of the predefined styles. The predefined symbols
4254are those which have an association in the constant 4446are those which have an association in the constant
4255@code{reftex-cite-format-builtin}) E.g.: @code{(setq reftex-cite-format 4447@code{reftex-cite-format-builtin}) E.g.: @code{(setq reftex-cite-format
4256'natbib)}.@refill 4448'natbib)}.
4257@end defopt 4449@end defopt
4258 4450
4259@deffn Hook reftex-format-cite-function 4451@deffn Hook reftex-format-cite-function
4260
4261If non-@code{nil}, should be a function which produces the string to 4452If non-@code{nil}, should be a function which produces the string to
4262insert as a citation. Note that the citation format can also be changed 4453insert as a citation. Note that the citation format can also be changed
4263with the variable @code{reftex-cite-format}. The function will be 4454with the variable @code{reftex-cite-format}. The function will be
4264called with two arguments, the @var{citation-key} and the 4455called with two arguments, the @var{citation-key} and the
4265@var{default-format} (taken from @code{reftex-cite-format}). It should 4456@var{default-format} (taken from @code{reftex-cite-format}). It should
4266return the string to insert into the buffer.@refill 4457return the string to insert into the buffer.
4267@end deffn 4458@end deffn
4268 4459
4460@defopt reftex-cite-prompt-optional-args
4461Non-@code{nil} means, prompt for empty optional arguments in cite macros.
4462When an entry in @code{reftex-cite-format} ist given with square brackets to
4463indicate optional arguments (for example @samp{\\cite[][]@{%l@}}), RefTeX can
4464prompt for values. Possible values are:
4465@example
4466nil @r{Never prompt for optional arguments}
4467t @r{Always prompt}
4468maybe @r{Prompt only if @code{reftex-citation} was called with C-u prefix arg}@end example
4469Unnecessary empty optional arguments are removed before insertion into
4470the buffer. See @code{reftex-cite-cleanup-optional-args}.
4471@end defopt
4472
4473@defopt reftex-cite-cleanup-optional-args
4474Non-@code{nil} means, remove empty optional arguments from cite macros
4475if possible.
4476@end defopt
4477
4269@defopt reftex-comment-citations 4478@defopt reftex-comment-citations
4270Non-@code{nil} means add a comment for each citation describing the full 4479Non-@code{nil} means add a comment for each citation describing the full
4271entry. The comment is formatted according to 4480entry. The comment is formatted according to
4272@code{reftex-cite-comment-format}.@refill 4481@code{reftex-cite-comment-format}.
4273@end defopt 4482@end defopt
4274 4483
4275@defopt reftex-cite-comment-format 4484@defopt reftex-cite-comment-format
4276Citation format used for commented citations. Must @emph{not} contain 4485Citation format used for commented citations. Must @emph{not} contain
4277@samp{%l}. See the variable @code{reftex-cite-format} for possible 4486@samp{%l}. See the variable @code{reftex-cite-format} for possible
4278percent escapes.@refill 4487percent escapes.
4279@end defopt 4488@end defopt
4280 4489
4281@defopt reftex-cite-punctuation 4490@defopt reftex-cite-punctuation
4282Punctuation for formatting of name lists in citations. This is a list 4491Punctuation for formatting of name lists in citations. This is a list
4283of 3 strings.@refill 4492of 3 strings.
4284@enumerate 4493@enumerate
4285@item 4494@item
4286normal names separator, like @samp{, } in Jones, Brown and Miller 4495normal names separator, like @samp{, } in Jones, Brown and Miller
4287@item 4496@item
4288final names separator, like @samp{ and } in Jones, Brown and Miller 4497final names separator, like @samp{ and } in Jones, Brown and Miller
4289@item 4498@item
4290The @samp{et al.} string, like @samp{ @{\it et al.@}} in 4499The @samp{et al.} string, like @samp{ @{\it et al.@}} in
4291Jones @{\it et al.@} 4500Jones @{\it et al.@}
4292@end enumerate 4501@end enumerate
4293@end defopt 4502@end defopt
4294 4503
4295@deffn {Normal Hook} reftex-select-bib-mode-hook 4504@deffn {Normal Hook} reftex-select-bib-mode-hook
4296Normal hook which is run when a selection buffer enters 4505Normal hook which is run when a selection buffer enters
4297@code{reftex-select-bib-mode}.@refill 4506@code{reftex-select-bib-mode}.
4298@end deffn 4507@end deffn
4299 4508
4300@deffn Keymap reftex-select-bib-map 4509@deffn Keymap reftex-select-bib-map
4301The keymap which is active in the citation-key selection process 4510The keymap which is active in the citation-key selection process
4302(@pxref{Creating Citations}).@refill 4511(@pxref{Creating Citations}).
4303@end deffn 4512@end deffn
4304 4513
4305@node Options (Index Support), Options (Viewing Cross-References), Options (Creating Citations), Options 4514@node Options (Index Support), Options (Viewing Cross-References), Options (Creating Citations), Options
@@ -4313,12 +4522,12 @@ is resource intensive and the internal structure holding the parsed
4313information can become quite big. Therefore it can be turned off. When 4522information can become quite big. Therefore it can be turned off. When
4314this is @code{nil} and you execute a command which requires index 4523this is @code{nil} and you execute a command which requires index
4315support, you will be asked for confirmation to turn it on and rescan the 4524support, you will be asked for confirmation to turn it on and rescan the
4316document.@refill 4525document.
4317@end defopt 4526@end defopt
4318 4527
4319@defopt reftex-index-special-chars 4528@defopt reftex-index-special-chars
4320List of special characters in index entries, given as strings. These 4529List of special characters in index entries, given as strings. These
4321correspond to the @code{MakeIndex} keywords 4530correspond to the @code{MakeIndex} keywords
4322@code{(@var{level} @var{encap} @var{actual} @var{quote} @var{escape})}. 4531@code{(@var{level} @var{encap} @var{actual} @var{quote} @var{escape})}.
4323@end defopt 4532@end defopt
4324 4533
@@ -4331,35 +4540,35 @@ is
4331 4540
4332@var{macro} is the macro. Arguments should be denoted by empty braces, 4541@var{macro} is the macro. Arguments should be denoted by empty braces,
4333as for example in @samp{\index[]@{*@}}. Use square brackets to denote 4542as for example in @samp{\index[]@{*@}}. Use square brackets to denote
4334optional arguments. The star marks where the index key is.@refill 4543optional arguments. The star marks where the index key is.
4335 4544
4336@var{index-tag} is a short name of the index. @samp{idx} and @samp{glo} 4545@var{index-tag} is a short name of the index. @samp{idx} and @samp{glo}
4337are reserved for the default index and the glossary. Other indices can 4546are reserved for the default index and the glossary. Other indices can
4338be defined as well. If this is an integer, the Nth argument of the 4547be defined as well. If this is an integer, the Nth argument of the
4339macro holds the index tag.@refill 4548macro holds the index tag.
4340 4549
4341@var{key} is a character which is used to identify the macro for input 4550@var{key} is a character which is used to identify the macro for input
4342with @code{reftex-index}. @samp{?i}, @samp{?I}, and @samp{?g} are 4551with @code{reftex-index}. @samp{?i}, @samp{?I}, and @samp{?g} are
4343reserved for default index and glossary.@refill 4552reserved for default index and glossary.
4344 4553
4345@var{prefix} can be a prefix which is added to the @var{key} part of the 4554@var{prefix} can be a prefix which is added to the @var{key} part of the
4346index entry. If you have a macro 4555index entry. If you have a macro
4347@code{\newcommand@{\molec@}[1]@{#1\index@{Molecules!#1@}}, this prefix 4556@code{\newcommand@{\molec@}[1]@{#1\index@{Molecules!#1@}}, this prefix
4348should be @samp{Molecules!}.@refill 4557should be @samp{Molecules!}.
4349 4558
4350@var{exclude} can be a function. If this function exists and returns a 4559@var{exclude} can be a function. If this function exists and returns a
4351non-@code{nil} value, the index entry at point is ignored. This was 4560non-nil value, the index entry at point is ignored. This was
4352implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts 4561implemented to support the (deprecated) @samp{^} and @samp{_} shortcuts
4353in the LaTeX2e @code{index} package.@refill 4562in the LaTeX2e @code{index} package.
4354 4563
4355@var{repeat}, if non-@code{nil}, means the index macro does not typeset 4564@var{repeat}, if non-@code{nil}, means the index macro does not typeset
4356the entry in the text, so that the text has to be repeated outside the 4565the entry in the text, so that the text has to be repeated outside the
4357index macro. Needed for @code{reftex-index-selection-or-word} and for 4566index macro. Needed for @code{reftex-index-selection-or-word} and for
4358indexing from the phrase buffer.@refill 4567indexing from the phrase buffer.
4359 4568
4360The final entry may also be a symbol. It must have an association in 4569The final entry may also be a symbol. It must have an association in
4361the variable @code{reftex-index-macros-builtin} to specify the main 4570the variable @code{reftex-index-macros-builtin} to specify the main
4362indexing package you are using. Legal values are currently@refill 4571indexing package you are using. Legal values are currently
4363@example 4572@example
4364default @r{The LaTeX default - unnecessary to specify this one} 4573default @r{The LaTeX default - unnecessary to specify this one}
4365multind @r{The multind.sty package} 4574multind @r{The multind.sty package}
@@ -4383,7 +4592,7 @@ This is a list with @code{(@var{macro-key} @var{default-tag})}.
4383@var{tag} argument. When this is @code{nil} and a @var{tag} is needed, 4592@var{tag} argument. When this is @code{nil} and a @var{tag} is needed,
4384@b{Ref@TeX{}} will ask for it. When this is the empty string and the 4593@b{Ref@TeX{}} will ask for it. When this is the empty string and the
4385TAG argument of the index macro is optional, the TAG argument will be 4594TAG argument of the index macro is optional, the TAG argument will be
4386omitted.@refill 4595omitted.
4387@end defopt 4596@end defopt
4388 4597
4389@defopt reftex-index-default-tag 4598@defopt reftex-index-default-tag
@@ -4391,7 +4600,7 @@ Default index tag. When working with multiple indexes, RefTeX queries
4391for an index tag when creating index entries or displaying a specific 4600for an index tag when creating index entries or displaying a specific
4392index. This variable controls the default offered for these queries. 4601index. This variable controls the default offered for these queries.
4393The default can be selected with @key{RET} during selection or 4602The default can be selected with @key{RET} during selection or
4394completion. Legal values of this variable are:@refill 4603completion. Legal values of this variable are:
4395@example 4604@example
4396nil @r{Do not provide a default index} 4605nil @r{Do not provide a default index}
4397"tag" @r{The default index tag given as a string, e.g. "idx"} 4606"tag" @r{The default index tag given as a string, e.g. "idx"}
@@ -4405,7 +4614,7 @@ Format of index entries when copied from inside math mode. When
4405the index key copied from the buffer is processed with this format 4614the index key copied from the buffer is processed with this format
4406string through the @code{format} function. This can be used to add the 4615string through the @code{format} function. This can be used to add the
4407math delimiters (e.g. @samp{$}) to the string. Requires the 4616math delimiters (e.g. @samp{$}) to the string. Requires the
4408@file{texmathp.el} library which is part of AUCTeX.@refill 4617@file{texmathp.el} library which is part of AUCTeX.
4409@end defopt 4618@end defopt
4410 4619
4411@defopt reftex-index-phrase-file-extension 4620@defopt reftex-index-phrase-file-extension
@@ -4420,7 +4629,7 @@ this operator, each part will generate an index macro. So each match of
4420the search phrase will produce @emph{several} different index entries. 4629the search phrase will produce @emph{several} different index entries.
4421Make sure this does no match things which are not separators. This 4630Make sure this does no match things which are not separators. This
4422logical @samp{and} has higher priority than the logical @samp{or} 4631logical @samp{and} has higher priority than the logical @samp{or}
4423specified in @code{reftex-index-phrases-logical-or-regexp}.@refill 4632specified in @code{reftex-index-phrases-logical-or-regexp}.
4424@end defopt 4633@end defopt
4425 4634
4426@defopt reftex-index-phrases-logical-or-regexp 4635@defopt reftex-index-phrases-logical-or-regexp
@@ -4431,7 +4640,7 @@ match of the search phrase. The first index arg will be the default. A
4431number key @kbd{1}--@kbd{9} must be pressed to switch to another. Make 4640number key @kbd{1}--@kbd{9} must be pressed to switch to another. Make
4432sure this does no match things which are not separators. The logical 4641sure this does no match things which are not separators. The logical
4433@samp{and} specified in @code{reftex-index-phrases-logical-or-regexp} 4642@samp{and} specified in @code{reftex-index-phrases-logical-or-regexp}
4434has higher priority than this logical @samp{or}.@refill 4643has higher priority than this logical @samp{or}.
4435@end defopt 4644@end defopt
4436 4645
4437@defopt reftex-index-phrases-search-whole-words 4646@defopt reftex-index-phrases-search-whole-words
@@ -4443,7 +4652,7 @@ at one of these points, no word boundary is required there.
4443 4652
4444@defopt reftex-index-phrases-case-fold-search 4653@defopt reftex-index-phrases-case-fold-search
4445Non-@code{nil} means, searching for index phrases will ignore 4654Non-@code{nil} means, searching for index phrases will ignore
4446case.@refill 4655case.
4447@end defopt 4656@end defopt
4448 4657
4449@defopt reftex-index-verify-function 4658@defopt reftex-index-verify-function
@@ -4459,7 +4668,7 @@ particular when indexing an already processed document again, this
4459will even be the norm. When this variable is non-@code{nil}, 4668will even be the norm. When this variable is non-@code{nil},
4460@b{Ref@TeX{}} checks if the match is an index macro argument, or if an 4669@b{Ref@TeX{}} checks if the match is an index macro argument, or if an
4461index macro is directly before or after the phrase. If that is the 4670index macro is directly before or after the phrase. If that is the
4462case, that match will be ignored.@refill 4671case, that match will be ignored.
4463@end defopt 4672@end defopt
4464 4673
4465@defopt reftex-index-phrases-wrap-long-lines 4674@defopt reftex-index-phrases-wrap-long-lines
@@ -4468,7 +4677,7 @@ Inserting indexing commands in a line makes the line longer - often
4468so long that it does not fit onto the screen. When this variable is 4677so long that it does not fit onto the screen. When this variable is
4469non-@code{nil}, newlines will be added as necessary before and/or after the 4678non-@code{nil}, newlines will be added as necessary before and/or after the
4470indexing command to keep lines short. However, the matched text 4679indexing command to keep lines short. However, the matched text
4471phrase and its index command will always end up on a single line.@refill 4680phrase and its index command will always end up on a single line.
4472@end defopt 4681@end defopt
4473 4682
4474@defopt reftex-index-phrases-sort-prefers-entry 4683@defopt reftex-index-phrases-sort-prefers-entry
@@ -4476,7 +4685,7 @@ Non-@code{nil} means when sorting phrase lines, the explicit index entry
4476is used. Phrase lines in the phrases buffer contain a search phrase, and 4685is used. Phrase lines in the phrases buffer contain a search phrase, and
4477sorting is normally based on these. Some phrase lines also have 4686sorting is normally based on these. Some phrase lines also have
4478an explicit index argument specified. When this variable is 4687an explicit index argument specified. When this variable is
4479non-@code{nil}, the index argument will be used for sorting.@refill 4688non-@code{nil}, the index argument will be used for sorting.
4480@end defopt 4689@end defopt
4481 4690
4482@defopt reftex-index-phrases-sort-in-blocks 4691@defopt reftex-index-phrases-sort-in-blocks
@@ -4491,7 +4700,7 @@ Keymap for the Index Phrases buffer.
4491 4700
4492@defopt reftex-index-phrases-mode-hook 4701@defopt reftex-index-phrases-mode-hook
4493Normal hook which is run when a buffer is put into 4702Normal hook which is run when a buffer is put into
4494@code{reftex-index-phrases-mode}.@refill 4703@code{reftex-index-phrases-mode}.
4495@end defopt 4704@end defopt
4496 4705
4497@defopt reftex-index-section-letters 4706@defopt reftex-index-section-letters
@@ -4501,7 +4710,7 @@ significant, the index will be sorted by whatever the sort function
4501thinks is correct. In addition to these letters, @b{Ref@TeX{}} will 4710thinks is correct. In addition to these letters, @b{Ref@TeX{}} will
4502create a group @samp{!} which contains all entries sorted below the 4711create a group @samp{!} which contains all entries sorted below the
4503lowest specified letter. In the @file{*Index*} buffer, pressing any of 4712lowest specified letter. In the @file{*Index*} buffer, pressing any of
4504these capital letters or @kbd{!} will jump to that section.@refill 4713these capital letters or @kbd{!} will jump to that section.
4505@end defopt 4714@end defopt
4506 4715
4507@defopt reftex-index-include-context 4716@defopt reftex-index-include-context
@@ -4519,7 +4728,7 @@ buffer with the @kbd{f} key.
4519 4728
4520@deffn Keymap reftex-index-map 4729@deffn Keymap reftex-index-map
4521The keymap which is active in the @file{*Index*} buffer 4730The keymap which is active in the @file{*Index*} buffer
4522(@pxref{Index Support}).@refill 4731(@pxref{Index Support}).
4523@end deffn 4732@end deffn
4524 4733
4525@node Options (Viewing Cross-References), Options (Finding Files), Options (Index Support), Options 4734@node Options (Viewing Cross-References), Options (Finding Files), Options (Index Support), Options
@@ -4533,7 +4742,7 @@ This is used when `reftex-view-crossref' is called with point in an
4533argument of a macro. Note that crossref viewing for citations, 4742argument of a macro. Note that crossref viewing for citations,
4534references (both ways) and index entries is hard-coded. This variable 4743references (both ways) and index entries is hard-coded. This variable
4535is only to configure additional structures for which crossreference 4744is only to configure additional structures for which crossreference
4536viewing can be useful. Each entry has the structure 4745viewing can be useful. Each entry has the structure
4537@example 4746@example
4538(@var{macro-re} @var{search-re} @var{highlight}). 4747(@var{macro-re} @var{search-re} @var{highlight}).
4539@end example 4748@end example
@@ -4552,18 +4761,18 @@ message is being displayed, the echo area will display information about
4552that cross reference. You can also set the variable to the symbol 4761that cross reference. You can also set the variable to the symbol
4553@code{window}. In this case a small temporary window is used for the 4762@code{window}. In this case a small temporary window is used for the
4554display. This feature can be turned on and off from the menu 4763display. This feature can be turned on and off from the menu
4555(Ref->Options).@refill 4764(Ref->Options).
4556@end defopt 4765@end defopt
4557 4766
4558@defopt reftex-idle-time 4767@defopt reftex-idle-time
4559Time (secs) Emacs has to be idle before automatic crossref display 4768Time (secs) Emacs has to be idle before automatic crossref display
4560or toc recentering is done.@refill 4769or toc recentering is done.
4561@end defopt 4770@end defopt
4562 4771
4563@defopt reftex-cite-view-format 4772@defopt reftex-cite-view-format
4564Citation format used to display citation info in the message area. See 4773Citation format used to display citation info in the message area. See
4565the variable @code{reftex-cite-format} for possible percent 4774the variable @code{reftex-cite-format} for possible percent
4566escapes.@refill 4775escapes.
4567@end defopt 4776@end defopt
4568 4777
4569@defopt reftex-revisit-to-echo 4778@defopt reftex-revisit-to-echo
@@ -4571,7 +4780,7 @@ Non-@code{nil} means, automatic citation display will revisit files if
4571necessary. When nil, citation display in echo area will only be active 4780necessary. When nil, citation display in echo area will only be active
4572for cached echo strings (see @code{reftex-cache-cite-echo}), or for 4781for cached echo strings (see @code{reftex-cache-cite-echo}), or for
4573BibTeX database files which are already visited by a live associated 4782BibTeX database files which are already visited by a live associated
4574buffers.@refill 4783buffers.
4575@end defopt 4784@end defopt
4576 4785
4577@defopt reftex-cache-cite-echo 4786@defopt reftex-cache-cite-echo
@@ -4588,11 +4797,11 @@ scans. In order to clear it, use @kbd{M-x reftex-reset-mode}.
4588 4797
4589@defopt reftex-texpath-environment-variables 4798@defopt reftex-texpath-environment-variables
4590List of specifications how to retrieve the search path for TeX files. 4799List of specifications how to retrieve the search path for TeX files.
4591Several entries are possible.@refill 4800Several entries are possible.
4592@itemize @minus 4801@itemize @minus
4593@item 4802@item
4594If an element is the name of an environment variable, its content is 4803If an element is the name of an environment variable, its content is
4595used.@refill 4804used.
4596@item 4805@item
4597If an element starts with an exclamation mark, it is used as a command 4806If an element starts with an exclamation mark, it is used as a command
4598to retrieve the path. A typical command with the kpathsearch library 4807to retrieve the path. A typical command with the kpathsearch library
@@ -4607,11 +4816,11 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}.
4607 4816
4608@defopt reftex-bibpath-environment-variables 4817@defopt reftex-bibpath-environment-variables
4609List of specifications how to retrieve the search path for BibTeX 4818List of specifications how to retrieve the search path for BibTeX
4610files. Several entries are possible.@refill 4819files. Several entries are possible.
4611@itemize @minus 4820@itemize @minus
4612@item 4821@item
4613If an element is the name of an environment variable, its content is 4822If an element is the name of an environment variable, its content is
4614used.@refill 4823used.
4615@item 4824@item
4616If an element starts with an exclamation mark, it is used as a command 4825If an element starts with an exclamation mark, it is used as a command
4617to retrieve the path. A typical command with the kpathsearch library 4826to retrieve the path. A typical command with the kpathsearch library
@@ -4626,7 +4835,7 @@ be expanded recursively. See also @code{reftex-use-external-file-finders}.
4626 4835
4627@defopt reftex-file-extensions 4836@defopt reftex-file-extensions
4628Association list with file extensions for different file types. 4837Association list with file extensions for different file types.
4629This is a list of items, each item is like: 4838This is a list of items, each item is like:
4630@code{(@var{type} . (@var{def-ext} @var{other-ext} ...))} 4839@code{(@var{type} . (@var{def-ext} @var{other-ext} ...))}
4631@example 4840@example
4632@var{type}: @r{File type like @code{"bib"} or @code{"tex"}.} 4841@var{type}: @r{File type like @code{"bib"} or @code{"tex"}.}
@@ -4634,7 +4843,7 @@ This is a list of items, each item is like:
4634@var{other-ext}: @r{Any number of other legal extensions for this file type.} 4843@var{other-ext}: @r{Any number of other legal extensions for this file type.}
4635@end example 4844@end example
4636When a files is searched and it does not have any of the legal extensions, 4845When a files is searched and it does not have any of the legal extensions,
4637we try the default extension first, and then the naked file name.@refill 4846we try the default extension first, and then the naked file name.
4638@end defopt 4847@end defopt
4639 4848
4640@defopt reftex-search-unrecursed-path-first 4849@defopt reftex-search-unrecursed-path-first
@@ -4645,7 +4854,7 @@ option is @code{nil}, the subdirectories of @samp{./} are searched
4645before @samp{/tex/}. This is mainly for speed - most of the time the 4854before @samp{/tex/}. This is mainly for speed - most of the time the
4646recursive path is for the system files and not for the user files. Set 4855recursive path is for the system files and not for the user files. Set
4647this to @code{nil} if the default makes @b{Ref@TeX{}} finding files with 4856this to @code{nil} if the default makes @b{Ref@TeX{}} finding files with
4648equal names in wrong sequence.@refill 4857equal names in wrong sequence.
4649@end defopt 4858@end defopt
4650 4859
4651@defopt reftex-use-external-file-finders 4860@defopt reftex-use-external-file-finders
@@ -4667,7 +4876,7 @@ string containing the external program to use with any arguments.
4667@code{%f} will be replaced by the name of the file to be found. Note 4876@code{%f} will be replaced by the name of the file to be found. Note
4668that these commands will be executed directly, not via a shell. Only 4877that these commands will be executed directly, not via a shell. Only
4669relevant when @code{reftex-use-external-file-finders} is 4878relevant when @code{reftex-use-external-file-finders} is
4670non-@code{nil}.@refill 4879non-@code{nil}.
4671@end defopt 4880@end defopt
4672 4881
4673@page 4882@page
@@ -4679,17 +4888,17 @@ non-@code{nil}.@refill
4679@defopt reftex-keep-temporary-buffers 4888@defopt reftex-keep-temporary-buffers
4680Non-@code{nil} means, keep buffers created for parsing and lookup. 4889Non-@code{nil} means, keep buffers created for parsing and lookup.
4681@b{Ref@TeX{}} sometimes needs to visit files related to the current 4890@b{Ref@TeX{}} sometimes needs to visit files related to the current
4682document. We distinguish files visited for@refill 4891document. We distinguish files visited for
4683@table @asis 4892@table @asis
4684@item PARSING 4893@item PARSING
4685Parts of a multifile document loaded when (re)-parsing the 4894Parts of a multifile document loaded when (re)-parsing the
4686document.@refill 4895document.
4687@item LOOKUP 4896@item LOOKUP
4688BibTeX database files and TeX files loaded to find a reference, to 4897BibTeX database files and TeX files loaded to find a reference, to
4689display label context, etc.@refill 4898display label context, etc.
4690@end table 4899@end table
4691The created buffers can be kept for later use, or be thrown away 4900The created buffers can be kept for later use, or be thrown away
4692immediately after use, depending on the value of this variable:@refill 4901immediately after use, depending on the value of this variable:
4693 4902
4694@table @code 4903@table @code
4695@item nil 4904@item nil
@@ -4698,13 +4907,13 @@ Throw away as much as possible.
4698Keep everything. 4907Keep everything.
4699@item 1 4908@item 1
4700Throw away buffers created for parsing, but keep the ones created for 4909Throw away buffers created for parsing, but keep the ones created for
4701lookup.@refill 4910lookup.
4702@end table 4911@end table
4703 4912
4704If a buffer is to be kept, the file is visited normally (which is 4913If a buffer is to be kept, the file is visited normally (which is
4705potentially slow but will happen only once). If a buffer is to be thrown 4914potentially slow but will happen only once). If a buffer is to be thrown
4706away, the initialization of the buffer depends upon the variable 4915away, the initialization of the buffer depends upon the variable
4707@code{reftex-initialize-temporary-buffers}.@refill 4916@code{reftex-initialize-temporary-buffers}.
4708@end defopt 4917@end defopt
4709 4918
4710@defopt reftex-initialize-temporary-buffers 4919@defopt reftex-initialize-temporary-buffers
@@ -4713,7 +4922,7 @@ temporarily. When @code{nil}, @b{Ref@TeX{}} may turn off find-file hooks and
4713other stuff to briefly visit a file. When @code{t}, the full default 4922other stuff to briefly visit a file. When @code{t}, the full default
4714initializations are done (@code{find-file-hook} etc.). Instead of 4923initializations are done (@code{find-file-hook} etc.). Instead of
4715@code{t} or @code{nil}, this variable may also be a list of hook 4924@code{t} or @code{nil}, this variable may also be a list of hook
4716functions to do a minimal initialization.@refill 4925functions to do a minimal initialization.
4717@end defopt 4926@end defopt
4718 4927
4719@defopt reftex-no-include-regexps 4928@defopt reftex-no-include-regexps
@@ -4731,7 +4940,7 @@ commands, or with the @kbd{r} key in menus. When this option is
4731or the file associated with the label or section heading near point in a 4940or the file associated with the label or section heading near point in a
4732menu. Requesting re-parsing of an entire multifile document then 4941menu. Requesting re-parsing of an entire multifile document then
4733requires a @kbd{C-u C-u} prefix or the capital @kbd{R} key in 4942requires a @kbd{C-u C-u} prefix or the capital @kbd{R} key in
4734menus.@refill 4943menus.
4735@end defopt 4944@end defopt
4736 4945
4737@defopt reftex-save-parse-info 4946@defopt reftex-save-parse-info
@@ -4742,10 +4951,10 @@ used to save the information. When this variable is @code{t},
4742@item 4951@item
4743accessing the parsing information for the first time in an editing 4952accessing the parsing information for the first time in an editing
4744session will read that file (if available) instead of parsing the 4953session will read that file (if available) instead of parsing the
4745document.@refill 4954document.
4746@item 4955@item
4747exiting Emacs or killing a buffer in reftex-mode will cause a new 4956exiting Emacs or killing a buffer in reftex-mode will cause a new
4748version of the file to be written.@refill 4957version of the file to be written.
4749@end itemize 4958@end itemize
4750@end defopt 4959@end defopt
4751 4960
@@ -4766,7 +4975,7 @@ type. These buffers are kept from one selection to the next and need
4766not to be created for each use - so the menu generally comes up faster. 4975not to be created for each use - so the menu generally comes up faster.
4767The selection buffers will be erased (and therefore updated) 4976The selection buffers will be erased (and therefore updated)
4768automatically when new labels in its category are added. See the 4977automatically when new labels in its category are added. See the
4769variable @code{reftex-auto-update-selection-buffers}.@refill 4978variable @code{reftex-auto-update-selection-buffers}.
4770@end defopt 4979@end defopt
4771 4980
4772@defopt reftex-auto-update-selection-buffers 4981@defopt reftex-auto-update-selection-buffers
@@ -4777,7 +4986,7 @@ force an update upon next use. When @code{nil}, the buffers are left
4777alone and have to be updated by hand, with the @kbd{g} key from the 4986alone and have to be updated by hand, with the @kbd{g} key from the
4778label selection process. The value of this variable will only have any 4987label selection process. The value of this variable will only have any
4779effect when @code{reftex-use-multiple-selection-buffers} is 4988effect when @code{reftex-use-multiple-selection-buffers} is
4780non-@code{nil}.@refill 4989non-@code{nil}.
4781@end defopt 4990@end defopt
4782 4991
4783@node Options (Fontification), Options (Misc), Options (Optimizations), Options 4992@node Options (Fontification), Options (Misc), Options (Optimizations), Options
@@ -4789,13 +4998,13 @@ non-@code{nil}.@refill
4789Non-@code{nil} means, use fonts in label menu and on-the-fly help. 4998Non-@code{nil} means, use fonts in label menu and on-the-fly help.
4790Font-lock must be loaded as well to actually get fontified 4999Font-lock must be loaded as well to actually get fontified
4791display. After changing this option, a rescan may be necessary to 5000display. After changing this option, a rescan may be necessary to
4792activate it.@refill 5001activate it.
4793@end defopt 5002@end defopt
4794 5003
4795@defopt reftex-refontify-context 5004@defopt reftex-refontify-context
4796Non-@code{nil} means, re-fontify the context in the label menu with 5005Non-@code{nil} means, re-fontify the context in the label menu with
4797font-lock. This slightly slows down the creation of the label menu. It 5006font-lock. This slightly slows down the creation of the label menu. It
4798is only necessary when you definitely want the context fontified.@refill 5007is only necessary when you definitely want the context fontified.
4799 5008
4800This option may have 3 different values: 5009This option may have 3 different values:
4801@table @code 5010@table @code
@@ -4805,9 +5014,9 @@ Never refontify.
4805Always refontify. 5014Always refontify.
4806@item 1 5015@item 1
4807Refontify when necessary, e.g. with old versions of the x-symbol 5016Refontify when necessary, e.g. with old versions of the x-symbol
4808package.@refill 5017package.
4809@end table 5018@end table
4810The option is ignored when @code{reftex-use-fonts} is @code{nil}.@refill 5019The option is ignored when @code{reftex-use-fonts} is @code{nil}.
4811@end defopt 5020@end defopt
4812 5021
4813@defopt reftex-highlight-selection 5022@defopt reftex-highlight-selection
@@ -4817,7 +5026,7 @@ Non-@code{nil} means, highlight selected text in selection and
4817keys in the selection and @file{*toc*} buffers act on. However, if you 5026keys in the selection and @file{*toc*} buffers act on. However, if you
4818mainly use the mouse to select an item, you may find it nice to have 5027mainly use the mouse to select an item, you may find it nice to have
4819mouse-triggered highlighting @emph{instead} or @emph{as well}. The 5028mouse-triggered highlighting @emph{instead} or @emph{as well}. The
4820variable may have one of these values:@refill 5029variable may have one of these values:
4821 5030
4822@example 5031@example
4823nil @r{No highlighting.} 5032nil @r{No highlighting.}
@@ -4827,16 +5036,16 @@ both @r{Both cursor and mouse trigger highlighting.}
4827@end example 5036@end example
4828 5037
4829Changing this variable requires to rebuild the selection and *toc* 5038Changing this variable requires to rebuild the selection and *toc*
4830buffers to become effective (keys @kbd{g} or @kbd{r}).@refill 5039buffers to become effective (keys @kbd{g} or @kbd{r}).
4831@end defopt 5040@end defopt
4832 5041
4833@defopt reftex-cursor-selected-face 5042@defopt reftex-cursor-selected-face
4834Face name to highlight cursor selected item in toc and selection buffers. 5043Face name to highlight cursor selected item in toc and selection buffers.
4835See also the variable @code{reftex-highlight-selection}.@refill 5044See also the variable @code{reftex-highlight-selection}.
4836@end defopt 5045@end defopt
4837@defopt reftex-mouse-selected-face 5046@defopt reftex-mouse-selected-face
4838Face name to highlight mouse selected item in toc and selection buffers. 5047Face name to highlight mouse selected item in toc and selection buffers.
4839See also the variable @code{reftex-highlight-selection}.@refill 5048See also the variable @code{reftex-highlight-selection}.
4840@end defopt 5049@end defopt
4841@defopt reftex-file-boundary-face 5050@defopt reftex-file-boundary-face
4842Face name for file boundaries in selection buffer. 5051Face name for file boundaries in selection buffer.
@@ -4885,13 +5094,13 @@ Face name for index entries.
4885@defopt reftex-extra-bindings 5094@defopt reftex-extra-bindings
4886Non-@code{nil} means, make additional key bindings on startup. These 5095Non-@code{nil} means, make additional key bindings on startup. These
4887extra bindings are located in the users @samp{C-c letter} 5096extra bindings are located in the users @samp{C-c letter}
4888map. @xref{Key Bindings}.@refill 5097map. @xref{Key Bindings}.
4889@end defopt 5098@end defopt
4890 5099
4891@defopt reftex-plug-into-AUCTeX 5100@defopt reftex-plug-into-AUCTeX
4892Plug-in flags for AUCTeX interface. This variable is a list of 5101Plug-in flags for AUCTeX interface. This variable is a list of
48935 boolean flags. When a flag is non-@code{nil}, @b{Ref@TeX{}} 51025 boolean flags. When a flag is non-@code{nil}, @b{Ref@TeX{}}
4894will@refill 5103will
4895 5104
4896@example 5105@example
4897- supply labels in new sections and environments (flag 1) 5106- supply labels in new sections and environments (flag 1)
@@ -4920,7 +5129,7 @@ Non-@code{nil} means, allow arguments of macros to be detached by
4920whitespace. When this is @code{t}, the @samp{aaa} in @w{@samp{\bbb 5129whitespace. When this is @code{t}, the @samp{aaa} in @w{@samp{\bbb
4921[xxx] @{aaa@}}} will be considered an argument of @code{\bb}. Note that 5130[xxx] @{aaa@}}} will be considered an argument of @code{\bb}. Note that
4922this will be the case even if @code{\bb} is defined with zero or one 5131this will be the case even if @code{\bb} is defined with zero or one
4923argument.@refill 5132argument.
4924@end defopt 5133@end defopt
4925 5134
4926@node Keymaps and Hooks, Changes, Options, Top 5135@node Keymaps and Hooks, Changes, Options, Top
@@ -4938,14 +5147,14 @@ Normal hook which is being run when loading @file{reftex.el}.
4938@end deffn 5147@end deffn
4939 5148
4940@deffn {Normal Hook} reftex-mode-hook 5149@deffn {Normal Hook} reftex-mode-hook
4941Normal hook which is being run when turning on @b{Ref@TeX{}} mode.@refill 5150Normal hook which is being run when turning on @b{Ref@TeX{}} mode.
4942@end deffn 5151@end deffn
4943 5152
4944Furthermore, the 4 modes used for referencing labels, creating 5153Furthermore, the 4 modes used for referencing labels, creating
4945citations, the table of contents buffer and the phrases buffer have 5154citations, the table of contents buffer and the phrases buffer have
4946their own keymaps and mode hooks. See the respective sections. There 5155their own keymaps and mode hooks. See the respective sections. There
4947are many more hooks which are described in the relevant sections about 5156are many more hooks which are described in the relevant sections about
4948options for a specific part of @b{Ref@TeX{}}.@refill 5157options for a specific part of @b{Ref@TeX{}}.
4949 5158
4950@node Changes, , Keymaps and Hooks, Top 5159@node Changes, , Keymaps and Hooks, Top
4951@chapter Changes 5160@chapter Changes
@@ -4953,296 +5162,396 @@ options for a specific part of @b{Ref@TeX{}}.@refill
4953 5162
4954Here is a list of recent changes to @b{Ref@TeX{}}. 5163Here is a list of recent changes to @b{Ref@TeX{}}.
4955 5164
4956@ignore 5165@noindent @b{Version 4.26}
4957@noindent @b{Version 1.00}
4958@itemize @bullet 5166@itemize @bullet
4959@item 5167@item
4960released on 7 Jan 1997. 5168Bug fixes only.
4961@end itemize 5169@end itemize
4962 5170
4963@noindent @b{Version 1.04} 5171@noindent @b{Version 4.25}
4964@itemize @bullet 5172@itemize @bullet
4965@item 5173@item
4966Macros as wrappers, AMSTeX support, delayed context parsing for 5174Fixed bug with @samp{%F} in a label prefix. Added new escapes
4967new labels.@refill 5175@samp{%m} and @samp{%M} for mater file name and master directory.
4968@end itemize 5176@end itemize
4969 5177
4970@noindent @b{Version 1.05} 5178@noindent @b{Version 4.24}
4971@itemize @bullet 5179@itemize @bullet
4972@item 5180@item
4973XEmacs port. 5181Inserting citation commands now prompts for optional arguments
5182when called with a prefix argument. Related new options are
5183@code{reftex-cite-prompt-optional-args} and
5184@code{reftex-cite-cleanup-optional-args}.
5185@item
5186New option @code{reftex-trust-label-prefix}. Configure this variable
5187if you'd like RefTeX to base its classification of labels on prefixes.
5188This can speed-up document parsing, but may in some cases reduce the
5189quality of the context used by RefTeX to describe a label.
5190@item
5191Fixed bug in @code{reftex-create-bibtex-file} when @code{reftex-comment-citations}
5192is non-nil.
5193@item
5194Fixed bugs in indexing: Case-sensitive search, quotes before and/or
5195after words. Disabbled indexing in comment lines.
4974@end itemize 5196@end itemize
4975 5197
4976@noindent @b{Version 1.07} 5198@noindent @b{Version 4.22}
4977@itemize @bullet 5199@itemize @bullet
5200@item
5201New command @code{reftex-create-bibtex-file} to create a new database
5202with all entries referenced in the current document.
4978@item 5203@item
4979@b{Ref@TeX{}} gets its own menu. 5204New keys @kbd{e} and @kbd{E} allow to produce a BibTeX database file
5205from entries marked in a citation selection buffer.
4980@end itemize 5206@end itemize
4981 5207
4982@noindent @b{Version 1.09} 5208@noindent @b{Version 4.21}
5209@itemize @bullet
5210@item
5211Renaming labels from the toc buffer with key @kbd{M-%}.
5212@end itemize
5213
5214@noindent @b{Version 4.20}
4983@itemize @bullet 5215@itemize @bullet
4984@item 5216@item
4985Support for @code{tex-main-file}, an analogue for 5217Structure editing capabilities. The command keys @kbd{<} and @kbd{>} in
4986@code{TeX-master}.@refill 5218the TOC buffer promote/demote the section at point or all sections in
5219the current region.
4987@item 5220@item
4988MS-DOS support. 5221New option @code{reftex-toc-split-windows-fraction} to set the size of
5222the window used by the TOC. This makes the old variable
5223@code{reftex-toc-split-windows-horizontally-fraction} obsolete.
5224@item
5225A dedicated frame can show the TOC with the current section
5226always automatically highlighted. The frame is created and
5227deleted from the toc buffer with the @kbd{d} key.
4989@end itemize 5228@end itemize
4990 5229
4991@noindent @b{Version 2.00} 5230@noindent @b{Version 4.19}
4992@itemize @bullet 5231@itemize @bullet
4993@item 5232@item
4994Labels can be derived from context (default for sections). 5233New command `reftex-toc-recenter' (@kbd{C-c -}) which shows the current
5234section in the TOC buffer without selecting the TOC window.
4995@item 5235@item
4996Configuration of label insertion and label referencing revised. 5236Recentering happens automatically in idle time when the option
5237@code{reftex-auto-recenter-toc} is turned on.
4997@item 5238@item
4998Crossref fields in BibTeX database entries. 5239Fixed several bugs related to automatic cursor positioning in the TOC
5240buffer.
4999@item 5241@item
5000@code{reftex-toc} introduced (thanks to Stephen Eglen). 5242The highlight in the TOC buffer stays when the focus moves to a
5243different window.
5244@item
5245New command `reftex-goto-label'.
5246@item
5247Part numbers are no longer included in chapter numbers, and a new
5248part does not reset the chapter counter. See new option
5249@code{reftex-part-resets-chapter}.
5001@end itemize 5250@end itemize
5002 5251
5003@noindent @b{Version 2.03} 5252@noindent @b{Version 4.18}
5004@itemize @bullet 5253@itemize @bullet
5005@item 5254@item
5006@code{figure*}, @code{table*}, @code{sidewaysfigure/table} added to 5255@code{reftex-citation} uses the word before the cursor as a default
5007default environments.@refill 5256search string.
5008@item 5257@item
5009@code{reftex-bibfile-ignore-list} introduced (thanks to Rory Molinari). 5258Simplified several regular expressions for speed.
5010@item 5259@item
5011New functions @code{reftex-arg-label}, @code{reftex-arg-ref}, 5260Better support for chapterbib.
5012@code{reftex-arg-cite}.@refill 5261@end itemize
5262
5263@noindent @b{Version 4.17}
5264@itemize @bullet
5265@item
5266The toc window can be split off horizontally. See new options
5267@code{reftex-toc-split-windows-horizontally},
5268@code{reftex-toc-split-windows-horizontally-fraction}.
5013@item 5269@item
5014Emacs/XEmacs compatibility reworked. XEmacs 19.15 now is 5270It is possible to specify a function which verifies an index match
5015required.@refill 5271during global indexing. See new option @code{reftex-index-verify-function}.
5016@item 5272@item
5017@code{reftex-add-to-label-alist} (to be called from AUCTeX style 5273The macros which input a file in LaTeX (like \input, \include) can
5018files).@refill 5274be configured. See new option @code{reftex-include-file-commands}.
5019@item 5275@item
5020Finding context with a hook function. 5276The macros which specify the bibliography file (like \bibliography) can
5277be configured. See new option @code{reftex-bibliography-commands}.
5021@item 5278@item
5022Sorting BibTeX entries (new variable: 5279The regular expression used to search for the \bibliography macro has
5023@code{reftex-sort-bibtex-matches}). 5280been relaxed to allow for @samp{@{\bibliography@{...@}@}} needed by
5281chapterbib.
5282@item
5283Small bug fixes.
5024@end itemize 5284@end itemize
5025 5285
5026@noindent @b{Version 2.05} 5286@noindent @b{Version 4.15}
5027@itemize @bullet 5287@itemize @bullet
5028@item 5288@item
5029Support for @file{custom.el}. 5289Fixed bug with parsing of BibTeX files, when fields contain quotes or
5290unmatched parenthesis.
5030@item 5291@item
5031New function @code{reftex-grep-document} (thanks to Stephen Eglen). 5292Small bug fixes.
5293@item
5294Improved interaction with Emacs LaTeX mode.
5032@end itemize 5295@end itemize
5033 5296
5034@noindent @b{Version 2.07} 5297@noindent @b{Version 4.12}
5035@itemize @bullet 5298@itemize @bullet
5036@item 5299@item
5037New functions @code{reftex-search-document}, 5300Support for @file{bibentry} citation style.
5038@code{reftex-query-replace-document}.
5039@end itemize 5301@end itemize
5040 5302
5041@noindent @b{Version 2.11} 5303@noindent @b{Version 4.11}
5042@itemize @bullet 5304@itemize @bullet
5043@item 5305@item
5044Submitted for inclusion to Emacs and XEmacs. 5306Fixed bug which would parse @samp{\Section} just like @samp{\section}.
5045@end itemize 5307@end itemize
5046 5308
5047@noindent @b{Version 2.14} 5309@noindent @b{Version 4.10}
5048@itemize @bullet 5310@itemize @bullet
5049@item 5311@item
5050Variable @code{reftex-plug-into-AUCTeX} simplifies cooperation with 5312Renamed @file{reftex-vcr.el} to @file{reftex-dcr.el} because of conflict
5051AUCTeX.@refill 5313with @file{reftex-vars.el} on DOS machines.
5314@item
5315New options @code{reftex-parse-file-extension} and
5316@code{reftex-index-phrase-file-extension}.
5052@end itemize 5317@end itemize
5053 5318
5054@noindent @b{Version 2.17} 5319@noindent [.....]
5320@ignore
5321@noindent @b{Version 4.09}
5055@itemize @bullet 5322@itemize @bullet
5056@item 5323@item
5057Label prefix expands % escapes with current file name and other stuff. 5324New option @code{reftex-toc-max-level} to limit the depth of the toc.
5325New key binding @kbd{t} in the @file{*toc*} buffer to change this
5326setting.
5058@item 5327@item
5059Citation format now with % escapes. This is not backward 5328RefTeX maintains an @file{Index Phrases} file in which phrases can be
5060compatible!@refill 5329collected. When the document is ready, RefTeX can search all
5330these phrases and assist indexing all matches.
5061@item 5331@item
5062TEXINPUTS variable recognized when looking for input files. 5332The variables @code{reftex-index-macros} and
5333@code{reftex-index-default-macro} have changed their syntax slightly.
5334The @var{repeat} parameter has move from the latter to the former.
5335Also calls to @code{reftex-add-index-macros} from AUCTeX style files
5336need to be adapted.
5063@item 5337@item
5064Context can be the nth argument of a macro.@refill 5338The variable @code{reftex-section-levels} no longer contains the
5339default stuff which has been moved to a constant.
5065@item 5340@item
5066Searching in the select buffer is now possible (@kbd{C-s} and 5341Environments like theorems can be placed into the TOC by putting
5067@kbd{C-r}).@refill 5342entries for @samp{"begin@{theorem@}"} in
5343@code{reftex-setion-levels}.
5344@end itemize
5345
5346@noindent @b{Version 4.06}
5347@itemize @bullet
5068@item 5348@item
5069Display and derive-label can use two different context methods. 5349@code{reftex-section-levels} can contain a function to compute the level
5350of a sectioning command.
5070@item 5351@item
5071AMSmath @code{xalignat} and @code{xxalignat} added. 5352Multiple @code{thebibliography} environments recognized.
5072@end itemize 5353@end itemize
5073 5354
5074@noindent @b{Version 3.00} 5355@noindent @b{Version 4.04}
5075@itemize @bullet 5356@itemize @bullet
5076@item 5357@item
5077@b{Ref@TeX{}} should work better for very large projects: 5358New option @code{reftex-index-default-tag} implements a default for queries.
5359@end itemize
5360
5361@noindent @b{Version 4.02}
5362@itemize @bullet
5078@item 5363@item
5079The new parser works without creating a master buffer. 5364macros ending in @samp{refrange} are considered to contain references.
5080@item 5365@item
5081Rescanning can be limited to a part of a multifile document. 5366Index entries made with @code{reftex-index-selection-or-word} in TeX
5367math mode automatically get enclosing @samp{$} to preserve math mode. See
5368new option @code{reftex-index-math-format}. Requires AUCTeX.
5369@end itemize
5370
5371@noindent @b{Version 4.01}
5372@itemize @bullet
5082@item 5373@item
5083Information from the parser can be stored in a file. 5374New command @code{reftex-index-globally} to index a word in many
5375places in the document. Also available from the index buffer with
5376@kbd{&}.
5084@item 5377@item
5085@b{Ref@TeX{}} can deal with macros having a naked label as an argument. 5378The first item in a @code{reftex-label-alist} entry may now also be a parser
5379function to do non-standard parsing.
5086@item 5380@item
5087Macros may have white space and newlines between arguments. 5381@code{reftex-auto-view-crossref} no longer interferes with
5382@code{pop-up-frames} (patch from Stefan Monnier).
5383@end itemize
5384
5385@noindent @b{Version 4.00}
5386@itemize @bullet
5088@item 5387@item
5089Multiple identical section headings no longer confuse 5388RefTeX has been split into several smaller files which are autoloaded on
5090@code{reftex-toc}.@refill 5389demand.
5091@item 5390@item
5092@b{Ref@TeX{}} should work correctly in combination with buffer-altering 5391Index support, along with many new options.
5093packages like outline, folding, x-symbol, iso-cvt, isotex, etc.@refill
5094@item 5392@item
5095All labeled environments discussed in @emph{The LaTeX Companion} by 5393The selection of keys for @code{\ref} and @code{\cite} now allows to
5096Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of 5394select multiple items by marking entries with the @kbd{m} key.
5097@b{Ref@TeX{}}'s defaults.@refill 5395@item
5396Fancyref support.
5098@end itemize 5397@end itemize
5099 5398
5100@noindent @b{Version 3.03} 5399@noindent @b{Version 3.43}
5101@itemize @bullet 5400@itemize @bullet
5102@item 5401@item
5103Support for the LaTeX package @code{xr}, for inter-document 5402Viewing cross-references generalized. Now works on @code{\label},
5104references.@refill 5403@code{\ref}, @code{\cite}, @code{\bibitem}, @code{\index}, variations of
5404these, and from BibTeX buffers.
5105@item 5405@item
5106A few (minor) Mule-related changes. 5406New option @code{reftex-view-crossref-extra}.
5107@item 5407@item
5108Fixed bug which could cause @emph{huge} @file{.rel} files. 5408Support for the additional sectioning commands @code{\addchap} and
5409@code{\addsec} which are defined in the LaTeX KOMA-Script classes.
5109@item 5410@item
5110Search for input and @file{.bib} files with recursive path definitions. 5411Files in @code{reftex-default-bibliography} will be searched along
5412@code{BIBINPUTS} path.
5413@item
5414Reading a parse file now checks consistency.
5111@end itemize 5415@end itemize
5112 5416
5113@noindent @b{Version 3.04} 5417@noindent @b{Version 3.42}
5114@itemize @bullet 5418@itemize @bullet
5115@item 5419@item
5116Fixed BUG in the @emph{xr} support. 5420File search further refined. New option @code{reftex-file-extensions}.
5421@item
5422@file{*toc*} buffer can show the file boundaries of a multifile
5423document, all labels and associated context. New keys @kbd{i}, @kbd{l},
5424and @kbd{c}. New options @code{reftex-toc-include-labels},
5425@code{reftex-toc-include-context},
5426@code{reftex-toc-include-file-boundaries}.
5117@end itemize 5427@end itemize
5118 5428
5119@noindent @b{Version 3.05} 5429@noindent @b{Version 3.41}
5120@itemize @bullet 5430@itemize @bullet
5121@item 5431@item
5122Compatibility code now first checks for XEmacs feature. 5432New options @code{reftex-texpath-environment-variables},
5433@code{reftex-use-external-file-finders},
5434@code{reftex-external-file-finders},
5435@code{reftex-search-unrecursed-path-first}.
5436@item
5437@emph{kpathsearch} support. See new options and
5438@code{reftex-bibpath-environment-variables}.
5123@end itemize 5439@end itemize
5124 5440
5125@noindent @b{Version 3.07} 5441@noindent @b{Version 3.38}
5126@itemize @bullet 5442@itemize @bullet
5127@item 5443@item
5128@code{Ref} menu improved. 5444@code{reftex-view-crossref} no longer moves to find a macro. Point has
5445to be on the macro argument.
5129@end itemize 5446@end itemize
5130 5447
5131@noindent @b{Version 3.10} 5448@noindent @b{Version 3.36}
5132@itemize @bullet 5449@itemize @bullet
5133@item 5450@item
5134Fixed a bug which made reftex 3.07 fail on [X]Emacs version 19. 5451New value @code{window} for option @code{reftex-auto-view-crossref}.
5135@item
5136Removed unimportant code which caused OS/2 Emacs to crash.
5137@item
5138All customization variables now accessible from menu.
5139@end itemize 5452@end itemize
5140 5453
5141@noindent @b{Version 3.11} 5454@noindent @b{Version 3.35}
5142@itemize @bullet 5455@itemize @bullet
5143@item 5456@item
5144Fixed bug which led to naked label in (e.g.) footnotes. 5457ISO 8859 Latin-1 chars are converted to ASCII to derive better labels.
5145@item 5458This takes back the related changes in 3.34 for safety reasons.
5146Added scroll-other-window functions to RefTeX-Select.
5147@end itemize 5459@end itemize
5148 5460
5149@noindent @b{Version 3.12} 5461@noindent @b{Version 3.34}
5150@itemize @bullet 5462@itemize @bullet
5151@item 5463@item
5152There are 3 new keymaps for customization: @code{reftex-toc-map}, 5464Additional flag in @code{reftex-derive-label-parameters} do make only
5153@code{reftex-select-label-map}, @code{reftex-select-bib-map}. 5465lowercase labels (default @code{t}).
5154@item 5466@item
5155Refontification uses more standard font-lock stuff. 5467All @file{.rel} files have a final newline to avoid queries.
5156@item 5468@item
5157When no BibTeX database files are specified, citations can also use 5469Single byte representations of accented European letters (ISO-8859-1)
5158@code{\bibitem} entries from a @code{thebibliography} environment.@refill 5470are now legal in labels.
5159@end itemize 5471@end itemize
5160 5472
5161@noindent @b{Version 3.14} 5473@noindent @b{Version 3.33}
5162@itemize @bullet 5474@itemize @bullet
5163@item 5475@item
5164Selection buffers can be kept between selections: this is faster. 5476Multiple selection buffers are now hidden buffers (they start with a
5165See new variable @code{reftex-use-multiple-selection-buffers}.@refill 5477SPACE).
5166@item 5478@item
5167Prefix interpretation of reftex-view-crossref changed. 5479Fixed bug with file search when TEXINPUTS environment variable is empty.
5168@item
5169Support for the @code{varioref} package (@kbd{v} key in selection
5170buffer).@refill
5171@end itemize 5480@end itemize
5172 5481
5173@noindent @b{Version 3.16} 5482@noindent @b{Version 3.30}
5174@itemize @bullet 5483@itemize @bullet
5175@item 5484@item
5176New hooks @code{reftex-format-label-function}, 5485In @code{reftex-citation}, the regular expression used to scan BibTeX
5177@code{reftex-format-ref-function}, @code{reftex-format-cite-function}.@refill 5486files can be specified using completion on known citation keys.
5178@item
5179TeXInfo documentation completed.
5180@item 5487@item
5181Some restrictions in Label inserting and referencing removed. 5488New keys @kbd{a} and @kbd{A} in BibTeX selection process to cite @emph{all}
5489entries.
5182@item 5490@item
5183New variable @code{reftex-default-bibliography}. 5491New command @code{reftex-renumber-simple-labels} to renumber simple
5492labels like @samp{eq:13} sequentially through a document.
5184@end itemize 5493@end itemize
5185 5494
5186@noindent @b{Version 3.17} 5495@noindent @b{Version 3.28}
5187@itemize @bullet 5496@itemize @bullet
5188@item 5497@item
5189Additional bindings in selection and @file{*toc*} buffers. @kbd{g} 5498Auto view crossref for XEmacs uses @code{post-command-hook} to restart the
5190redefined. 5499timer, since itimer restart is not reliable.
5191@item
5192New command @code{reftex-save-all-document-buffers}.
5193@item
5194Magic word matching made more intelligent.
5195@item
5196Selection process can switch to completion (with @key{TAB}).
5197@item 5500@item
5198@code{\appendix} is now recognized and influences section numbering. 5501Option @code{reftex-bibfile-ignore-list} renamed to @code{-regexps}.
5199@item 5502@item
5200File commentary shortened considerably (use Info documentation). 5503Expansion of recursive tex and bib path rewritten.
5201@item 5504@item
5202New option @code{reftex-no-include-regexps} to skip some include files. 5505Fixed problem where @b{Ref@TeX{}} did not scan unsaved buffers.
5203@item 5506@item
5204New option @code{reftex-revisit-to-follow}. 5507Fixed bug with section numbering after *-red sections.
5205@end itemize 5508@end itemize
5206 5509
5207@noindent @b{Version 3.18} 5510@noindent @b{Version 3.27}
5208@itemize @bullet 5511@itemize @bullet
5209@item 5512@item
5210The selection now uses a recursive edit, much like minibuffer input. 5513Macros can define @emph{neutral} labels, just like @code{\label}
5211This removes all restrictions during selection. E.g. you can now 5514itself.
5212switch buffers at will, use the mouse etc.@refill
5213@item
5214New option @code{reftex-highlight-selection}.
5215@item
5216@kbd{mouse-2} can be used to select in selection and @file{*toc*}
5217buffers.@refill
5218@item
5219Fixed some problems regarding the interaction with VIPER mode.
5220@item
5221Follow-mode is now only used after point motion.
5222@item 5515@item
5223@b{Ref@TeX{}} now finally does not fontify temporary files anymore. 5516New option @code{reftex-allow-detached-macro-args}, default @code{nil}!
5224@end itemize 5517@end itemize
5225 5518
5226@noindent @b{Version 3.19} 5519@noindent @b{Version 3.26}
5227@itemize @bullet 5520@itemize @bullet
5228@item 5521@item
5229Fixed bug with AUCTeX @code{TeX-master}. 5522[X]Emacs 19 no longer supported. Use 3.22 for Emacs 19.
5523@item
5524New hooks @code{reftex-translate-to-ascii-function},
5525@code{reftex-string-to-label-function}.
5526@item
5527Made sure automatic crossref display will not visit/scan files.
5230@end itemize 5528@end itemize
5231 5529
5232@noindent @b{Version 3.21} 5530@noindent @b{Version 3.25}
5233@itemize @bullet 5531@itemize @bullet
5234@item 5532@item
5235New options for all faces used by @b{Ref@TeX{}}. They're in the 5533Echoing of citation info caches the info for displayed entries.
5236customization group @code{reftex-fontification-configurations}.@refill 5534New option @code{reftex-cache-cite-echo}.
5535@item
5536@kbd{M-x reftex-reset-mode} now also removes the file with parsing
5537info.
5538@item
5539Default of @code{reftex-revisit-to-follow} changed to nil.
5237@end itemize 5540@end itemize
5238 5541
5239@noindent @b{Version 3.22} 5542@noindent @b{Version 3.24}
5240@itemize @bullet 5543@itemize @bullet
5241@item 5544@item
5242Fixed bug with empty context strings. 5545New option @code{reftex-revisit-to-echo}.
5243@item 5546@item
5244@code{reftex-mouse-view-crossref} is now bound by default at 5547Interface with X-Symbol (>=2.6) is now complete and stable.
5245@kbd{S-mouse-2}.@refill 5548@item
5549Adapted to new outline, which uses overlays.
5550@item
5551File names in @code{\bibliography} may now have the @code{.bib}
5552extension.
5553@item
5554Fixed Bug with parsing "single file" from master file buffer.
5246@end itemize 5555@end itemize
5247 5556
5248@noindent @b{Version 3.23} 5557@noindent @b{Version 3.23}
@@ -5250,7 +5559,7 @@ Fixed bug with empty context strings.
5250@item 5559@item
5251Parse files @file{MASTER.rel} made compatible between Emacs and XEmacs. 5560Parse files @file{MASTER.rel} made compatible between Emacs and XEmacs.
5252@item 5561@item
5253@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse 5562@code{kill-emacs-hook} and @code{kill-buffer-hook} now write the parse
5254file. 5563file.
5255@item 5564@item
5256The cursor inside a @code{\ref} or @code{\cite} macro can now trigger 5565The cursor inside a @code{\ref} or @code{\cite} macro can now trigger
@@ -5278,311 +5587,302 @@ Fixed bug with syntax table and context refontification.
5278Safety-net for name change of @code{font-lock-reference-face}. 5587Safety-net for name change of @code{font-lock-reference-face}.
5279@end itemize 5588@end itemize
5280 5589
5281@noindent @b{Version 3.24} 5590@noindent @b{Version 3.22}
5282@itemize @bullet 5591@itemize @bullet
5283@item 5592@item
5284New option @code{reftex-revisit-to-echo}. 5593Fixed bug with empty context strings.
5285@item
5286Interface with X-Symbol (>=2.6) is now complete and stable.
5287@item
5288Adapted to new outline, which uses overlays.
5289@item
5290File names in @code{\bibliography} may now have the @code{.bib}
5291extension.@refill
5292@item 5594@item
5293Fixed Bug with parsing "single file" from master file buffer. 5595@code{reftex-mouse-view-crossref} is now bound by default at
5596@kbd{S-mouse-2}.
5294@end itemize 5597@end itemize
5295 5598
5296@noindent @b{Version 3.25} 5599@noindent @b{Version 3.21}
5297@itemize @bullet 5600@itemize @bullet
5298@item 5601@item
5299Echoing of citation info caches the info for displayed entries. 5602New options for all faces used by @b{Ref@TeX{}}. They're in the
5300New option @code{reftex-cache-cite-echo}.@refill 5603customization group @code{reftex-fontification-configurations}.
5301@item
5302@kbd{M-x reftex-reset-mode} now also removes the file with parsing
5303info.@refill
5304@item
5305Default of @code{reftex-revisit-to-follow} changed to nil.
5306@end itemize 5604@end itemize
5307 5605
5308@noindent @b{Version 3.26} 5606@noindent @b{Version 3.19}
5309@itemize @bullet 5607@itemize @bullet
5310@item 5608@item
5311[X]Emacs 19 no longer supported. Use 3.22 for Emacs 19. 5609Fixed bug with AUCTeX @code{TeX-master}.
5312@item
5313New hooks @code{reftex-translate-to-ascii-function},
5314@code{reftex-string-to-label-function}.@refill
5315@item
5316Made sure automatic crossref display will not visit/scan files.
5317@end itemize 5610@end itemize
5318 5611
5319@noindent @b{Version 3.27} 5612@noindent @b{Version 3.18}
5320@itemize @bullet 5613@itemize @bullet
5321@item 5614@item
5322Macros can define @emph{neutral} labels, just like @code{\label} 5615The selection now uses a recursive edit, much like minibuffer input.
5323itself.@refill 5616This removes all restrictions during selection. E.g. you can now
5617switch buffers at will, use the mouse etc.
5324@item 5618@item
5325New option @code{reftex-allow-detached-macro-args}, default @code{nil}! 5619New option @code{reftex-highlight-selection}.
5620@item
5621@kbd{mouse-2} can be used to select in selection and @file{*toc*}
5622buffers.
5623@item
5624Fixed some problems regarding the interaction with VIPER mode.
5625@item
5626Follow-mode is now only used after point motion.
5627@item
5628@b{Ref@TeX{}} now finally does not fontify temporary files anymore.
5326@end itemize 5629@end itemize
5327 5630
5328@noindent @b{Version 3.28} 5631@noindent @b{Version 3.17}
5329@itemize @bullet 5632@itemize @bullet
5330@item 5633@item
5331Auto view crossref for XEmacs uses @code{post-command-hook} to restart the 5634Additional bindings in selection and @file{*toc*} buffers. @kbd{g}
5332timer, since itimer restart is not reliable.@refill 5635redefined.
5333@item 5636@item
5334Option @code{reftex-bibfile-ignore-list} renamed to @code{-regexps}. 5637New command @code{reftex-save-all-document-buffers}.
5335@item 5638@item
5336Expansion of recursive tex and bib path rewritten. 5639Magic word matching made more intelligent.
5337@item 5640@item
5338Fixed problem where @b{Ref@TeX{}} did not scan unsaved buffers. 5641Selection process can switch to completion (with @key{TAB}).
5339@item 5642@item
5340Fixed bug with section numbering after *-red sections. 5643@code{\appendix} is now recognized and influences section numbering.
5644@item
5645File commentary shortened considerably (use Info documentation).
5646@item
5647New option @code{reftex-no-include-regexps} to skip some include files.
5648@item
5649New option @code{reftex-revisit-to-follow}.
5341@end itemize 5650@end itemize
5342 5651
5343@noindent @b{Version 3.30} 5652@noindent @b{Version 3.16}
5344@itemize @bullet 5653@itemize @bullet
5345@item 5654@item
5346In @code{reftex-citation}, the regular expression used to scan BibTeX 5655New hooks @code{reftex-format-label-function},
5347files can be specified using completion on known citation keys. 5656@code{reftex-format-ref-function}, @code{reftex-format-cite-function}.
5348@item 5657@item
5349New keys @kbd{a} and @kbd{A} in BibTeX selection process to cite @emph{all} 5658TeXInfo documentation completed.
5350entries.
5351@item 5659@item
5352New command @code{reftex-renumber-simple-labels} to renumber simple 5660Some restrictions in Label inserting and referencing removed.
5353labels like @samp{eq:13} sequentially through a document. 5661@item
5662New variable @code{reftex-default-bibliography}.
5354@end itemize 5663@end itemize
5355@noindent @b{Version 3.33} 5664
5665@noindent @b{Version 3.14}
5356@itemize @bullet 5666@itemize @bullet
5357@item 5667@item
5358Multiple selection buffers are now hidden buffers (they start with a 5668Selection buffers can be kept between selections: this is faster.
5359SPACE). 5669See new variable @code{reftex-use-multiple-selection-buffers}.
5360@item 5670@item
5361Fixed bug with file search when TEXINPUTS environment variable is empty. 5671Prefix interpretation of reftex-view-crossref changed.
5672@item
5673Support for the @code{varioref} package (@kbd{v} key in selection
5674buffer).
5362@end itemize 5675@end itemize
5363@noindent @b{Version 3.34} 5676
5677@noindent @b{Version 3.12}
5364@itemize @bullet 5678@itemize @bullet
5365@item 5679@item
5366Additional flag in @code{reftex-derive-label-parameters} do make only 5680There are 3 new keymaps for customization: @code{reftex-toc-map},
5367lowercase labels (default @code{t}). 5681@code{reftex-select-label-map}, @code{reftex-select-bib-map}.
5368@item 5682@item
5369All @file{.rel} files have a final newline to avoid queries. 5683Refontification uses more standard font-lock stuff.
5370@item 5684@item
5371Single byte representations of accented European letters (ISO-8859-1) 5685When no BibTeX database files are specified, citations can also use
5372are now legal in labels. 5686@code{\bibitem} entries from a @code{thebibliography} environment.
5373@end itemize 5687@end itemize
5374@noindent @b{Version 3.35} 5688
5689@noindent @b{Version 3.11}
5375@itemize @bullet 5690@itemize @bullet
5376@item 5691@item
5377ISO 8859 Latin-1 chars are converted to ASCII to derive better labels. 5692Fixed bug which led to naked label in (e.g.) footnotes.
5378This takes back the related changes in 3.34 for safety reasons.@refill 5693@item
5694Added scroll-other-window functions to RefTeX-Select.
5379@end itemize 5695@end itemize
5380@noindent @b{Version 3.36} 5696
5697@noindent @b{Version 3.10}
5381@itemize @bullet 5698@itemize @bullet
5382@item 5699@item
5383New value @code{window} for option @code{reftex-auto-view-crossref}. 5700Fixed a bug which made reftex 3.07 fail on [X]Emacs version 19.
5701@item
5702Removed unimportant code which caused OS/2 Emacs to crash.
5703@item
5704All customization variables now accessible from menu.
5384@end itemize 5705@end itemize
5385@noindent @b{Version 3.38} 5706
5707@noindent @b{Version 3.07}
5386@itemize @bullet 5708@itemize @bullet
5387@item 5709@item
5388@code{reftex-view-crossref} no longer moves to find a macro. Point has 5710@code{Ref} menu improved.
5389to be on the macro argument.
5390@end itemize 5711@end itemize
5391@noindent @b{Version 3.41} 5712
5713@noindent @b{Version 3.05}
5392@itemize @bullet 5714@itemize @bullet
5393@item 5715@item
5394New options @code{reftex-texpath-environment-variables}, 5716Compatibility code now first checks for XEmacs feature.
5395@code{reftex-use-external-file-finders},
5396@code{reftex-external-file-finders},
5397@code{reftex-search-unrecursed-path-first}.
5398@item
5399@emph{kpathsearch} support. See new options and
5400@code{reftex-bibpath-environment-variables}.
5401@end itemize 5717@end itemize
5402@noindent @b{Version 3.42} 5718
5719@noindent @b{Version 3.04}
5403@itemize @bullet 5720@itemize @bullet
5404@item 5721@item
5405File search further refined. New option @code{reftex-file-extensions}. 5722Fixed BUG in the @emph{xr} support.
5406@item
5407@file{*toc*} buffer can show the file boundaries of a multifile
5408document, all labels and associated context. New keys @kbd{i}, @kbd{l},
5409and @kbd{c}. New options @code{reftex-toc-include-labels},
5410@code{reftex-toc-include-context},
5411@code{reftex-toc-include-file-boundaries}. @refill
5412@end itemize 5723@end itemize
5413@noindent @b{Version 3.43} 5724
5725@noindent @b{Version 3.03}
5414@itemize @bullet 5726@itemize @bullet
5415@item 5727@item
5416Viewing cross-references generalized. Now works on @code{\label}, 5728Support for the LaTeX package @code{xr}, for inter-document
5417@code{\ref}, @code{\cite}, @code{\bibitem}, @code{\index}, variations of 5729references.
5418these, and from BibTeX buffers.@refill
5419@item
5420New option @code{reftex-view-crossref-extra}.@refill
5421@item 5730@item
5422Support for the additional sectioning commands @code{\addchap} and 5731A few (minor) Mule-related changes.
5423@code{\addsec} which are defined in the LaTeX KOMA-Script classes.@refill
5424@item 5732@item
5425Files in @code{reftex-default-bibliography} will be searched along 5733Fixed bug which could cause @emph{huge} @file{.rel} files.
5426@code{BIBINPUTS} path.@refill
5427@item 5734@item
5428Reading a parse file now checks consistency. 5735Search for input and @file{.bib} files with recursive path definitions.
5429@end itemize 5736@end itemize
5430@noindent @b{Version 4.00} 5737
5738@noindent @b{Version 3.00}
5431@itemize @bullet 5739@itemize @bullet
5432@item 5740@item
5433RefTeX has been split into several smaller files which are autoloaded on 5741@b{Ref@TeX{}} should work better for very large projects:
5434demand.
5435@item
5436Index support, along with many new options.
5437@item 5742@item
5438The selection of keys for @code{\ref} and @code{\cite} now allows to 5743The new parser works without creating a master buffer.
5439select multiple items by marking entries with the @kbd{m} key.
5440@item 5744@item
5441Fancyref support. 5745Rescanning can be limited to a part of a multifile document.
5442@end itemize
5443@noindent @b{Version 4.01}
5444@itemize @bullet
5445@item 5746@item
5446New command @code{reftex-index-globally} to index a word in many 5747Information from the parser can be stored in a file.
5447places in the document. Also available from the index buffer with
5448@kbd{&}.
5449@item 5748@item
5450The first item in a @code{reftex-label-alist} entry may now also be a parser 5749@b{Ref@TeX{}} can deal with macros having a naked label as an argument.
5451function to do non-standard parsing.
5452@item 5750@item
5453@code{reftex-auto-view-crossref} no longer interferes with 5751Macros may have white space and newlines between arguments.
5454@code{pop-up-frames} (patch from Stefan Monnier).
5455@end itemize
5456@noindent @b{Version 4.02}
5457@itemize @bullet
5458@item 5752@item
5459macros ending in @samp{refrange} are considered to contain references. 5753Multiple identical section headings no longer confuse
5754@code{reftex-toc}.
5460@item 5755@item
5461Index entries made with @code{reftex-index-selection-or-word} in TeX 5756@b{Ref@TeX{}} should work correctly in combination with buffer-altering
5462math mode automatically get enclosing @samp{$} to preserve math mode. See 5757packages like outline, folding, x-symbol, iso-cvt, isotex, etc.
5463new option @code{reftex-index-math-format}. Requires AUCTeX.
5464@end itemize
5465@noindent @b{Version 4.04}
5466@itemize @bullet
5467@item 5758@item
5468New option @code{reftex-index-default-tag} implements a default for queries. 5759All labeled environments discussed in @emph{The LaTeX Companion} by
5760Goossens, Mittelbach & Samarin, Addison-Wesley 1994) are part of
5761@b{Ref@TeX{}}'s defaults.
5469@end itemize 5762@end itemize
5470@noindent @b{Version 4.06} 5763
5764@noindent @b{Version 2.17}
5471@itemize @bullet 5765@itemize @bullet
5472@item 5766@item
5473@code{reftex-section-levels} can contain a function to compute the level 5767Label prefix expands % escapes with current file name and other stuff.
5474of a sectioning command.
5475@item 5768@item
5476Multiple @code{thebibliography} environments recognized. 5769Citation format now with % escapes. This is not backward
5477@end itemize 5770compatible!
5478@noindent @b{Version 4.09}
5479@itemize @bullet
5480@item 5771@item
5481New option @code{reftex-toc-max-level} to limit the depth of the toc. 5772TEXINPUTS variable recognized when looking for input files.
5482New key binding @kbd{t} in the @file{*toc*} buffer to change this
5483setting.@refill
5484@item 5773@item
5485RefTeX maintains an @file{Index Phrases} file in which phrases can be 5774Context can be the nth argument of a macro.
5486collected. When the document is ready, RefTeX can search all
5487these phrases and assist indexing all matches.@refill
5488@item 5775@item
5489The variables @code{reftex-index-macros} and 5776Searching in the select buffer is now possible (@kbd{C-s} and
5490@code{reftex-index-default-macro} have changed their syntax slightly. 5777@kbd{C-r}).
5491The @var{repeat} parameter has move from the latter to the former.
5492Also calls to @code{reftex-add-index-macros} from AUCTeX style files
5493need to be adapted.@refill
5494@item 5778@item
5495The variable @code{reftex-section-levels} no longer contains the 5779Display and derive-label can use two different context methods.
5496default stuff which has been moved to a constant.@refill
5497@item 5780@item
5498Environments like theorems can be placed into the TOC by putting 5781AMSmath @code{xalignat} and @code{xxalignat} added.
5499entries for @samp{"begin@{theorem@}"} in
5500@code{reftex-setion-levels}.@refill
5501@end itemize 5782@end itemize
5502@noindent @b{Version 4.10} 5783
5784@noindent @b{Version 2.14}
5503@itemize @bullet 5785@itemize @bullet
5504@item 5786@item
5505Renamed @file{reftex-vcr.el} to @file{reftex-dcr.el} because of conflict 5787Variable @code{reftex-plug-into-AUCTeX} simplifies cooperation with
5506with @file{reftex-vars.el} on DOS machines. 5788AUCTeX.
5507@item
5508New options @code{reftex-parse-file-extension} and
5509@code{reftex-index-phrase-file-extension}.
5510@end itemize 5789@end itemize
5511@noindent @b{Version 4.11} 5790
5791@noindent @b{Version 2.11}
5512@itemize @bullet 5792@itemize @bullet
5513@item 5793@item
5514Fixed bug which would parse @samp{\Section} just like @samp{\section}. 5794Submitted for inclusion to Emacs and XEmacs.
5515@end itemize 5795@end itemize
5516@noindent @b{Version 4.12} 5796
5797@noindent @b{Version 2.07}
5517@itemize @bullet 5798@itemize @bullet
5518@item 5799@item
5519Support for @file{bibentry} citation style. 5800New functions @code{reftex-search-document},
5801@code{reftex-query-replace-document}.
5520@end itemize 5802@end itemize
5521@noindent @b{Version 4.15} 5803
5804@noindent @b{Version 2.05}
5522@itemize @bullet 5805@itemize @bullet
5523@item 5806@item
5524Fixed bug with parsing of BibTeX files, when fields contain quotes or 5807Support for @file{custom.el}.
5525unmatched parenthesis.
5526@item
5527Small bug fixes.
5528@item 5808@item
5529Improved interaction with Emacs LaTeX mode. 5809New function @code{reftex-grep-document} (thanks to Stephen Eglen).
5530@end itemize 5810@end itemize
5531@end ignore 5811
5532@noindent @b{Version 4.17} 5812@noindent @b{Version 2.03}
5533@itemize @bullet 5813@itemize @bullet
5534@item 5814@item
5535The toc window can be split off horizontally. See new options 5815@code{figure*}, @code{table*}, @code{sidewaysfigure/table} added to
5536@code{reftex-toc-split-windows-horizontally}, 5816default environments.
5537@code{reftex-toc-split-windows-horizontally-fraction}.
5538@item 5817@item
5539It is possible to specify a function which verifies an index match 5818@code{reftex-bibfile-ignore-list} introduced (thanks to Rory Molinari).
5540during global indexing. See new option @code{reftex-index-verify-function}.
5541@item 5819@item
5542The macros which input a file in LaTeX (like \input, \include) can 5820New functions @code{reftex-arg-label}, @code{reftex-arg-ref},
5543be configured. See new option @code{reftex-include-file-commands}. 5821@code{reftex-arg-cite}.
5544@item 5822@item
5545The macros which specify the bibliography file (like \bibliography) can 5823Emacs/XEmacs compatibility reworked. XEmacs 19.15 now is
5546be configured. See new option @code{reftex-bibliography-commands}. 5824required.
5547@item 5825@item
5548The regular expression used to search for the \bibliography macro has 5826@code{reftex-add-to-label-alist} (to be called from AUCTeX style
5549been relaxed to allow for @samp{@{\bibliography@{...@}@}} needed by 5827files).
5550chapterbib.
5551@item 5828@item
5552Small bug fixes. 5829Finding context with a hook function.
5830@item
5831Sorting BibTeX entries (new variable:
5832@code{reftex-sort-bibtex-matches}).
5553@end itemize 5833@end itemize
5554@noindent @b{Version 4.18} 5834
5835@noindent @b{Version 2.00}
5555@itemize @bullet 5836@itemize @bullet
5556@item 5837@item
5557@code{reftex-citation} uses the word before the cursor as a default 5838Labels can be derived from context (default for sections).
5558search string.
5559@item 5839@item
5560Simplified several regular expressions for speed. 5840Configuration of label insertion and label referencing revised.
5561@item 5841@item
5562Better support for chapterbib. 5842Crossref fields in BibTeX database entries.
5843@item
5844@code{reftex-toc} introduced (thanks to Stephen Eglen).
5563@end itemize 5845@end itemize
5564@noindent @b{Version 4.19} 5846
5847@noindent @b{Version 1.09}
5565@itemize @bullet 5848@itemize @bullet
5566@item 5849@item
5567New command `reftex-toc-recenter' (@kbd{C-c -}) which shows the current 5850Support for @code{tex-main-file}, an analogue for
5568section in the TOC buffer without selecting the TOC window. 5851@code{TeX-master}.
5569@item 5852@item
5570Recentering happens automatically in idle time when the option 5853MS-DOS support.
5571@code{reftex-auto-recenter-toc} is turned on. 5854@end itemize
5855
5856@noindent @b{Version 1.07}
5857@itemize @bullet
5572@item 5858@item
5573Fixed several bugs related to automatic cursor positioning in the TOC 5859@b{Ref@TeX{}} gets its own menu.
5574buffer. 5860@end itemize
5861
5862@noindent @b{Version 1.05}
5863@itemize @bullet
5575@item 5864@item
5576The highlight in the TOC buffer stays when the focus moves to a 5865XEmacs port.
5577different window. 5866@end itemize
5867
5868@noindent @b{Version 1.04}
5869@itemize @bullet
5578@item 5870@item
5579New command `reftex-goto-label'. 5871Macros as wrappers, AMSTeX support, delayed context parsing for
5872new labels.
5873@end itemize
5874@end ignore
5875
5876@noindent @b{Version 1.00}
5877@itemize @bullet
5580@item 5878@item
5581Part numbers are no longer included in chapter numbers, and a new 5879released on 7 Jan 1997.
5582part does not reset the chapter counter. See new option
5583@code{reftex-part-resets-chapter}.
5584@end itemize 5880@end itemize
5585 5881
5882
5883
5884
5885
5586@node Index, , , Top 5886@node Index, , , Top
5587@unnumbered Index 5887@unnumbered Index
5588@printindex cp 5888@printindex cp
@@ -5591,6 +5891,3 @@ part does not reset the chapter counter. See new option
5591@contents 5891@contents
5592@bye 5892@bye
5593 5893
5594@ignore
5595 arch-tag: 1e055774-0576-4b1b-b47f-550d0961fd43
5596@end ignore