# Error: could not start the command in Texmaker when I run makeindex

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

-
Welcome to TeX.SX! You can have a look on our starter guide to familiarize yourself further with our format. Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. –  Mario S. E. Jun 3 '13 at 20:12
Are you sure you have makeindex installed? –  karlkoeller Jun 3 '13 at 21:04
@karlkoeller how do I know if i have makeindex installed? –  garuch Jun 3 '13 at 21:42
Have you tried running makeindex from a terminal rather than via TeXmaker? –  Nicola Talbot Jun 6 '13 at 7:58
@NicolaTalbot Running it in terminal worked! Thanks! –  garuch Jun 6 '13 at 16:51

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:

-

If I change the MakeIndex slot into

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


doing "PDFLaTeX", then "MakeIndex" and again "PDFLaTeX" results in correct compilation.

If you have an updated distribution, you also have Arara. Edit the User commands; in a free slot add "Arara" as menu item and

"/usr/texbin/arara" -v %


in the second box, like in the following picture:

% arara: pdflatex
% arara: nomencl
% arara: pdflatex
\documentclass{article}
\usepackage[refpage]{nomencl}

\makenomenclature

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

\printnomenclature
\end{document}


and for compiling choose the just defined user command. You'll enjoy the experience. :)

-
I tried this with another document in which I was having the same problem and now it works! thanks a lot! :-) –  garuch Jun 6 '13 at 17:00
+1 this is definitely the way to go- arara has solved so many of these types of problems :) –  cmhughes Jun 8 '13 at 21:26

I found a solution for TeXnicCenter:

The MakeIndex slot should be (see figure):

"%tm.nlo" -s "nomencl.ist" -o "%tm.nls"

And, of course, your file should look:

\documentclass{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[refpage]{nomencl}
\usepackage[english]{babel}

\makenomenclature

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

\printnomenclature

\end{document}

-

1) Be sure that make index is installed

2) For the makeindex command line in Texmaker, you should use :

makeindex %.nlo -s nomencl.ist -o %.nls -t %.nlg

(see here )

3) You can automatize the compilation by using the "user quick build command" or one of the "user" commands ("User" menu) : click on the "wizard" button at the end of the line and select the sequence :

Pdflatex+MakeIndex+PdfLatex+View Pdf

-
I already tried your suggestions but they didn't work. When I run Pdflatex+MakeIndex+PdfLatex+View Pdf, I get the error... :'( –  garuch Jun 3 '13 at 21:46