@printindex
takes one argument, a two-letter index
abbreviation. You must include the @printindex
command at the
place in the document where you want the index to appear. This does
not happen automatically just because you use @cindex
or other
index-entry generating commands in the Texinfo file; those just cause
the raw data for the index to be accumulated.
You should precede the @printindex
command with
a suitable section or chapter command (usually @appendix
or
@unnumbered
) to supply the chapter heading and put the index
into the table of contents. Precede the chapter heading with an
@node
line as usual.
For example:
@node Variable Index @unnumbered Variable Index @printindex vr
@node Concept Index @unnumbered Concept Index @printindex cp
The text ‘Index’ needs to appear in the name of the node containing the index for the index to be found by Info readers.
If you have more than one index, we recommend placing the concept index last.
Other details of index output in output formats:
texindex
(see Formatting and Printing with TeX)
to sort the raw data to produce a sorted index file. The sorted index
file is what is actually used to print the index.
@printindex
reads the corresponding sorted index file and produces
a traditional two-column index, with index terms and page numbers.
@printindex
produces a special menu containing
the line number of the entry, relative to the start of the node. Info
readers can use this to go to the exact line of an entry, not just the
containing node. (Older Info readers will just go to the node.)
Here’s an example:
* First index entry: Top. (line 7)
@printindex
formatting is usually similar to a
menu in Info, showing the line number of each entry relative to the start of
the file.
@printindex
produces links to the index
entries.