2

I have a problem relating to using \makeindex in TeXnicCenter. I use different indexes (such as \makeindex{name} and \makeindex{place}), but TeXnicCenter gives a warning asking for nameoftexfile.idx. This file should not exist, but the files name.idx and place.idx seems to be made the way they should.

What "Command line arguments to pass to MakeIndex" should I use in the build setting when I have several named indexes?

  • It is more important where the files are than how many. Try Build=>Define Output Profiles=>Wizard and store your files anywhere in the makeindex folder (you can create a new subfolder for you own files). – John Kormylo May 8 '14 at 12:32
  • I use this on TeXstudio: "/usr/local/texlive/2013/bin/i386-linux/makeindex" ?*.idx. – Sigur May 8 '14 at 14:47
  • Not sure I understand. I currently have the "Path to MakeIndex executable:" as C:\Program Files\MiKTeX 2.9\miktex\bin\x64\makeindex.exe. The idx-files are generated in the same folder as my tex-file. – Mykje May 8 '14 at 18:56
  • If I name one of the indexes the same as my tex-file the index is printed as it shall. I can also get TeXnixCenter to process other idx.files by stating the name in the arguments passed to MakeIndex, but it is then merged and sorted with the index with the same name as the tex-file. For some reason it will not print two indexes. – Mykje Sep 20 '14 at 13:33
2

The problem you have is---if I understand your question right---that you need to process more than one index file.

The general way in your case is (let's say you code is in file mwe.tex):

  1. run pdflatex mwe.tex. No check the directory of this file. There you will find several files *.idx, depending on your code you did not show us.
  2. Now you have to run makeindex with each of the created idx files. To do that in one run write an batch file and add there all makeindex runs you need.
  3. In the relevant TeXniccenter output profile add the batch file mybatch.bat into the postprocessor. Then, if you compile your mwe.tex file is the batch file automatic run afterwards, so that with the next compile run(s) you will see the resulting indices in your document.

Example for the batch file mybatch.bat:

@echo off
makeindex name.idx -t name.ilg -o name.ind -s nomencl.ist
makeindex place.idx -t place-ilg -o place.ind -s nomencl.ist

Add more lines if needed. Change the names name and place as needed. If you have an own index style or several styles change -s nomencl.ist to the right style file name.

If you show us a complete MWE I can show you the screenshots for the configuration you need for TeXnicCenter 2.0 stable.

  • If I execute the commands using a script or typing in a command window I get it right, but for some reason running it through TeXnicCenter fails. – Mykje Sep 6 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.