IDX 1

NAME

Idx − make and manipulate index files.

SYNOPSIS

@BINDIR@/idx [−dhmprtw] file

DESCRIPTION

Idx is an helper tool to make and to manipulate index files. Idx has been made to automatically index troff document, but it can also be used manually, to make an index of a book.

OPTIONS

FORMAT

There are four format of index file that Idx can work with: a list of pages, a list of words, troff output and troff input.

List of pages

A list of pages indicates which words appears on a page. Each line of a list of pages is formatted as follow:

Example:

33:: troff, refer, index
34:: troff, index, nroff
35:: index, unix, refer

List of words

A list of words indicates in which pages appears a word. Each line of a list of words is formatted as follow:

The previous example would be formatted as follow:

index:: 33−35
nroff:: 34
refer:: 33, 35
troff:: 33
unix:: 35

Troff output

When idx is used to index a troff document, the output produced by troff and passed to idx should be as follow:

The previous example should be formatted as follow:

W> troff:: 33
W> refer:: 33
W> index:: 33
W> troff:: 34
W> index:: 33
W> nroff:: 34
W> index:: 35
W> unix:: 35
W> refer:: 35

Troff input

Idx can format an index so that troff can print it correctly. The format of troff input is as follow:

.K<                  \" one letter keyword defining the index
.ds <P x, m−n    \" list of pages
.K> word             \" the word which appears on these pages

So, a troff macro that use idx should define the following macros:

EXAMPLE

This example taken from real life will show how to print an index of a paper book.

idx −w a.idx > b.idx
idx −r b.idx > c.idx
idx −t c.idx | troff | dpost > index.ps

FILES

@BINDIR@/idx

SEE ALSO

utmac(7)

LICENSE

Idx and this man page are distributed under the isc license

AUTHOR

Written by Pierre-Jean Fichet.