Variable: reftex-index-macros

reftex-index-macros is a customizable variable defined in reftex-vars.el.gz.

Value

nil

Documentation

Macros which define index entries.

The structure is

(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)

MACRO is the macro. Arguments should be denoted by empty braces like
\index[]{*}. Use square brackets to denote optional arguments. The star
marks where the index key is.

INDEX-TAG is a short name of the index. "idx" and "glo" are reserved for the default index and the glossary. Other indices can be defined as well. If this is an integer, the Nth argument of the macro holds the index tag.

KEY is a character which is used to identify the macro for input with M-x reftex-index (reftex-index). ?i, ?I, and ?g are reserved for default index and glossary.

PREFIX can be a prefix which is added to the KEY part of the index entry. If you have a macro \newcommand{\molec}[1]{#1\index{Molecules!#1}}, this prefix should be "Molecules!". See the manual for details.

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 an association in the variable reftex-index-macros-builtin to specify the main indexing package you are using. Valid values are currently
default The LaTeX default - unnecessary to specify this one
multind The multind.sty package
index The index.sty package
index-shortcut The index.sty packages with the ^ and _ shortcuts.
                Should not be used - only for old documents.
Note that AUCTeX sets these things internally for RefTeX as well, so with a sufficiently new version of AUCTeX, you should not set the package here.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/reftex-vars.el.gz
(defcustom reftex-index-macros nil
  "Macros which define index entries.

The structure is

\(MACRO INDEX-TAG KEY PREFIX EXCLUDE REPEAT)

MACRO is the macro.  Arguments should be denoted by empty braces like
\\index[]{*}.  Use square brackets to denote optional arguments.  The star
marks where the index key is.

INDEX-TAG is a short name of the index.  \"idx\" and \"glo\" are
reserved for the default index and the glossary.  Other indices can be
defined as well.  If this is an integer, the Nth argument of the macro
holds the index tag.

KEY is a character which is used to identify the macro for input with
\\[reftex-index].  ?i, ?I, and ?g are reserved for default index and glossary.

PREFIX can be a prefix which is added to the KEY part of the index entry.
If you have a macro \\newcommand{\\molec}[1]{#1\\index{Molecules!#1}}, this
prefix should be \"Molecules!\".  See the manual for details.

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 an association
in the variable `reftex-index-macros-builtin' to specify the main
indexing package you are using.  Valid values are currently
default         The LaTeX default - unnecessary to specify this one
multind         The multind.sty package
index           The index.sty package
index-shortcut  The index.sty packages with the ^ and _ shortcuts.
                Should not be used - only for old documents.
Note that AUCTeX sets these things internally for RefTeX as well, so
with a sufficiently new version of AUCTeX, you should not set the
package here."
  :group 'reftex-index-support
  :set #'reftex-set-dirty
  :type `(list
          (repeat
           :inline t
           (list :value ("" "idx" ?a "" nil)
                 (string  :tag "Macro with args")
                 (choice  :tag "Index Tag      "
                         (string)
                         (integer :tag "Macro arg Nr" :value 1))
                 (character :tag "Access Key     ")
                 (string  :tag "Key Prefix     ")
                 (symbol  :tag "Exclusion hook ")
                 (boolean :tag "Repeat Outside ")))
          (option
           :tag "Package:"
           (choice :tag "Package"
                   :value index
                   ,@(mapcar
                      (lambda (x)
                        (list 'const :tag (concat (symbol-name (nth 0 x))
                                                  ": " (nth 1 x))
                              (nth 0 x)))
                      reftex-index-macros-builtin)))))