[Tex/LaTex] Error: could not start the command in Texmaker when I run makeindex

errorsmactexnomenclaturetexmaker

I'm trying to create a nomenclature but I'm getting the following error when I run makeindex:

Error: Could not start the command

This error appears even with this basic example:

\documentclass{article}
\usepackage[refpage]{nomencl}

\makenomenclature

\begin{document}
Example of nomenclature \nomenclature{A}{Area}

\printnomenclature
\end{document}

In the Configure Texmaker editor I wrote: makeindex %.nlo -s nomencl.ist -o %.nls in the makeindex slot. Then I run:

  1. PdfLaTeX
  2. MakeIndex

And the error appears… I also tried all suggestions here, but nothing seems to work.

I have installed MacTex 2012 distribution, Mac OS X 10.7.5

Best Answer

For some strange reasons, TeXMaker finds the path to pdflatex, but not the one to makeindex.

The best solution is to specify the full path to makeindex in the corresponding slot of the 'Configure TeXMaker' -> 'Commands' dialog, by writing

"/usr/texbin/makeindex" -s nomencl.ist -t %.nlg -o %.nls %.nlo

-t %.nlg has been added to generate a .nlg log file so that it can be distinguished from the normal .ilg log file that makeindex generates when creating indexes.

Pressing F12 now you will be able to compile your nomenclatures.

If you now want to be able to perform the full compilation cycle and view your finished .pdf file by just pressing F1, you can configure your 'Quick Build' command, choosing the wizard in the 'Configure TeXMaker' -> 'Quick Build' dialog, and adding, in the following sequence:

PdfLaTeX

Makeindex

PdfLaTeX

Pdf Viewer

In this way one can achieve the same result obtainable with the arara tool (which is anyway a very nice tool) but without its need.


Now, if you press F1 when your MWE is active, you obtain the following result:

result

Related Question