POSIX 1003.2B/D9 symbolic links
[unix-history] / usr / src / usr.bin / ptx / ptx.1
CommitLineData
48d41649
KB
1.\" Copyright (c) 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
420822ff 3.\"
a860ef9e
KB
4.\" %sccs.include.proprietary.roff%
5.\"
48d41649 6.\" @(#)ptx.1 8.1 (Berkeley) %G%
b5dc1377
CL
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
af884152
CL
17.Ar ...
18.Op input Op output
b5dc1377
CL
19.Sh DESCRIPTION
20.Nm Ptx
420822ff 21generates a permuted index to file
b5dc1377 22.Ar input
420822ff 23on file
b5dc1377 24.Ar output
420822ff
KM
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.
b5dc1377 33.Nm Ptx
420822ff 34produces output in the form:
b5dc1377
CL
35.Pp
36.Dl \&.xx "tail" "before keyword" "keyword and after" "head"
37.Pp
af884152
CL
38where
39.Ar \&.xx
40may be an
b5dc1377 41.Xr nroff 1
420822ff 42or
b5dc1377 43.Xr troff 1
420822ff
KM
44macro
45for user-defined formatting.
46The
b5dc1377 47.Ar before keyword
420822ff 48and
b5dc1377 49.Ar keyword and after
420822ff
KM
50fields incorporate as much of the line as will fit
51around the keyword when it is printed at the middle of the page.
b5dc1377 52.Ar Tail
420822ff 53and
b5dc1377 54.Ar head ,
420822ff
KM
55at least one of which is an empty string "",
56are wrapped-around pieces small enough to fit
57in the unused space at the opposite end of the line.
58When original text must be discarded, `/' marks the spot.
b5dc1377 59.Pp
420822ff 60The following options can be applied:
af884152
CL
61.Bl -tag -width flag
62.It Fl f
420822ff 63Fold upper and lower case letters for sorting.
af884152 64.It Fl t
420822ff
KM
65Prepare the output for the phototypesetter;
66the default line length is 100 characters.
af884152 67.It Fl w Ar n
420822ff 68Use the next argument,
b5dc1377 69.Ar n ,
420822ff
KM
70as the width of the output line.
71The default line length is 72 characters.
af884152 72.It Fl g Ar n
420822ff 73Use the next argument,
b5dc1377 74.Ar n ,
420822ff
KM
75as the number of characters to allow for each gap
76among the four parts of the line as finally printed.
77The default gap is 3 characters.
af884152 78.It Fl o Ar only
b5dc1377
CL
79Use as keywords only the words given in the
80.Ar only
81file.
af884152 82.It Fl i Ar ignore
420822ff 83Do not use as keywords any words given in the
420822ff
KM
84ignore
85file.
b5dc1377
CL
86If the
87.Fl i
88and
89.Fl o
90options are missing, use
91.Pa /usr/share/dict/eign
92as the
420822ff
KM
93ignore
94file.
af884152 95.It Fl b Ar break
b5dc1377 96Use the characters in the
420822ff
KM
97break
98file to separate words.
99In any case, tab, newline, and space characters are always used as break characters.
af884152 100.It Fl r
420822ff
KM
101Take any leading nonblank characters of each input line to
102be a reference identifier (as to a page or chapter)
103separate from the text of the line.
104Attach that identifier as a 5th field on each output line.
af884152 105.El
b5dc1377 106.Pp
420822ff 107The index for this manual was generated using
b5dc1377
CL
108.Nm ptx .
109.Sh FILES
af884152
CL
110.Bl -tag -width /usr/share/dict.eign -compact
111.It /usr/bin/sort
112.It /usr/share/dict/eign
113.El
b5dc1377 114.Sh HISTORY
af884152
CL
115The
116.Nm ptx
117command appeared in
118.At v7 .
b5dc1377 119.Sh BUGS
420822ff
KM
120Line length counts do not account for overstriking or
121proportional spacing.