Next: , Previous: , Up: Indices   [Contents][Index]


10.3 Advanced Indexing Commands

Texinfo provides several commands for doing advanced indexing, similar to the indices you may see in professionally published books.

First, you can create multilevel index entries, allowing you to group many related subtopics under the same higher-level topic. You do this by separating the parts of such an entry with the @subentry command. Such commands might look like this:

@cindex Superhumans @subentry villains
@cindex Superhumans @subentry heroes

You may have up to three levels in an entry:

@cindex coffee makers @subentry electric @subentry pink
@cindex coffee makers @subentry electric @subentry blue

You can use the @sortas command mentioned earlier with any or all of the three parts of an entry to cause them to sort differently than they would by default.

Second, you may provide an index entry that points to another, using the @seeentry (“see entry”) command. For example:

@cindex Indexes @seeentry{Indices}

Such an entry should be unique in your document; the idea is to redirect the reader to the other entry where they will find all the information they are looking for.

Finally, you may provide a “see also” entry using the @seealso command. These entries go along with regular entries, and are grouped together with them in the final printed index. For example:

@cindex Coffee
@cindex Coffee @subentry With milk and sugar
@cindex Coffee @subentry With doughnuts
@cindex Coffee @subentry Decaffeinated
@cindex Coffee @seealso{Tea}

When using all three of these advanced commands, do not place a comma between the different parts of the index text. The texindex program, which sorts the index entries and generates the indexing formatting commands, takes care of placing commas in the correct places for you.

These features are most useful with printed documents created with TeX, and when translating Texinfo to DocBook.


Next: Making Index Entries, Previous: Defining the Entries of an Index, Up: Indices   [Contents][Index]