less -> more
[unix-history] / usr / src / usr.bin / ptx / ptx.1
CommitLineData
99e8732d 1.\" @(#)ptx.1 6.1 (Berkeley) %G%
420822ff 2.\"
99e8732d 3.TH PTX 1 ""
420822ff
KM
4.AT 3
5.SH NAME
6ptx \- permuted index
7.SH SYNOPSIS
8.B ptx
9[ option ] ...
10[ input [ output ] ]
11.SH DESCRIPTION
12.I Ptx
13generates a permuted index to file
14.I input
15on file
16.I output
17(standard input and output default).
18It has three phases: the first does the permutation, generating
19one line for each keyword in an input line.
20The keyword is rotated to the front.
21The permuted file is then
22sorted.
23Finally, the sorted lines are rotated so the keyword
24comes at the middle of the page.
25.I Ptx
26produces output in the form:
27.br
28.IP
29\&.xx "tail" "before keyword" "keyword and after" "head"
30.LP
31where .xx may be an
32.I nroff
33or
34.IR troff (1)
35macro
36for user-defined formatting.
37The
38.I before keyword
39and
40.I keyword and after
41fields incorporate as much of the line as will fit
42around the keyword when it is printed at the middle of the page.
43.I Tail
44and
45.I head,
46at least one of which is an empty string "",
47are wrapped-around pieces small enough to fit
48in the unused space at the opposite end of the line.
49When original text must be discarded, `/' marks the spot.
50.PP
51The following options can be applied:
52.TP
53.BR \-f
54Fold upper and lower case letters for sorting.
55.TP
56.BR \-t
57Prepare the output for the phototypesetter;
58the default line length is 100 characters.
59.TP
60.BI \-w " n"
61Use the next argument,
62.I n,
63as the width of the output line.
64The default line length is 72 characters.
65.TP
66.BI \-g " n"
67Use the next argument,
68.I n,
69as the number of characters to allow for each gap
70among the four parts of the line as finally printed.
71The default gap is 3 characters.
72.TP
73.BR \-o " only"
74Use as keywords only the words given in the \fIonly\fR file.
75.TP
76.BR \-i " ignore"
77Do not use as keywords any words given in the
78.I
79ignore
80file.
42a0963c
KM
81If the \fB\-i\fR and \fB\-o\fR options are missing, use
82.I /usr/lib/eign
420822ff
KM
83as the
84.I
85ignore
86file.
87.TP
88.BR \-b " break"
89Use the characters in the
90.I
91break
92file to separate words.
93In any case, tab, newline, and space characters are always used as break characters.
94.TP
95.BR \-r
96Take any leading nonblank characters of each input line to
97be a reference identifier (as to a page or chapter)
98separate from the text of the line.
99Attach that identifier as a 5th field on each output line.
100.PP
101The index for this manual was generated using
102.I ptx.
103.SH FILES
42a0963c 104/usr/bin/sort
420822ff
KM
105.br
106/usr/lib/eign
107.SH BUGS
108Line length counts do not account for overstriking or
109proportional spacing.
110.br