xref: /csrg-svn/usr.bin/ptx/ptx.1 (revision 62191)
1*62191Sbostic.\" Copyright (c) 1990, 1993
2*62191Sbostic.\"	The Regents of the University of California.  All rights reserved.
319448Smckusick.\"
448290Sbostic.\" %sccs.include.proprietary.roff%
543083Scael.\"
6*62191Sbostic.\"	@(#)ptx.1	8.1 (Berkeley) 06/06/93
748290Sbostic.\"
843083Scael.Dd
943083Scael.Dt PTX 1
1043083Scael.Os ATT 7th
1143083Scael.Sh NAME
1243083Scael.Nm ptx
1343083Scael.Nd permuted index
1443083Scael.Sh SYNOPSIS
1543083Scael.Nm ptx
1643083Scael.Op  option
1750819Scael.Ar ...
1850819Scael.Op input Op output
1943083Scael.Sh DESCRIPTION
2043083Scael.Nm Ptx
2119448Smckusickgenerates a permuted index to file
2243083Scael.Ar input
2319448Smckusickon file
2443083Scael.Ar output
2519448Smckusick(standard input and output default).
2619448SmckusickIt has three phases: the first does the permutation, generating
2719448Smckusickone line for each keyword in an input line.
2819448SmckusickThe keyword is rotated to the front.
2919448SmckusickThe permuted file is then
3019448Smckusicksorted.
3119448SmckusickFinally, the sorted lines are rotated so the keyword
3219448Smckusickcomes at the middle of the page.
3343083Scael.Nm Ptx
3419448Smckusickproduces output in the form:
3543083Scael.Pp
3643083Scael.Dl \&.xx "tail" "before keyword" "keyword and after" "head"
3743083Scael.Pp
3850819Scaelwhere
3950819Scael.Ar \&.xx
4050819Scaelmay be an
4143083Scael.Xr nroff 1
4219448Smckusickor
4343083Scael.Xr troff  1
4419448Smckusickmacro
4519448Smckusickfor user-defined formatting.
4619448SmckusickThe
4743083Scael.Ar before keyword
4819448Smckusickand
4943083Scael.Ar keyword and after
5019448Smckusickfields incorporate as much of the line as will fit
5119448Smckusickaround the keyword when it is printed at the middle of the page.
5243083Scael.Ar Tail
5319448Smckusickand
5443083Scael.Ar head ,
5519448Smckusickat least one of which is an empty string "",
5619448Smckusickare wrapped-around pieces small enough to fit
5719448Smckusickin the unused space at the opposite end of the line.
5819448SmckusickWhen original text must be discarded, `/' marks the spot.
5943083Scael.Pp
6019448SmckusickThe following options can be applied:
6150819Scael.Bl -tag -width flag
6250819Scael.It Fl f
6319448SmckusickFold upper and lower case letters for sorting.
6450819Scael.It Fl t
6519448SmckusickPrepare the output for the phototypesetter;
6619448Smckusickthe default line length is 100 characters.
6750819Scael.It Fl w Ar n
6819448SmckusickUse the next argument,
6943083Scael.Ar n ,
7019448Smckusickas the width of the output line.
7119448SmckusickThe default line length is 72 characters.
7250819Scael.It Fl g Ar n
7319448SmckusickUse the next argument,
7443083Scael.Ar n ,
7519448Smckusickas the number of characters to allow for each gap
7619448Smckusickamong the four parts of the line as finally printed.
7719448SmckusickThe default gap is 3 characters.
7850819Scael.It Fl o Ar only
7943083ScaelUse as keywords only the words given in the
8043083Scael.Ar only
8143083Scaelfile.
8250819Scael.It Fl i Ar ignore
8319448SmckusickDo not use as keywords any words given in the
8419448Smckusickignore
8519448Smckusickfile.
8643083ScaelIf the
8743083Scael.Fl i
8843083Scaeland
8943083Scael.Fl o
9043083Scaeloptions are missing, use
9143083Scael.Pa /usr/share/dict/eign
9243083Scaelas the
9319448Smckusickignore
9419448Smckusickfile.
9550819Scael.It Fl b Ar break
9643083ScaelUse the characters in the
9719448Smckusickbreak
9819448Smckusickfile to separate words.
9919448SmckusickIn any case, tab, newline, and space characters are always used as break characters.
10050819Scael.It Fl r
10119448SmckusickTake any leading nonblank characters of each input line to
10219448Smckusickbe a reference identifier (as to a page or chapter)
10319448Smckusickseparate from the text of the line.
10419448SmckusickAttach that identifier as a 5th field on each output line.
10550819Scael.El
10643083Scael.Pp
10719448SmckusickThe index for this manual was generated using
10843083Scael.Nm ptx .
10943083Scael.Sh FILES
11050819Scael.Bl -tag -width /usr/share/dict.eign -compact
11150819Scael.It /usr/bin/sort
11250819Scael.It /usr/share/dict/eign
11350819Scael.El
11443083Scael.Sh HISTORY
11550819ScaelThe
11650819Scael.Nm ptx
11750819Scaelcommand appeared in
11850819Scael.At v7 .
11943083Scael.Sh BUGS
12019448SmckusickLine length counts do not account for overstriking or
12119448Smckusickproportional spacing.
122