MacroTeXTechnical Typesetting and Book Production
Home What we do Support Samples Contacts

Adding index tags to a LaTeX document (best practice)

When tagging a file for indexing, you will be using the \index command. If you are not careful with this command, spurious spaces and incorrect index entries may occur. Please follow these guidelines to avoid such problems.

If you want to put the index mark at the start of a word or a phrase, put the \index before the text with no intervening space. For example,

The dog is hit with a stick and turns and bites the stick. Animals
repel attack and fight their enemies to death. The primitive man
vented his \index{revenge}hatred and vengeance on things animate and
inanimate. In the tribes no injury was satisfied until some member of
the offending tribe was killed.

If you want to put the index mark at the end of a word or a phrase, put the \index before the text with no intervening space. For example,

Taking away the liberty of another has only one justification. The
great mass of people in any community must and will act for
self-defense.\index{reasons for incarceration}
Home What we do Support Samples Contacts
Copyright 1999, 2001-2004 Macrotex Services. Check that this is valid XHTML 1.0  valid xhtml 1.0 logo