xref: /original-bsd/usr.bin/ptx/ptx.1 (revision d15729d4)
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)ptx.1	6.2 (Berkeley) 06/11/90
7.\"
8.Dd
9.Dt PTX 1
10.Os ATT 7th
11.Sh NAME
12.Nm ptx
13.Nd permuted index
14.Sh SYNOPSIS
15.Nm ptx
16.Op  option
17\&...
18.Op  input Op  output
19.Sh DESCRIPTION
20.Nm Ptx
21generates a permuted index to file
22.Ar input
23on file
24.Ar output
25(standard input and output default).
26It has three phases: the first does the permutation, generating
27one line for each keyword in an input line.
28The keyword is rotated to the front.
29The permuted file is then
30sorted.
31Finally, the sorted lines are rotated so the keyword
32comes at the middle of the page.
33.Nm Ptx
34produces output in the form:
35.Pp
36.Dl \&.xx "tail" "before keyword" "keyword and after" "head"
37.Pp
38where .xx may be an
39.Xr nroff 1
40or
41.Xr troff  1
42macro
43for user-defined formatting.
44The
45.Ar before keyword
46and
47.Ar keyword and after
48fields incorporate as much of the line as will fit
49around the keyword when it is printed at the middle of the page.
50.Ar Tail
51and
52.Ar head ,
53at least one of which is an empty string "",
54are wrapped-around pieces small enough to fit
55in the unused space at the opposite end of the line.
56When original text must be discarded, `/' marks the spot.
57.Pp
58The following options can be applied:
59.Tw Fl
60.Tp Fl f
61Fold upper and lower case letters for sorting.
62.Tp Fl t
63Prepare the output for the phototypesetter;
64the default line length is 100 characters.
65.Tp Cx Fl w
66.Ws
67.Ar n
68.Cx
69Use the next argument,
70.Ar n ,
71as the width of the output line.
72The default line length is 72 characters.
73.Tp Cx Fl g
74.Ws
75.Ar n
76.Cx
77Use the next argument,
78.Ar n ,
79as the number of characters to allow for each gap
80among the four parts of the line as finally printed.
81The default gap is 3 characters.
82.Tp Cx Fl o
83.Ws
84.Ar only
85.Cx
86Use as keywords only the words given in the
87.Ar only
88file.
89.Tp Cx Fl i
90.Ws
91.Ar ignore
92.Cx
93Do not use as keywords any words given in the
94ignore
95file.
96If the
97.Fl i
98and
99.Fl o
100options are missing, use
101.Pa /usr/share/dict/eign
102as the
103ignore
104file.
105.Tp Cx Fl b
106.Ws
107.Ar break
108.Cx
109Use the characters in the
110break
111file to separate words.
112In any case, tab, newline, and space characters are always used as break characters.
113.Tp Fl r
114Take any leading nonblank characters of each input line to
115be a reference identifier (as to a page or chapter)
116separate from the text of the line.
117Attach that identifier as a 5th field on each output line.
118.Tp
119.Pp
120The index for this manual was generated using
121.Nm ptx .
122.Sh FILES
123.Dw /usr/share/dict.eign
124.Di L
125.Dp /usr/bin/sort
126.Dp /usr/share/dict/eign
127.Dp
128.Sh HISTORY
129.Nm Ptx
130appeared in Version 7 AT&T UNIX
131.Sh BUGS
132Line length counts do not account for overstriking or
133proportional spacing.
134