I am familiar with the creation of multiple indexes using the multind package. One of the required steps is to run the makeindex executable for each generated .idx file. A typical solution would be do do something along the following lines (this is unix; windows users look the other way):

for file in *.idx; do
    makeindex ${file}

A disadvantage of this approach is that it may process too many .idx files. Is there an easy way to determine which .idx files are really required?

  • @martin Thanks for the link. I want to have a solution where I don't need to know about the names of the index files. They should be detected automatically. Why do you think the link is relevant?
    – user10274
    Jan 2, 2012 at 14:58

2 Answers 2


Just use a Makefile (or a utility such as latexmk, latexmake, latex-make).

For example, create a Makefile file: (<TAB> stands for a tabulation character):

indexes := $(patsubst %.idx,%.ind,$(wildcard *.idx))
all: $(indexes) # and other stuff
%.ind: %.idx
<TAB>   makeidx $^

Then, just issue a make command. This can be obviously enhanced, but make is really a good starting point.

  • Dubac Thanks. I'll have a look at the Makefile option. I had tried latexmk but that didn't work (unless I did something wrong).
    – user10274
    Jan 2, 2012 at 9:56

multind is not the package of choice for multiple indexes: it's almost featureless and too simplistic. The TeX FAQ entry Multiple indexes lists some other possibilities


The last one (of which I'm one of the authors) frees you from the problem, as it executes automatically makeindex.

  • Thanks for that. Unfortunately, I need the information for multind. Does automatically running makeindex require enabling write18?
    – user10274
    Jan 2, 2012 at 10:50
  • @MarcvanDongen If you have a recent TeX Live (2010 or later) or MiKTeX 2.9, makeindex is listed in the allowed programs for the "restricted shell-escape" that's enabled by default.
    – egreg
    Jan 2, 2012 at 10:55
  • Yes, I remember I just read that two days ago:) Funny how easy you (well, I) forget things like this.
    – user10274
    Jan 2, 2012 at 10:57

You must log in to answer this question.