Document 509

The LaTeX nomencl package

Version: 3.5x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

The nomencl package produces a nomenclature list for your document. You can use the package to create a list of symbols, a glossary, or an index-like list, such as an author index. However, each document can have only one list created with the nomencl package.

The package uses TeX instructions inserted throughout the document as input for the makeindex program.

Generating a nomenclature list is a multistep process involving adding the package to your document, identifying each symbol to be included in the list, indicating where the list should appear in the document, and finally running makeindex and compiling your document with LaTeX.

How to create a nomenclature list

  1. Add the nomencl package to your document.

  2. Modify the document preamble:

    1. From the Typeset menu, choose Preamble.

    2. If you're using the Portable LaTeX filter, skip to step 2d.

    3. If the highest division level in your document is section (that is, the chapter heading isn't used),

      1. Save, close, and reopen the document.

      2. From the Typeset menu, choose Preamble.

      3. If you're using the SWP or SW output filter (not the Portable LaTeX filter), add a new line after the \input{tcilatex} line, and type \let\chapter\undefined.

    4. At the end of the preamble entries, add this new line:

      • For Version 5.5: \makenomenclature

      • For earlier versions: \makeglossary

    5. Choose OK.

  3. Add \nomenclature commands in the text for each symbol to be included in the nomenclature list:

    1. Place the insertion point immediately after the first use of the symbol.

    2. Enter an encapsulated TeX field.

    3. In the entry area, type \nomenclature{x}{y} where x is the symbol you want to appear in the list and y is the corresponding definition.

    4. Choose OK.

  4. Add this command:

    1. Place the insertion point where you want the nomenclature list to appear in your document.

    2. Enter a TeX field.

    3. For Version 5.5, type \printnomenclature.

      or

      For earlier versions, type \printglossary.

    4. Choose OK.

  5. Save your document.

  6. From outside SWP or SW, compile your document.

    1. From the SWP or SW submenu on the Windows Program list, choose the TrueTeX Formatter.

    2. Select the file and choose OK.

    The compilation yields an .nlo file (.glo in earlier versions) with the same name as your document and places it in the same directory.

  7. Run makeidx.

    The makeidx package uses the .nlo or .glo file as an input file. It creates an output file with an .nls extension (gls in earlier versions) and the same name and directory as your document. The ,nls or.gls file contains the correctly ordered nomenclature list.

    Note that you may find it easier to work from a command prompt for this step.

    1. From the Windows Start menu, choose Run.

    2. In the Open box, type the command appropriate for your installation and substitute the correct file name for the two files (where line breaks occur in this instruction, enter a space):

      • For Version 5.5:

        c:\swp55\TCITeX\web2c\makeindex -o

        c:\swp55\docs\filename.nls -s

        c:\swp55\TCITeX\TeX\LaTeX\contrib\nomencl\nomencl.ist

        c:\swp55\docs\filename.nlo

      • For Version 4.x or 5.0:

        c:\swp50\TCITeX\web2c\makeindex -o

        c:\swp50\docs\filename.gls -s

        c:\swp50\TCITeX\TeX\latex\contrib\supported\nomencl\nomencl.ist

        c:\swp50\docs\filename.glo

        Change the name of the directory as necessary.

      • For Version 3.5 or earlier:

        c:\swp35\TCITeX\SWTools\bin\makeindex -o

        c:\swp35\docs\filename.gls -s

        c:\swp35\TCITeX\TeX\LaTeX\contrib\supported\nomencl\nomencl.ist

        c:\swp35\docs\filename.glo

      Correct the path names for your installation, if necessary.

    3. Choose OK.

  8. Typeset compile the document file from outside SWP or SW.

    Note that if you compile using SWP or SW, the compiler won't find the .nls or .gls file and won't include the nomenclature list in the typeset document.

    If your document contains a table of contents or cross-references, you may need to compile it two or three times.

The available package options include language choices and the use of equation and page references. See additional documentation for the nomencl package in the PackageSample-nomencl.tex file in the SWSamples directory of your program installation. The package is in the TCITeX/TeX/LaTeX/contrib/nomencl directory.

See also

Last revised 07/25/10

The information in this frame was created with Scientific WorkPlace.