1.\" Copyright (c) 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.proprietary.roff% 5.\" 6.\" @(#)ptx.1 8.1 (Berkeley) 06/06/93 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.Ar ... 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 39.Ar \&.xx 40may be an 41.Xr nroff 1 42or 43.Xr troff 1 44macro 45for user-defined formatting. 46The 47.Ar before keyword 48and 49.Ar keyword and after 50fields incorporate as much of the line as will fit 51around the keyword when it is printed at the middle of the page. 52.Ar Tail 53and 54.Ar head , 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. 59.Pp 60The following options can be applied: 61.Bl -tag -width flag 62.It Fl f 63Fold upper and lower case letters for sorting. 64.It Fl t 65Prepare the output for the phototypesetter; 66the default line length is 100 characters. 67.It Fl w Ar n 68Use the next argument, 69.Ar n , 70as the width of the output line. 71The default line length is 72 characters. 72.It Fl g Ar n 73Use the next argument, 74.Ar n , 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. 78.It Fl o Ar only 79Use as keywords only the words given in the 80.Ar only 81file. 82.It Fl i Ar ignore 83Do not use as keywords any words given in the 84ignore 85file. 86If the 87.Fl i 88and 89.Fl o 90options are missing, use 91.Pa /usr/share/dict/eign 92as the 93ignore 94file. 95.It Fl b Ar break 96Use the characters in the 97break 98file to separate words. 99In any case, tab, newline, and space characters are always used as break characters. 100.It Fl r 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. 105.El 106.Pp 107The index for this manual was generated using 108.Nm ptx . 109.Sh FILES 110.Bl -tag -width /usr/share/dict.eign -compact 111.It /usr/bin/sort 112.It /usr/share/dict/eign 113.El 114.Sh HISTORY 115The 116.Nm ptx 117command appeared in 118.At v7 . 119.Sh BUGS 120Line length counts do not account for overstriking or 121proportional spacing. 122