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