[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
AIX Version 4.3 Commands Reference, Volume 4
ptx Command
Purpose
Generates a permuted index.
ptx [ -f ] [ -r ] [ -t ] [ -b Breakfile ] [ -g Number ] [ -w Number ] [ -i Ignore | -o Only ] [ -- ] [ Infile [ Outfile ] ]
Description
The ptx command reads the specified English-language text (the Infile parameter), creates a rearranged index from it, and writes to the specified file (Outfile). Standard input and standard output are the defaults.
The ptx command searches the specified file (Infile) for keywords, sorts the lines, and generates the file Outfile. The Outfile file can then be processed with the nroff or troff command to produce a rearranged index.
The ptx command follows three steps:
- Performs the permutation, generates one line for each keyword in an input line, and rotates the keyword to the front of the line.
- Sorts the permuted file.
- Rotates the sorted lines so that the keyword comes at the middle of each line.
The resulting lines in the Outfile file are in the following form:
.xx "" "before keyword" "keyword" "after keyword"
where .xx
is an nroff or troff macro provided by the user or by the ptx command. The mptx macro package provides the .xx
macro definition.
The before keyword
, and 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 to fit in the unused space at the opposite end of the line.
Notes:
- Line-length counts do not account for overstriking or proportional spacing.
- Lines that contain a ~ (tilde) do not work, because the ptx command uses that character internally.
- The ptx command does not discard non-alphanumeric characters.
Flags
-f |
Folds uppercase and lowercase characters for sorting. |
-r |
Considers any leading non-blank characters of each input line as reference identifiers separate from the text of the line. Attaches the identifier as a fifth field on each output line. |
-t |
Prepares the output for the phototypesetter. |
-b BreakFile |
Uses the characters in the specified break file to separate words. Tab characters, new-line characters, and spaces are always used as break characters. |
-g Number |
Uses the specified number as the number of characters that the ptx command reserves for each gap among the four parts of the line as it is printed. The default Number variable value is 3. |
-w Number |
Uses the specified number as the length of the output line. The default line length is 72 characters for the nroff command and 100 for the troff command. |
-i Ignore |
Does not use any words specified in the Ignore file as keywords. If the -i and -o flags are not used, the /usr/lib/eign file is the default Ignore file. |
-o Only |
Uses only the words specified in the Only file as keywords. |
-- |
(double dash) Indicates the end of flags. |
Parameters
Infile |
Specifies the English-language text. Standard input is the default file. The ptx command searches the specified file for keywords, sorts the lines, and generates the file Outfile. |
Outfile |
Specifies the file to which the ptx command writes the index created from the Infile file. Standard output is the default file. The Outfile file can be processed with the nroff or troff command to produce a rearranged index. |
Files
/usr/lib/eign |
Contains the default Ignore file. |
/usr/share/lib/tmac/tmac.ptx |
Contains the macro file. |
Related Information
The nroff command, troff command.
The mm macro package, mptx macro package.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]