20

Here is the sample code from test.tex: http://texblog.org/2012/05/14/list-of-symbols-or-abbreviations-nomenclature/

\documentclass{article} 
\usepackage{nomencl}
\makenomenclature
\renewcommand{\nomname}{Time Zones}
\begin{document}
UTC\nomenclature{UTC}{Coordinated Universal Time} is 3 hours behind ADT\nomenclature{ADT}{Atlantic Daylight Time} and 10 hours ahead of EST\nomenclature{EST}{Eastern Standard Time}.
\printnomenclature
\small\hfill Created by http://texblog.org
\end{document}

I ran this on TexStudio. pdfLatex --> MakeIndex --> pdfLatex

Errors when I ran MakeIndex:

Process started: makeindex.exe "test".idx

Input index file test.idx not found. Usage: makeindex.exe [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...]

Process exited with error(s)

Errors when I ran pdfLatex

No file test.nls.

Thank you for your help!

Kasun
  • 213

1 Answers1

28

If every one reads manuals, then we will have very less questions here and less reputation too ;)

To make nomenclature you have to pdflatex the .tex file and then run this command:

makeindex -s nomencl.ist -t "<file name>.nlg" -o "<file name>.nls" "<file name>.nlo"

where <file name> is the name without .tex extension (myfile if I have myfile.tex).

Then again pdflatex myfile.tex.

Now the question is how to run makeindex with all those arguments in texstudio.

You can create a user command for this. Go to OptionsConfigure TeXstudio. In the window that appears, choose Build tab on the left side. Search for User Commands. (You may have to click Add button with a green +). Type

Make Nomenclature

just after user0: (0,or 1 0r 2, depending on how many use commands you already have) in the first box. In the second box type:

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

Now OK it. Illustration below.

enter image description here

Now you have a menu under ToolsUser with a short key also.

enter image description here

Now run pdflatexMake Nomeclaturepdflatex. Hope things are now clear.

As another option, you can install the cool automation tool arara and create a User Command for arara (as mentioned above) and make all three compilation clicks in one go. You have to add these lines:

% arara: pdflatex
% arara: nomencl
% arara: pdflatex

just before your \documentclass command (or anywhere in the document), and compile using

arara myfile

using your User Command.

  • 1
    With arara it's even easier. – egreg Feb 20 '14 at 00:30
  • @egreg Yes, I am writing it now :). –  Feb 20 '14 at 00:31
  • Thank you for your help Harish! Works perfectly! Have a great day :) – Kasun Feb 22 '14 at 23:06
  • This can be done through a one click in Texniccenter by modifying the pdflatex to avoid using arara or the two steps compilation. Does the new version of Texstudio provide this? – user2536125 Feb 01 '15 at 11:05
  • Thank you for the solution Mr. Harish Kumar. But I tried it, it did not work for me. I tried both options. Please help me. I posted a new post at this form My New Post here about my problem and mentioned that I couldn't solve my problem using solution in this post. Thank you in advance... – user75958 Apr 11 '15 at 06:59
  • The nomenclature manual says to write makeindex <filename>.glo -s nomencl.ist -o <filename>.gls, while for me that does not work. I have to write makeindex <filename>.nlo -s nomencl.ist -o <filename>.els. Why? – Marco Jan 19 '16 at 21:04
  • @Marco .els? No idea! Are you trying use glossaries? We were talking about nomenclature. But using arara should work here too. –  Jan 30 '16 at 01:16
  • Sorry, I was wrong. I use makeindex <filename>.nlo -s nomencl.ist -o <filename>.nls. Here what the documentation says: "The previous versions of nomencl also used the file extensions .glo and .gls for the generated output and input files. These extensions have now been changed to .nlo and .nls respectively - again, for increased compatibility." – Marco Jan 30 '16 at 08:19
  • Result of my try: Input index file Report.nlo not found. Usage: makeindex [-ilqrcg] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...] – Hamid Jan 10 '19 at 00:43