Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptx(1) — OSF/1 X2.0-8 MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nroff(1)

ptx(1)  —  Commands

OSF

NAME

ptx − Generates a permuted index

SYNOPSIS

ptx [-ftr] [-bfile] [-gnumber] [ -ifile | -ofile ] [-wlength] [--] [infile] [outfile]

The ptx command reads the English-language text file infile, uses it to create a permuted index, and write the results to outfile.   If you do not specify infile and outfile, ptx reads from standard input and writes to standard output. 

FLAGS

-bfileUses the characters in the specified file to separate words.  Tab characters, newline characters, and spaces are always used as break characters. 

-fSorts without distinguishing between uppercase and lowercase characters. 

-gnumber
Specifies the number of spaces between the four parts of each permuted index line.  The default number of spaces is 3. 

-ifileDoes not use any of the words in file as keywords.  If you specify neither -i nor -o, ptx uses all words in infile as keywords except those in /usr/share/lib/eign. 

-ofileUses only the words in file as keywords.  If you specify neither -i nor -o, ptx uses all words in infile as keywords except those in /usr/share/lib/eign. 

-rAssumes that any leading non-space characters on an input line are a reference identifier separate from the text of that line, and includes that identifier as a fifth field on the corresponding output line. 

-tPrepares troff rather than nroff output, if troff has been added to your system. 

-wlengthSpecifies the length of the output line to be length characters.  The default is 72 characters, or 100 when you specify the -t flag. 

--Indicates the end of flag specification and the beginning of input specification (either an infile or standard input). 

DESCRIPTION

ptx searches infile for keywords, permutes each line, sorts the output, and writes it to outfile, which can then be processed with nroff to produce a formatted permuted index. 

Specifically, the ptx command follows three steps:

     1.Performs the permutation, generates one line for each keyword in an input line, and rotates the keyword to the front of the line. 

     2.Sorts the permuted file. 

     3.Rotates the sorted lines so that the keyword comes at the middle of each line. 

The resulting lines in outfile are in the following form:

.xx "" "before_keyword" "keyword" "after_keyword" ""

where .xx is an nroff macro provided by the user or the ptx command. The mptx macro package provides the .xx macro definition. 

The before_keyword, keyword, and after_keyword fields incorporate as much of the line as can fit around the keyword when it is printed. The first field and last field, at least one of which is always the empty string, are wrapped-around to fit in the unused space at the opposite end of the line. 

FILES

/usr/share/lib/eignDefault list of ignored keywords. 

NOTES

Line length counts do not account for overstriking or proportional spacing. 

Lines that contain ~ (tilde) do not work because ptx uses that character internally. 

ptx does not discard non-alphanumeric characters. 

RELATED INFORMATION

nroff(1)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026