Next: Displaying and Editing the Index, Previous: Creating Index Entries, Up: Index Support [Contents][Index]

### 5.2 The Index Phrases File

RefTeX maintains a file in which phrases can be collected for later indexing. The file is located in the same directory as the master file of the document and has the extension `.rip` (Reftex Index Phrases). You can create or visit the file with `C-c |` (`reftex-index-visit-phrases-buffer`). If the file is empty it is initialized by inserting a file header which contains the definition of the available index macros. This list is initialized from `reftex-index-macros` (see Defining Index Macros). You can edit the header as needed, but if you define new LaTeX indexing macros, don’t forget to add them to `reftex-index-macros` as well. Here is a phrase file header example:

    % -*- mode: reftex-index-phrases -*-
    %                           Key   Macro Format       Repeat
    %----------------------------------------------------------
    >>>INDEX_MACRO_DEFINITION:   i    \index{%s}          t
    >>>INDEX_MACRO_DEFINITION:   I    \index*{%s}         nil
    >>>INDEX_MACRO_DEFINITION:   g    \glossary{%s}       t
    >>>INDEX_MACRO_DEFINITION:   n    \index*[name]{%s}   nil
    %----------------------------------------------------------

The macro definition lines consist of a unique letter identifying a macro, a format string and the repeat flag, all separated by `TAB`. The format string shows how the macro is to be applied, the ‘`%s`’ will be replaced with the index entry. The repeat flag indicates if word is indexed by the macro as ‘`\index{word}`’ (repeat = `nil`) or as ‘`\index{word}word`’ (repeat = `t`). In the above example it is assumed that the macro `\index*{word}` already typesets its argument in the text, so that it is unnecessary to repeat word outside the macro.

Next: Displaying and Editing the Index, Previous: Creating Index Entries, Up: Index Support [Contents][Index]