10.1 Predefined Indices

Texinfo provides six predefined indices. Here are their nominal meanings, abbreviations, and the corresponding index entry commands:


(@cindex) Concept index, for general concepts.


(@findex) Function index, for function and function-like names (such as entry points of libraries).


(@kindex) Keystroke index, for keyboard commands.


(@pindex) Program index, for names of programs.


(@tindex) Data type index, for type names (such as structures defined in header files).


(@vindex) Variable index, for variable names (such as library global variables).

Not every manual needs all of these, and most manuals use only two or three at most. The present manual, for example, has two indices: a concept index and an @-command index. (The latter is actually the function index but is called a command index in the chapter heading.)

You are not required to use the predefined indices strictly for their canonical purposes. For example, suppose you wish to index some C preprocessor macros. You could put them in the function index along with actual functions, just by writing @findex commands for them; then, when you print the “Function Index” as an unnumbered chapter, you could give it the title ‘Function and Macro Index’ and all will be consistent for the reader.

On the other hand, it is best not to stray too far from the meaning of the predefined indices. Otherwise, in the event that your text is combined with other text from other manuals, the index entries will not match up. Instead, define your own new index (see Defining New Indices).

We recommend having a single index in the final document whenever possible, however many source indices you use, since then readers have only one place to look. Two or more source indices can be combined into one output index by using the @synindex or @syncodeindex commands (see Combining Indices).

Index entry commands based on the the two letter index names are also valid, for example @cpindex can be used instead of @cindex.