6

How do you add nomenclature typesetting tool to TeXworks? I use

pdfLaTeX + MakeIndex + BibTeX

It produces .nlo file but does not put the nomenclature list in the document.

1
  • Thank you. I have found some helpful answers on this section and managed to produce an .nls file. I did this via a batch file but I would prefer a direct way to modify makeindex, or add another typesetting directly to TexWorks.
    – danny
    Commented Jul 7, 2013 at 17:33

3 Answers 3

4

The 'pdfLaTeX + MakeIndex + BibTeX' entry in TeXworks is MiKTeX-specific, and uses a back-end program called texify to run the various parts of the process automatically. If you do texdoc texify at the Command Prompt you get some instructions, which include various options. The key one is

--mkidx-option=option
Pass option to the index generator.

Thus at least in theory what you want to do is add this option to those used by texify. However, a few tests soon reveal that this won't help as texify doesn't even attempt to run MakeIndex on a short test file such as

\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\begin{document}
Some text

\nomenclature{A}{Something for A}

\printnomenclature
\end{document}

The texify documentation doesn't make it clear, but it seems likely that it only runs MakeIndex if there is an appropriately-named file is created. As one is not by nomencl, you have to use an alternative scripting approach such as a batch file, latexmk, etc.

1
  • What no arara recommended before etc.? ;-)
    – user11232
    Commented Aug 24, 2013 at 0:53
7

Credit to Joseph Wright for this answer.

MiKTeX allows a limited form of \write18 to run makeindex from within a LaTeX document.

\immediate\write18{makeindex \jobname.nlo -s nomencl.ist -o \jobname.nls}
\documentclass{article}
\usepackage{nomencl}
\makenomenclature
\begin{document}
\section*{Main equations}
\begin{equation}
a=\frac{N}{A}
\end{equation}%
\nomenclature{$a$}{The number of angels per unit area}%
\nomenclature{$N$}{The number of angels per needle point}%
\nomenclature{$A$}{The area of the needle point}%
The equation $\sigma = m a$%
\nomenclature{$\sigma$}{The total mass of angels per unit area}%
\nomenclature{$m$}{The mass of one angel}
follows easily.
\printnomenclature
\end{document}
0

For add new command to typesetting tool, you can do it same as following picture enter image description here

In texworks, following step:

  1. run pdfTex or pdfLatex or XeTeX or XeLaTex,.. , this step, generate the *.nlo file
  2. run bibTex, this step generate the *.bbl file
  3. run nomenclute, this step generate *.nls file
  4. do twice the step 1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .