Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ndx(1) — GL2 W3.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mm(1)

mmt(1)

nroff(1)

subj(1)

troff(1)

NDX(1)  —  Silicon Graphics

NAME

ndx − create a subject-page index for a document

SYNOPSIS

ndx [ subfile ] "formatter command line"

DESCRIPTION

ndx, given a list of subjects (subfile), searches a specified document and writes a subject-page index to the standard output.

subfile is the list of subjects to be included in the index.  Each subject must begin on a new line and have the following format:

word1 [word2 ...] [, word2 ...] [, wordk ...]

For example:

printed circuit boards
arrays
arrays, dynamic change
Smith, W.P.
printed circuit boards, channel-oriented multi-layer
Aranoff
University of Illinois
PL/1

The subject must start in column 1. 

The syntax for the formatter command line is

formatter [ options ] file ...

It is the command that will be used to create the final form of the document.  The formatter must be one of troff, nroff, mm, or mmt The options are those that will be given to the formatter in printing the final form of the document, and are necessary to determine the correct page numbers for subjects as they located in the document.  ndx does not actually cause the final version of the document to be printed.  The author must create the document separately.  The indexer, of course, should not be used until the document is complete and no further changes are expected.  The following are examples of valid formatter command lines:

mm −Tlp  file ...
nroff −mm −Tlp −rW60  file ...
troff −rB2 −Taps −r01.5i  file ...

For more information on the formatter command line, see mm(1), mmt(1), nroff(1), and troff(1).

EXAMPLES

The command

ndx subfile "nroff −mm −rW70 file" > indexfile

would produce a subject-page index for the document file and take its subject for the list, subfile. The page numbers would correspond to the document produced by

nroff −mm −rW70 file

The command

ndx subfile "mm −rW60 −rN2 −rO0 ch1 ch2 ch3" > indexfile

would produce a subject-page index for the documents ch1, ch2, ch3. The page number would correspond to the documents produced by

mm −rW60 −rN2 −rO0 ch1 ch2 ch3

The command

ndx subfile "troff −rB2 −rW5i −rO1.5i −mm file" > indexfile

would produce a subject-page index for the document file and the page numbers would correspond to the document produced by

troff −rB2 −rW5i −rO1.5i −mm file

SEE ALSO

mm(1), mmt(1), nroff(1), subj(1), troff(1). 

Version 3.6  —  December 20, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026