I am writing a book that mentions many people. Say that I mention Donald Knuth on a page. I would have:
... Donald Knuth\index{Knuth, Donald}
In many other places I have mentioned Donald Knuth. Right now it seems that I need to manually add the \index
everywhere I mention Dr. Knuth. Is there a way that I can just declare Knuth as an indexed term and have this done automatically?
This is different than the question discussed in Auto generate an Index.
And, alas, the 29-line program https://github.com/themoodymann/IndexTex is over-aggressive about indexing. It also does not remove \index{}
entries that have been inserted when the text changes.
I would like to do the following:
- Define all of the names that I care about.
- Have LaTeX automatically index the names when they are encountered.
- Have the option of automatically italicizing the name on first reference.
- Have the option of automatically adding birth and possibly death dates on first reference.