[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.3 Displaying and Editing the Index

In order to compile and display the index, press C-c >. If the document uses multiple indices, RefTeX will ask you to select one. Then, all index entries will be sorted alphabetically and displayed in a special buffer, the ‘*Index*’ buffer. From that buffer you can check and edit each entry.

The index can be restricted to the current section or the region. Then only entries in that part of the document will go into the compiled index. To restrict to the current section, use a numeric prefix ‘2’, thus press C-u 2 C-c >. To restrict to the current region, make the region active and use a numeric prefix ‘3’ (press C-u 3 C-c >). From within the ‘*Index*’ buffer the restriction can be moved from one section to the next by pressing the < and > keys.

One caveat: RefTeX finds the definition point of an index entry by searching near the buffer position where it had found to macro during scanning. If you have several identical index entries in the same buffer and significant changes have shifted the entries around, you must rescan the buffer to ensure the correspondence between the ‘*Index*’ buffer and the definition locations. It is therefore advisable to rescan the document (with r or C-u r) frequently while editing the index from the ‘*Index*’ buffer.

Here is a list of special commands available in the ‘*Index*’ buffer. A summary of this information is always available by pressing ?.

General
?

Display a summary of commands.

0-9, -

Prefix argument.

Moving around
! A..Z

Pressing any capital letter will jump to the corresponding section in the ‘*Index*’ buffer. The exclamation mark is special and jumps to the first entries alphabetically sorted below ‘A’. These are usually non-alphanumeric characters.

n

Go to next entry.

p

Go to previous entry.

Access to document locations
<SPC>

Show the place in the document where this index entry is defined.

<TAB>

Go to the definition of the current index entry in another window.

<RET>

Go to the definition of the current index entry and hide the ‘*Index*’ buffer window.

f

Toggle follow mode. When follow mode is active, the other window will always show the location corresponding to the line in the ‘*Index*’ buffer at point. This is similar to pressing <SPC> after each cursor motion. The default for this flag can be set with the variable reftex-index-follow-mode. Note that only context in files already visited is shown. RefTeX will not visit a file just for follow mode. See, however, the variable reftex-revisit-to-follow.

Entry editing
e

Edit the current index entry. In the minibuffer, you can edit the index macro which defines this entry.

C-k

Kill the index entry. Currently not implemented because I don't know how to implement an undo function for this.

*

Edit the key part of the entry. This is the initial part of the entry which determines the location of the entry in the index.

|

Edit the attribute part of the entry. This is the part after the vertical bar. With MakeIndex, this part is an encapsulating macro. With xindy, it is called attribute and is a property of the index entry that can lead to special formatting. When called with C-u prefix, kill the entire attribute part.

@

Edit the visual part of the entry. This is the part after the ‘@’ which is used by MakeIndex to change the visual appearance of the entry in the index. When called with C-u prefix, kill the entire visual part.

(

Toggle the beginning of page range property ‘|(’ of the entry.

)

Toggle the end of page range property ‘|)’ of the entry.

_

Make the current entry a subentry. This command will prompt for the superordinate entry and insert it.

^

Remove the highest superordinate entry. If the current entry is a subitem (‘aaa!bbb!ccc’), this function moves it up the hierarchy (‘bbb!ccc’).

Exiting
q

Hide the ‘*Index*’ buffer.

k

Kill the ‘*Index*’ buffer.

C-c =

Switch to the Table of Contents buffer of this document.

Controlling what gets displayed
c

Toggle the display of short context in the ‘*Index*’ buffer. The default for this flag can be set with the variable reftex-index-include-context.

}

Restrict the index to a single document section. The corresponding section number will be displayed in the R<> indicator in the mode line and in the header of the ‘*Index*’ buffer.

{

Widen the index to contain all entries of the document.

<

When the index is currently restricted, move the restriction to the previous section.

>

When the index is currently restricted, move the restriction to the next section.

Updating the buffer
g

Rebuild the ‘*Index*’ buffer. This does not rescan the document. However, it sorts the entries again, so that edited entries will move to the correct position.

r

Reparse the LaTeX document and rebuild the ‘*Index*’ buffer. When reftex-enable-partial-scans is non-nil, rescan only the file this location is defined in, not the entire document.

C-u r

Reparse the entire LaTeX document and rebuild the ‘*Index*’ buffer.

s

Switch to a different index (for documents with multiple indices).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ralf Angeli on August, 9 2009 using texi2html 1.78.