|
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:
-
Add the makeidx and nomencl packages to your document.
-
Modify the options for the nomencl package:
-
From the Typeset menu, choose
Options and Packages and choose the
Package Options tab.
-
In the Packages in Use box, select nomencl and
choose Modify.
-
In the Category box, choose Add page references
and select the Yes option.
-
Choose OK to close the dialog boxes and return
to your document.
-
Create standard index entries for the subject index throughout your document.
-
Create each entry for the author index:
-
Place the insertion point to the right of the name you want to index.
-
Enter an encapsulated TeX field.
-
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.
-
Choose OK.
-
Modify the document preamble:
-
From the Typeset menu, choose
Preamble.
-
Click the mouse in the entry area.
-
If you're using the Portable LaTeX filter, skip to step 5e.
-
If the highest division level in your document is section (that is, the
chapter division isn't used):
-
Save, close, and reopen the document.
-
From the Typeset menu, choose
Preamble.
-
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
-
At the end of the preamble entries, add this line:
-
For Version 5.5, add \makenomenclature.
or
-
For earlier versions, add \makeglossary
-
Press Enter and add these new lines:
\makeindex
\renewcommand{\nomname}{Author Index}
\renewcommand{\indexname}{Subject Index}
-
Choose OK.
-
Include both indices in your document:
-
Place the insertion point at the end of your document.
-
Enter a TeX field.
-
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.
-
Choose OK.
-
Compile your document to create the subject index:
-
Save the document.
-
On the Typeset toolbar, click the Typeset DVI Compile button
or,
from the Typeset menu, choose
Compile.
-
Check Generate an Index and choose
OK.
Make sure the number of LaTeX passes is set to 2.
-
Typeset compile the document file from outside SWP or
SW to create an .nlo file for the author index:
-
From the SWP or SW submenu in
the Windows Programs list, choose the
TrueTeX Formatter.
-
Select the file and choose OK.
-
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.
-
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.
-
From the SWP or SW submenu in the Windows Programs
list, choose the TrueTeX Formatter.
-
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.
|