Index of /archives/text/CTAN/indexing/addindex
Name Last modified Size Description
Parent Directory -
Makefile 1992-01-13 09:00 278
README 1992-01-13 09:00 2.9K
addindex.lex 1992-01-13 09:00 3.9K
example.tex 1992-01-13 09:00 553
inplace.c 1992-01-13 09:00 2.7K
names.bib 1992-01-13 09:00 13K
scanpath.c 1992-01-13 09:00 835
Q: What is this?
A: This is the first version of addindex. Bugs, fixes, comments and
suggestions should be sent to Yossi Gil ([email protected]). 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
addindex file[s]
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:
a) addindex < example.tex | addindex | addindex | addindex
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: [email protected].