Commit 7c4d13cc authored by Carsten Dominik's avatar Carsten Dominik

* reftex.el (reftex-compile-variables): respect new structure of

(reftex-compile-variables): Use the changed structure of

* reftex-vars.el (reftex-index-math-format,
(reftex-toc-max-level): New option.
reftex-index-phrases-sort-in-blocks): New options.
(reftex-index-macros): Option structure changed.
(reftex-index-macros-builtin): Added `repeat' item to each entry.
(reftex-label-alist): Additional item in each entry to specify if
the environment should be listed in the TOC.
(eval-when-compile (require 'cl)) added.

* reftex-index.el (reftex-index-selection-or-word): No longer
deals with "repeat".
(reftex-index): "repeat property in `reftex-index-macro-alist' is
now used.
reftex-index-phrases-phrase-regexp12, reftex-index-phrases-help):
New constants.
(reftex-index-phrases-macro-data, reftex-index-phrases-files,
reftex-index-phrases-font-lock-defaults, reftex-index-phrases-map,
reftex-index-phrases-restrict-file): New variables.
reftex-index-phrases-save-and-return, reftex-index-phrases-mode,
reftex-index-next-phrase, reftex-index-this-phrase,
reftex-index-all-phrases, reftex-index-region-phrases,
reftex-index-phrases-toggle-restricted, reftex-index-new-phrase,
reftex-index-find-next-conflict-phrase, reftex-index-phrases-info,
reftex-index-phrases-set-macro-key, reftex-index-sort-phrases,
reftex-compare-phrase-lines, reftex-index-make-phrase-regexp,
reftex-index-simplify-phrase, reftex-index-phrases-find-dup-re,
reftex-query-index-phrase-globally, reftex-query-index-phrase,
reftex-index-select-phrases-macro): New functions.
(reftex-index-globalize, reftex-index-globally): functions removed
(eval-when-compile (require 'cl)) added.

* reftex-toc.el (reftex-toc-mode): Create new indicator for max
(reftex-toc-max-level-indicator): New variable.
(reftex-toc-max-level): New command.
(reftex-toc-map): New keybinding `t'.
(reftex-toc-help): Constant updated.
(eval-when-compile (require 'cl)) added.

* reftex-ref.el (reftex-offer-label-menu): Prefix to `t' command key
can change `reftex-toc-max-level'
(eval-when-compile (require 'cl)) added.

* reftex-sel (reftex-insert-docstruct): Respect
(eval-when-compile (require 'cl)) added.

* reftex-auc.el (eval-when-compile (require 'cl)) added.

* reftex-vcr.el (eval-when-compile (require 'cl)) added.

* reftex-cite.el (reftex-citep, reftex-citet): New commands.
(reftex-citation, reftex-do-citation,
reftex-figure-out-cite-format): Additional argument FORMAT-KEY to
preselect a citation format.
(eval-when-compile (require 'cl)) added.

* reftex-parse.el (reftex-context-substring): Optional parameter
(reftex-section-info): Deal with environment matches.
(eval-when-compile (require 'cl)) added.

* reftex-global.el (eval-when-compile (require 'cl)) added.
parent cfad01b4
;;; reftex-auc.el - RefTeX's interface to AUC TeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-auc)
(require 'reftex)
;;; reftex-cite.el - Creating citations with RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-cite)
(require 'reftex)
......@@ -501,7 +502,7 @@
;; Make a citation
(defun reftex-citation (&optional no-insert)
(defun reftex-citation (&optional no-insert format-key)
"Make a citation using BibTeX database files.
After prompting for a regular expression, scans the buffers with
bibtex entries (taken from the \\bibliography command) and offers the
......@@ -510,6 +511,8 @@ to `reftex-cite-format' and inserted into the buffer.
If NO-INSERT is non-nil, nothing is inserted, only the selected key returned.
FORAT-KEY can be used to pre-select a citation format.
When called with one or two `C-u' prefixes, first rescans the document.
When called with a numeric prefix, make that many citations. When
called with point inside the braces of a `\cite' command, it will
......@@ -533,13 +536,13 @@ While entering the regexp, completion on knows citation keys is possible.
;; Call reftex-do-citation, but protected
(reftex-do-citation current-prefix-arg no-insert)
(reftex-do-citation current-prefix-arg no-insert format-key)
(defun reftex-do-citation (&optional arg no-insert)
(defun reftex-do-citation (&optional arg no-insert format-key)
;; This really does the work of reftex-citation.
(let* ((format (reftex-figure-out-cite-format arg no-insert))
(let* ((format (reftex-figure-out-cite-format arg no-insert format-key))
(docstruct-symbol reftex-docstruct-symbol)
(selected-entries (reftex-offer-bib-menu))
(insert-entries selected-entries)
......@@ -610,7 +613,7 @@ While entering the regexp, completion on knows citation keys is possible.
;; Return the citation key
(car (car selected-entries))))
(defun reftex-figure-out-cite-format (arg no-insert)
(defun reftex-figure-out-cite-format (arg &optional no-insert format-key)
;; Check if there is already a cite command at point and change cite format
;; in order to only add another reference in the same cite command.
(let ((macro (car (reftex-what-macro 1)))
......@@ -640,6 +643,7 @@ While entering the regexp, completion on knows citation keys is possible.
(when (listp format)
(setq key
(or format-key
......@@ -647,12 +651,22 @@ While entering the regexp, completion on knows citation keys is possible.
(format "[%c] %s %s" (car x)
(if (> (car x) 31) " " "")
(cdr x)))
format "\n"))))
format "\n")))))
(if (assq key format)
(setq format (cdr (assq key format)))
(error "No citation format associated with key `%c'" key)))))
(defun reftex-citep ()
"Call `reftex-citation' with a format selector `?p'."
(reftex-citation nil ?p))
(defun reftex-citet ()
"Call `reftex-citation' with a format selector `?t'."
(reftex-citation nil ?t))
(defvar reftex-select-bib-map)
(defun reftex-offer-bib-menu ()
;; Offer bib menu and return list of selected items
;;; reftex-global.el - Operations on entire documents with RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-global)
(require 'reftex)
......@@ -191,7 +192,7 @@ one with the `xr' package."
(if (assoc label translate-alist)
(error "Duplicate label %s" label))
(setq new-label (concat (match-string 1 (car entry))
(incf (cdr nr-cell))))
(int-to-string (incf (cdr nr-cell)))))
(push (cons label new-label) translate-alist)
(or (string= label new-label) (setq changed-sequence t))))
This diff is collapsed.
;;; reftex-parse.el - Parser Functions for RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-parse)
(require 'reftex)
......@@ -216,6 +217,8 @@ of master file."
;; Insert in List
(setq toc-entry (reftex-section-info file))
(when toc-entry
;; It can happen that section info returns nil
(setq level (nth 5 toc-entry))
(setq highest-level (min highest-level level))
(if (= level highest-level)
......@@ -225,7 +228,7 @@ of master file."
(nth 6 toc-entry)))
(push toc-entry docstruct)
(setq reftex-active-toc toc-entry))
(setq reftex-active-toc toc-entry)))
((match-end 7)
;; It's an include or input
......@@ -355,6 +358,9 @@ of master file."
;; Carefull: This function expects the match-data to be still in place!
(let* ((marker (set-marker (make-marker) (1- (match-beginning 3))))
(macro (reftex-match-string 3))
(prefix (save-match-data
(if (string-match "begin{\\([^}]+\\)}" macro)
(match-string 1 macro))))
(level-exp (cdr (assoc macro reftex-section-levels-all)))
(level (if (symbolp level-exp)
(save-match-data (funcall level-exp))
......@@ -363,7 +369,9 @@ of master file."
(unnumbered (or star (< level 0)))
(level (abs level))
(section-number (reftex-section-number level unnumbered))
(text1 (save-match-data (save-excursion (reftex-context-substring))))
(text1 (save-match-data
(reftex-context-substring prefix))))
(literal (buffer-substring-no-properties
(1- (match-beginning 3))
(min (point-max) (+ (match-end 0) (length text1) 1))))
......@@ -376,6 +384,7 @@ of master file."
(make-string (* reftex-level-indent level) ?\ )
(if (nth 1 reftex-label-menu-flags) ; section number flag
(concat section-number " "))
(if prefix (concat (capitalize prefix) ": ") "")
(list 'toc "toc" text file marker level section-number
literal (marker-position marker))))
......@@ -908,10 +917,20 @@ of master file."
(forward-list 1))
(error nil)))
(defun reftex-context-substring ()
(defun reftex-context-substring (&optional to-end)
;; Return up to 150 chars from point
;; When point is just after a { or [, limit string to matching parenthesis
;; Environment - find next \end
(min (+ (point) 150)
;; FIXME: THis is not perfect
(if (re-search-forward "\\\\end{" nil t)
(match-beginning 0)
((or (= (preceding-char) ?\{)
(= (preceding-char) ?\[))
;; Inside a list - get only the list.
;;; reftex-ref.el - Code to create labels and references with RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-ref)
(require 'reftex)
......@@ -561,9 +562,12 @@ When called with 2 C-u prefix args, disable magic word recognition."
(setq here-I-am here-I-am1)
(setq typekey (reftex-query-label-type)))
((eq key ?t)
;; toggle table of contents display
;; toggle table of contents display, or change depth
(setq toc (not toc)))
(if current-prefix-arg
(setq reftex-toc-max-level (prefix-numeric-value
(setq toc (not toc))))
((eq key ?F)
;; toggle display of included file borders
;;; reftex-sel.el - The selection modes for RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-sel)
(require 'reftex)
......@@ -180,7 +181,8 @@ During a selection process, these are the local bindings.
((eq (car cell) 'toc)
;; a table of contents entry
(when toc
(when (and toc
(<= (nth 5 cell) reftex-toc-max-level))
(if (eq offset 'attention) (setq offset cell))
(setq reftex-active-toc cell)
(insert (concat toc-indent (nth 2 cell) "\n"))
;;; reftex-toc.el - RefTeX's table of contents mode
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-toc)
(require 'reftex)
......@@ -27,12 +28,16 @@ Here are all local bindings.
(use-local-map reftex-toc-map)
(set (make-local-variable 'revert-buffer-function) 'reftex-toc-revert)
(set (make-local-variable 'reftex-toc-include-labels-indicator) "")
(set (make-local-variable 'reftex-toc-include-index-indicator) "")
(set (make-local-variable 'reftex-toc-max-level-indicator)
(if (= reftex-toc-max-level 100)
(int-to-string reftex-toc-max-level)))
(setq mode-line-format
(list "---- " 'mode-line-buffer-identification
" " 'global-mode-string " (" mode-name ")"
" L<" 'reftex-toc-include-labels-indicator ">"
" I<" 'reftex-toc-include-index-indicator ">"
" T<" 'reftex-toc-max-level-indicator ">"
" -%-"))
(setq truncate-lines t)
(make-local-hook 'post-command-hook)
......@@ -49,6 +54,7 @@ Here are all local bindings.
(defvar reftex-last-window-height nil)
(defvar reftex-toc-include-labels-indicator nil)
(defvar reftex-toc-include-index-indicator nil)
(defvar reftex-toc-max-level-indicator nil)
(defvar reftex-toc-return-marker (make-marker)
"Marker which makes it possible to return from toc to old position.")
......@@ -63,6 +69,7 @@ RET Goto the location and hide the *toc* window (also on mouse-2).
C-c > Display Index. With prefix arg, restrict index to current section.
q / k Hide/Kill *toc* buffer, return to position of reftex-toc command.
l i c F Toggle display of [l]abels, [i]ndex, [c]ontext, [F]ile borders.
t Change maximum toc depth (e.g. `3 t' hides levels greater than 3).
f / g Toggle follow mode on and off / Refresh *toc* buffer.
r / C-u r Reparse the LaTeX document / Reparse entire LaTeX document.
. In other window, show position from where `reftex-toc' was called.
......@@ -281,6 +288,17 @@ Label context is only displayed when the labels are there as well."
(setq reftex-toc-include-context (not reftex-toc-include-context))
(defun reftex-toc-max-level (arg)
"Set the maximum level of toc lines in this buffer to value of prefix ARG.
When no prefix is given, set the max level to a large number, so that all
levels are shown. For eaxample, to set the level to 3, type `3 m'."
(interactive "P")
(setq reftex-toc-max-level (if arg
(prefix-numeric-value arg)
(setq reftex-toc-max-level-indicator
(if arg (int-to-string reftex-toc-max-level) "ALL"))
(defun reftex-toc-view-line ()
"View document location in other window."
......@@ -473,7 +491,7 @@ With prefix arg 1, restrict index to the section at point."
(rassq level
((or (not no-revisit)
(reftex-get-buffer-visiting file))
;; Marker is lost. Use the backup method.
......@@ -535,6 +553,7 @@ With prefix arg 1, restrict index to the section at point."
("F" . reftex-toc-toggle-file-boundary)
("i" . reftex-toc-toggle-index)
("l" . reftex-toc-toggle-labels)
("t" . reftex-toc-max-level)
("c" . reftex-toc-toggle-context)
("%" . reftex-toc-toggle-commented)
("x" . reftex-toc-external)
;;; reftex-vars.el - Configuration variables for RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-vars)
;; Define the two constants which are needed during compilation
......@@ -151,18 +152,18 @@ The following conventions are valid for all alist entries:
(defconst reftex-index-macros-builtin
'((default "Default \\index and \\glossary macros"
(("\\index{*}" "idx" ?i "" nil)
("\\glossary{*}" "glo" ?g "" nil)))
(("\\index{*}" "idx" ?i "" nil t)
("\\glossary{*}" "glo" ?g "" nil t)))
(multind "The multind.sty package"
(("\\index{}{*}" 1 ?i "" nil)))
(("\\index{}{*}" 1 ?i "" nil t)))
(index "The index.sty package"
(("\\index[]{*}" 1 ?i "" nil)
("\\index*[]{*}" 1 ?I "" nil)))
(("\\index[]{*}" 1 ?i "" nil t)
("\\index*[]{*}" 1 ?I "" nil nil)))
(Index-Shortcut "index.sty with \\shortindexingon"
(("\\index[]{*}" 1 ?i "" nil)
("\\index*[]{*}" 1 ?I "" nil)
("^[]{*}" 1 ?^ "" texmathp)
("_[]{*}" 1 ?_ "" texmathp))))
(("\\index[]{*}" 1 ?i "" nil t)
("\\index*[]{*}" 1 ?I "" nil nil)
("^[]{*}" 1 ?^ "" texmathp t)
("_[]{*}" 1 ?_ "" texmathp nil))))
"Builtin stuff for reftex-index-macros.
Lower-case symbols correspond to a style file of the same name in the LaTeX
distribution. Mixed-case symbols are convenience aliases.")
......@@ -186,6 +187,14 @@ distribution. Mixed-case symbols are convenience aliases.")
"A multifile table of contents browser."
:group 'reftex)
(defcustom reftex-toc-max-level 100
"*The maximum level of toc entries which will be included in the TOC.
Section headings with a bigger level will be ignored. In RefTeX, chapters
are level 1, sections are level 2 etc.
This variable can be changed from within the *toc* buffer with the `t' key."
:group 'reftex-table-of-contents-browser
:type 'integer)
(defcustom reftex-toc-keep-other-windows t
"*Non-nil means, split the selected window to display the *toc* buffer.
This helps to keep the window configuration, but makes the *toc* small.
......@@ -284,7 +293,7 @@ The value of the variable must be a list of items. Each item is a list
itself and has the following structure:
(MAGIC-WORD ... ))
Each list entry describes either an environment carrying a counter for use
with \\label and \\ref, or a LaTeX macro defining a label as (or inside)
......@@ -385,6 +394,14 @@ MAGIC-WORDS
strings are interpreted as regular expressions. RefTeX will add
a \"\\\\W\" to the beginning and other stuff to the end of the regexp.
The integer level at which this environment should be added to the
table of contents. See also `reftex-section-levels'. A positive
value will number the entries mixed with the sectioning commands of
the same level. A negative value will make unnumbered entries.
Useful only for theorem-like environments, will be ignored for macros.
When omitted or nil, no TOC entries will be made.
If the type indicator characters of two or more entries are the same, RefTeX
will use
- the first non-nil format and prefix
......@@ -425,7 +442,10 @@ list. However, builtin defaults should normally be set with the variable
(const :tag "Eqnarray-like" eqnarray-like)
(const :tag "Alignat-like" alignat-like)
(symbol :tag "Function" my-func))
(repeat :tag "Magic words" :extra-offset 2 (string)))
(repeat :tag "Magic words" :extra-offset 2 (string))
(option (choice :tag "Make TOC entry "
(const :tag "No entry" nil)
(integer :tag "Level" :value -3))))
:tag "Package"
:value AMSTeX
......@@ -982,7 +1002,7 @@ These correspond to the makeindex keywords LEVEL ENCAP ACTUAL QUOTE ESCAPE."
(defcustom reftex-index-macros nil
"Macros which define index entries. The structure is
MACRO is the macro. Arguments should be denoted by empty braces like
\\index[]{*}. Use square brackets to denote optional arguments. The star
......@@ -1004,6 +1024,11 @@ EXCLUDE can be a function. If this function exists and returns a non-nil
value, the index entry at point is ignored. This was implemented to support
the (deprecated) `^' and `_' shortcuts in the LaTeX2e `index' package.
REPEAT, if non-nil, means the index macro does not typeset the entry in
the text, so that the text has to be repeated outside the index macro.
Needed for `reftex-index-selection-or-word' and for indexing from the
phrase buffer.
The final entry may also be a symbol if this entry has a association
in the variable `reftex-index-macros-builtin' to specify the main
indexing package you are using. Legal values are currently
......@@ -1027,7 +1052,8 @@ package here."
(integer :tag "Macro arg Nr" :value 1))
(character :tag "Access Key ")
(string :tag "Key Prefix ")
(symbol :tag "Exclusion hook ")))
(symbol :tag "Exclusion hook ")
(boolean :tag "Repeat Outside ")))
:tag "Package:"
(choice :tag "Package"
......@@ -1039,25 +1065,21 @@ package here."
(nth 0 x)))
(defcustom reftex-index-default-macro '(?i "idx" t)
(defcustom reftex-index-default-macro '(?i "idx")
"The default index macro for \\[reftex-index-selection-or-word].
This is a list with (MACRO-KEY DEFAULT-TAG).
MACRO-KEY: Character identifying an index macro - see `reftex-index-macros'.
DEFAULT-TAG: This is the tag to be used if the macro requires a TAG argument.
When this is nil and a TAG is needed, RefTeX will ask for it.
When this is the empty string and the TAG argument of the index
macro is optional, the TAG argument will be omitted.
REPEAT-WORD: Non-nil means, the index macro does not typeset the entry in
the text, so that the text has to be repeated outside the index
macro is optional, the TAG argument will be omitted."
:group 'reftex-index-support
:type '(list
(character :tag "Character identifying default macro")
(choice :tag "Default index tag "
(const nil)
(boolean :tag "Word needs to be repeated ")))
(defcustom reftex-index-default-tag "idx"
"Default index tag.
......@@ -1085,6 +1107,80 @@ Requires the `texmathp.el' library which is part of AUCTeX."
:group 'reftex-index-support
:type 'string)
(defcustom reftex-index-phrases-logical-and-regexp " *&& *"
"Regexp matching the `and' operator for index arguments in phrases file.
When several index arguments in a phrase line are separated by this
operator, each part will generate an index macro. So each match of
the search phrase will produce *several* different index entries.
Note: make sure this does no match things which are not separators.
This logical `and' has higher priority than the logical `or' specified in
:group 'reftex-index-support
:type 'regexp)
(defcustom reftex-index-phrases-logical-or-regexp " *|| *"
"Regexp matching the `or' operator for index arguments in phrases file.
When several index arguments in a phrase line are separated by this
operator, the user will be asked to select one of them at each match
of the search phrase. The first index arg will be the default - a
number key 1-9 must be pressed to switch to another.
Note: make sure this does no match things which are not separators.
The logical `and' specified in `reftex-index-phrases-logical-or-regexp'
has higher priority than this logical `or'."
:group 'reftex-index-support
:type 'regexp)
(defcustom reftex-index-phrases-search-whole-words t
"*Non-nil means phrases search will look for whole words, not subwords.
This works by requiring word boundaries at the beginning and end of
the search string. When the search phrase already has a non-word-char
at one of these points, no word boundary is required there."
:group 'reftex-index-support
:type 'boolean)
(defcustom reftex-index-phrases-case-fold-search t
"*Non-nil means, searching for index phrases will ignore case."
:group 'reftex-index-support
:type 'boolean)
(defcustom reftex-index-phrases-skip-indexed-matches nil
"*Non-nil means, skip matches which appear to be indexed already.
When doing global indexing from the phrases buffer, searches for some
phrases may match at places where that phrase was already indexed. In
particular when indexing an already processed document again, this
will even be the norm. When this variable is non-nil, RefTeX checks if
the match is an index macro argument, or if an index macro is directly
before or after the phrase. If that is the case, that match will
be ignored."
:group 'reftex-index-support
:type 'boolean)
(defcustom reftex-index-phrases-wrap-long-lines nil
"*Non-nil means, when indexing from the phrases buffer, wrap lines.
Inserting indexing commands in a line makes the line longer - often
so long that it does not fit onto the screen. When this variable is
non-nil, newlines will be added as necessary before and/or after the
indexing command to keep lines short. However, the matched text
phrase and its index command will always end up on a single line.")
(defcustom reftex-index-phrases-sort-prefers-entry nil
"*Non-nil means when sorting phrase lines, the explicit index entry is used.
Phrase lines in the phrases buffer contain a search phrase, and
sorting is normally based on these. Some phrase lines also have
an explicit index argument specified. When this variable is non-nil,
the index argument will be used for sorting."
:group 'reftex-index-support
:type 'boolean)
(defcustom reftex-index-phrases-sort-in-blocks t
"*Non-nil means, empty and comment lines separate phrase buffer into blocks.
Sorting will then preserve blocks, so that lines are re-arranged only
within blocks."
:group 'reftex-index-support
:type 'boolean)
(defcustom reftex-index-section-letters "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"The letters which denote sections in the index.
Usually these are all capital letters. Don't use any downcase letters.
;;; reftex-vcr.el - Viewing cross references and citations with RefTeX
;;; Version: 4.6
;;; Version: 4.9
;;; See main file reftex.el for licensing information
(eval-when-compile (require 'cl))
(provide 'reftex-vcr)
(require 'reftex)
......@@ -2,7 +2,7 @@
;; Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc.
;; Author: Carsten Dominik <>
;; Version: 4.6
;; Version: 4.9
;; Keywords: tex
;; This file is not part of GNU Emacs.
......@@ -32,6 +32,7 @@
;; - Labels are created semi-automatically.
;; - Definition context of labels is provided when creating a reference.
;; - Citations are simplified with efficient database lookup.
;; - Text phrases can be collected in a file, for later global indexing.
;; - The index preview buffer helps to check and edit index entries.
......@@ -67,6 +68,43 @@
;; Introduction
;; ************
;; RefTeX is a specialized package for support of labels, references,
;; citations, and the index in LaTeX. RefTeX wraps itself round 4 LaTeX
;; macros: `\label', `\ref', `\cite', and `\index'. Using these macros
;; usually requires looking up different parts of the document and
;; searching through BibTeX database files. RefTeX automates these
;; time-consuming tasks almost entirely. It also provides functions to
;; display the structure of a document and to move around in this
;; structure quickly.
;; *Note Imprint::, for information about who to contact for help, bug
;; reports or suggestions.
;; Environment
;; ===========
;; RefTeX needs to access all files which are part of a multifile
;; document, and the BibTeX database files requested by the
;; `\bibliography' command. To find these files, RefTeX will require a
;; search path, i.e. a list of directories to check. Normally this list
;; is stored in the environment variables `TEXINPUTS' and `BIBINPUTS'
;; which are also used by RefTeX. However, on some systems these
;; variables do not contain the full search path. If RefTeX does not work
;; for you because it cannot find some files, read *Note Finding Files::.
;; Entering RefTeX Mode
;; ====================
;; To turn RefTeX Mode on and off in a particular buffer, use `M-x
;; reftex-mode'. To turn on RefTeX Mode for all LaTeX files, add the
;; following lines to your `.emacs' file:
;; (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
;; (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
;; RefTeX in a Nutshell
;; ====================
......@@ -107,7 +145,7 @@
;; Typing `C-c [' (`reftex-citation') will let you specify a regular
;; expression to search in current BibTeX database files (as
;; specified in the `\bibliography' command) and pull out a list of
;; matches for you to choose from. The list is *formatted* and
;; matches for you to choose from. The list is _formatted_ and
;; sorted. The selected article is referenced as `\cite{KEY}' (see
;; the variable `reftex-cite-format' if you want to insert different
;; macros).
......@@ -121,21 +159,22 @@
;; are supported.
;; * Creating Index Entries
;; Type `C-c /' (`reftex-index-selection-or-word') to index the
;; current selection or the word at the cursor with the default
;; macro (see the variable `reftex-index-default-macro').
;; Type `C-c <' (`reftex-index') to insert a general index macro.
;; RefTeX will offer a list of available macros and provide
;; completion for the index tag (used to identify one of
;; multiple indices) and for the entry itself (useful with
;; subentries).
;; To index the current selection or the word at point, type
;; `C-c /' (`reftex-index-selection-or-word'). The default macro
;; `reftex-index-default-macro' will be used. For a more
;; complex entry type `C-c <' (`reftex-index'), select any of
;; the index macros and enter the arguments with completion.
;; * The Index Phrases File (Delayed Indexing)
;; Type `C-c \' (`reftex-index-phrase-selection-or-word') to add
;; the current word or selection to a special _index phrase
;; file_. RefTeX can later search the document for occurrences
;; of these phrases and let you interactively index the matches.
;; * Displaying the Index
;; * Displaying and Editing the Index
;; To display the compiled index in a special buffer, type `C-c