Direc­tory indexing/addindex

Q: What is this?
A: This is the first version of addindex.  Bugs, fixes, comments and
suggestions should be sent to Yossi Gil (yogi@cs.ubc.ca). It has been
tested on Sun Sparc station only. Modifications for other systems should be
easy. The program is supplied on an as is basis. Use at your own
risk.

Q: What is it good for?
A: 'addindex' is a  program for adding index entries to LaTeX files.
It is most useful for adding Names (such as Knuth, Donald Ervin)
index to an existing files.

Q: How to use?
A: There are two steps in using the program:
1) Prepare a names database or use the example database enclosed.
(instructions for preparing a database are given later)
2) Invoke the program by
This will add the \index{} entries to the files named in the command
line. A backup copy of each of files processed will be created.
The old version of krack.tex will be called krack.tex.BAK.
You can also use addindex as a filter:
cat myfile.tex | addindex |  more

Q: Can 'addindex' be used on files which already have index commands?
A: Yes. Further, 'addindex' will make a reasonable effort to avoid
inserting double index commands, index to commands such as
\cite{Knu:Gnat:71} etc. When you edit your files keep in mind
that the index command should follow the  indexed entry
immediately.

Q: What should I know before using the program?
A: All about 'makeindex' and 'latex' programs!

Q: How do I compile the program?
A: If you are on sun sparc station just use make. Season and hack to
taste on others systems.

Q: How do I prepare the names database?
A: Start with the enclosed example. The format is quite rigid so don't
mess with it. An entry is in the form:
@string{Knuth = "Knuth, Donald Ervin"}.
Which when processed by 'addindex' will add an index entry
of "Knuth, Donald Ervin" to any mention of the name Knuth in the
text.

Q: Are duplicate entries in the database permitted?
A: Yes, only the first occurence of each entry is significant.
note that this is different than the operation of BiBTeX.

Q: What name should I use for the names database?
A: The default name is 'names.bib'. You can change this name to
any othe name by setting the environment variable INDEXDB.

Q: Where should I put the names database?
A: Normally, in the current directory. However, 'addindex' will
look for the index in the directories specified in the environment
variables: INDEXINPUTS, BIBINPUTS, TEXINPUTS, PATH.

Q: Examples?
A: A very short example file called is provided. Try running:
b) 'addindex example.tex' and then 'diff example.tex example.tex.BAK'

Q: 'addindex' looks like a last moment hack and not like a real
program. Is this true.
A: Yes, 'addindex' was done in a few hours of hacking. Do you care
enough to improve it?

Q: What does the author expect in return for using his program?
A: Not much. If you compile your own names database, please send a
copy to me: yogi@cs.ubc.ca.



Down­load the con­tents of this pack­age in one zip archive (9.9k).

addin­dex – Add in­dex en­tries to LaTeX doc­u­ment

Ad­din­dex is C/Lex pro­gram to add in­dex en­tries to a LaTeX doc­u­ment. You start with a ‘names database’, which looks like the strings sec­tion of a BibTeX database; addin­dex scans your LaTeX file for strings in the database, and adds \in­dex com­mands for each match.

 Pack­age addin­dex Ver­sion 1992-01-13 Li­cense Un­known Sta­tus, No In­for­ma­tion Avail­able Main­tainer Yossi Gil Topics in­dex sup­port