9

I have spent many many hours failing to implement nomencl for my PhD thesis. The problem seems to be with invoking makeindex and creating the .nls file

I keep reading that I must invoke makeindex or write a Unix command:

makeindex filename.nlo  -s nomencl.ist -o filename.nls

But I don't know how to do this. I would be grateful for some instructions i.e. where do I type the command?

I am using TeXShop 2.43.

1
12

Save a new file ~/Library/TeXShop/Engines/Nomenclature.engine with following contents:

#!/bin/sh

bfname=$(dirname "$1")/"`basename "$1" .tex`"
makeindex "$bfname".nlo -s nomencl.ist -o "$bfname".nls

Make this new file executable using chmod u+x ~/Library/TeXShop/Engines/Nomenclature.engine from within a shell or set the executable bit at the file privileges. See, e.g., WikiHow for more information about how to change file privileges.

Restart TeXShop. Now you should have an entry Nomenclature in the drop down menu next to Typeset.

To get a nomenclature first run LaTeX, then Nomenclature, then LaTeX again.

7
  • I tried making the nomenclature engine but got the following message when I tried to execute: Nomenclature.engine does not have the executable bit set.
    – Peter
    Dec 8 '11 at 13:04
  • 1
    @Peter You have to say, from the Terminal, chmod a+x ~/Library/TeXShop/Engines/Nomenclature.engine. Unfortunately, this is not possible from the Finder.
    – egreg
    Dec 8 '11 at 13:50
  • @egreg: wikihow.com/Change-File-Properties shows, how you can do it from the Finder. Doesn't this work? Dec 8 '11 at 16:06
  • 1
    @Schweinebacke From the Finder it's possible only to set the reading and writing privileges, not the x bit (Leopard; no Snow Leopard or Lion machine now).
    – egreg
    Dec 8 '11 at 16:11
  • @egreg: Interesting! Dec 8 '11 at 16:19
5

These are detailed steps to accomplish it:

1) In the mac terminal, go to ~/Library/TeXShop/Engines/ and type:

vi Nomenclature.engine

2) In the terminal, press the key "i" (for insert) once.

3) From here, copy the following code:

#!/bin/sh

bfname=$(dirname "$1")/"`basename "$1" .tex`"
makeindex "$bfname".nlo -s nomencl.ist -o "$bfname".nls

4) In the terminal, press "control+clic" and clic on "Paste" menu.

5) In the terminal, press "esc" then type ":wq" and enter (this writes and quits the file).

6) In the terminal, type:

sudo chmod a+x Nomenclature.engine

7) In the terminal, enter your password.

8) Quit TeXShop (if opened) and start it again.

9) Nomenclature is ready to be executed.

Remember to execute: Latex-Nomenclature-Latex to obtain the expected results.

1
  • Very nice struction to make nomenclature works in Texshop.
    – Admia
    Mar 4 '16 at 2:31

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.