2

My makefile for compiling my document runs makeindex after pdflatex. I recently noticed the index was no longer being emitted into the pdf, with no obvious cause (I didn't mess around with the document's major structure or preamble).

Here's what's weird: if I rollback the document sources to an earlier version (which definitely did produce a correct index) then the rolled-back version also has no index.

The log file contains

runsystem(makeindex book.idx)...executed.

Investigating, I see book.idx is being produced as expected from book.pdf (i.e. it has contents which reflect what the index ought to contain), but when I run makeindex in the output directory:

This is makeindex, version 2.15 [TeX Live 2015] (kpathsea + Thai support).
Scanning input file book...done (0 entries accepted, 0 rejected).
Nothing written in book.ind.
Transcript written in book.ilg.

After this, book.ind is empty. However, if I do this

mkdir tmp
cp book.idx tmp
cd tmp
makeindex

then book.ind is created as expected, with what seem to be the correct Tex commands to render an index.

This is makeindex, version 2.15 [TeX Live 2015] (kpathsea + Thai support).
Scanning input file book.idx....done (10 entries accepted, 0 rejected).
Sorting entries....done (31 comparisons).
Generating output file book.ind....done (28 lines written, 0 warnings).
Output written in book.ind.
Transcript written in book.ilg.

In a nutshell: if I run makeindex in a directory containing only book.idx then it works, otherwise it is as if book.idx is empty. The rest of the document is compiling and rendering correctly. What's up with makeindex?

spraff
  • 1,501
  • This is difficult to track without seeing any line of code, but I suspect some issues with file permissions –  Jul 11 '17 at 20:00
  • It is pretty unclear, where, when, how often makeindex is called. If it is called in the Makefile, why does it appear in the .log file of pdflatex? Or do you use package imakeidx or run makeindex via the \write18 feature? If the latter is true, it is run before or after \makeindex? At any case book.idx seems to be empty in the first case of the question. Is the output directory different from the source directory? – Heiko Oberdiek Jul 11 '17 at 20:30

1 Answers1

0

Changing the command from makeindex book to makeindex book.idx seems to have fixed the issue.

I guess there was a package update.

spraff
  • 1,501