.\" .\" Sccsid @(#)ptx.1 1.6 (gritter) 2/2/07 .\" Parts taken from ptx(1), Unix 7th edition: .\" Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" Redistributions of source code and documentation must retain the .\" above copyright notice, this list of conditions and the following .\" disclaimer. .\" Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed or owned by Caldera .\" International, Inc. .\" Neither the name of Caldera International, Inc. nor the names of .\" other contributors may be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA .\" INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE .\" LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .TH PTX 1 "2/2/07" "Heirloom Documentation Tools" "User Commands" .SH NAME ptx \- permuted index .SH SYNOPSIS .HP .ad l .nh \fB/usr/ucb/ptx\fR [\fB\-ftr\fR] [\fB\-w\fI\ n\fR] [\fB\-g\fI\ n\fR] [\fB\-o\fI\ only\fR] [\fB\-i\fI\ ignore\fR] [\fB\-b\fI\ break\fR] [\fIinput\ \fR[\fIoutput\fR]] .br .hy 1 .ad b .SH DESCRIPTION .I Ptx generates a permuted index to file .I input on file .I output (standard input and output default). It has three phases: the first does the permutation, generating one line for each keyword in an input line. The keyword is rotated to the front. The permuted file is then sorted. Finally, the sorted lines are rotated so the keyword comes at the middle of the page. .I Ptx produces output in the form: .br .IP \&.xx "tail" "before keyword" "keyword and after" "head" .LP where .xx may be an .I nroff or .IR troff (1B) macro for user-defined formatting. Once choice for this macro is supplied in the `\-mptx' macro package. The .I before keyword and .I keyword and after fields incorporate as much of the line as will fit around the keyword when it is printed at the middle of the page. .I Tail and .I head, at least one of which is an empty string "", are wrapped-around pieces small enough to fit in the unused space at the opposite end of the line. When original text must be discarded, `/' marks the spot. .PP The following options can be applied: .TP .BR \-f Fold upper and lower case letters for sorting. .TP .BR \-t Prepare the output for the phototypesetter, i.e. set the default line length to 100 characters. .TP .BI \-w " n" Use the next argument, .I n, as the width of the output line. The default line length is 72 characters. .TP .BI \-g " n" Use the next argument, .I n, as the number of characters to allow for each gap among the four parts of the line as finally printed. The default gap is 3 characters. .TP .BR \-o " only" Use as keywords only the words given in the \fIonly\fR file. .TP .BR \-i " ignore" Do not use as keywords any words given in the .I ignore file. If the \fB-\fIi\fR and \fB-\fIo\fR options are missing, use /usr/ucblib/eign as the .I ignore file. .TP .BR \-b " break" Use the characters in the .I break file to separate words. In any case, tab, newline, and space characters are always used as break characters. .TP .BR \-r Take any leading nonblank characters of each input line to be a reference identifier (as to a page or chapter) separate from the text of the line. Attach that identifier as a 5th field on each output line. .SH "ENVIRONMENT VARIABLES" .TP .BR LANG ", " LC_ALL See .IR locale (7). .TP .B LC_COLLATE Determines the sort order. .TP .B LC_CTYPE Determines the mapping of bytes to characters. .SH FILES /usr/5bin/sort .br /usr/ucblib/eign .br /usr/ucblib/doctools/tmac/ptx .SH NOTES Line length counts do not account for overstriking or proportional spacing.