The following command sequence shows you the code inserted into the body of the text to add an index entry to your document:
<indexterm> <-- indicates a term to be placed in the index
<primary>foo</primary> <-- indicates that "foo" is the first term
<secondary>bar</secondary> <-- "bar" will be listed under "foo"
</indexterm> <-- closes this index entry
The <seealso>
tag allows you to
reference another index entry or refer to another manual. Make sure
the <seealso>
reference you are pointing to
has its own entry. For example:
<indexterm>
<primary>SWAK</primary>
<seealso>salutations</seealso>
</indexterm>
<indexterm>
<primary>salutations</primary>
</indexterm>
The <see>
tag allows you to reference to
another index entry entirely. For example:
<indexterm>
<primary>Guinness</primary>
<see>beer</see> <-- beer will be listed under
the Guinness entry, but you must make sure beer also has its
own entry to refer to.
</indexterm>
<indexterm>
<primary>beer</primary>
</indexterm>
To view the HTML output of the index entries shown here, refer
to the generated-index.html
file at the end of
this document.
How does the index get generated? If indexterms exist in the
document and the beginning and ending index tags exist before the end
tag for the book or article, an index is created because of the
generate.index
stylesheet parameter, which is set to
true by default.