Document 397

How to create two separate typeset indices

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

Some publications require that you include both a subject index and an author index in your document. You can generate a double index if you use both the makeidx and nomencl packages:

  1. Add the makeidx and nomencl packages to your document.

  2. Modify the options for the nomencl package:

    1. From the Typeset menu, choose Options and Packages and choose the Package Options tab.

    2. In the Packages in Use box, select nomencl and choose Modify.

    3. In the Category box, choose Add page references and select the Yes option.

    4. Choose OK to close the dialog boxes and return to your document.

  3. Create standard index entries for the subject index throughout your document.

  4. Create each entry for the author index:

    1. Place the insertion point to the right of the name you want to index.

    2. Enter an encapsulated TeX field.

    3. In the entry area, type \nomenclature{name}{\hspace{-1ex}} where name is the author name you want to appear in the list, shown as you want it to appear, and the second parameter is some negative horizontal space that offsets a blank space added by the package before the page number. The word page is added automatically.

    4. Choose OK.

  5. Modify the document preamble:

    1. From the Typeset menu, choose Preamble.

    2. Click the mouse in the entry area.

    3. If you're using the Portable LaTeX filter, skip to step 5e.

    4. If the highest division level in your document is section (that is, the chapter division 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

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

      • For Version 5.5, add \makenomenclature.

        or

      • For earlier versions, add \makeglossary

    6. Press Enter and add these new lines:

      \makeindex

      \renewcommand{\nomname}{Author Index}

      \renewcommand{\indexname}{Subject Index}

    7. Choose OK.

  6. Include both indices in your document:

    1. Place the insertion point at the end of your document.

    2. Enter a TeX field.

    3. In the entry area, type:

      • For Version 5.5:

        \printnomenclature

        \printindex

      • For earlier versions:

        \printglossary

        \printindex

      The order of these commands determines the order in which the indices are printed. The \printnomenclature or \print glossary command indicates the author index; the \printindex command indicates the subject index. Change the order as necessary.

    4. Choose OK.

  7. Compile your document to create the subject index:

    1. Save the document.

    2. On the Typeset toolbar, click the Typeset DVI Compile button typesetcompile.wmf or, from the Typeset menu, choose Compile.

    3. Check Generate an Index and choose OK.

      Make sure the number of LaTeX passes is set to 2.

  8. Typeset compile the document file from outside SWP or SW to create an .nlo file for the author index:

    1. From the SWP or SW submenu in the Windows Programs list, choose the TrueTeX Formatter.

    2. Select the file and choose OK.

  9. Run the MakeIndex program to create the author index:

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

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

    • WIth Version 5.5,

      1. From the Windows Start menu, choose Run.

      2. In the Open box, enter this command on a single line (where line breaks occur in this instruction, enter a space):

        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

    • With Version 4.x or 5.0,

      1. From the Windows Start menu, choose Run.

      2. In the Open box, enter this command on a single line (where line breaks occur in this instruction, enter a space):

        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 program directory as necessary.

      3. Choose OK.

    • With Version 3.5 or earlier,

      1. From the Windows Start menu, choose Run.

      2. In the Open box, enter this command on a single line (where line breaks occur in this instruction, enter a space):

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

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

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

        c:\swp35\docs\filename.glo

        Substitute the correct file name for the .glo and .gls files. These instructions reflect an SWP installation. Correct the path names for your installation, if necessary.

      3. Choose OK.

  10. Typeset compile the document file from outside the program.

    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.

    1. From the SWP or SW submenu in the Windows Programs list, choose the TrueTeX Formatter.

    2. Select the file and choose OK.

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

See also

Last revised 07/25/10

This document was created with Scientific WorkPlace.