Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptx(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nroff, troff

mm

mptx



PTX(1,C)                    AIX Commands Reference                     PTX(1,C)



-------------------------------------------------------------------------------
ptx



PURPOSE

Generates a permuted index.

SYNTAX


      +------ -g3 ------+  +- -i/usr/lib/eign -+  +------------------------+
ptx --| +-------------+ |--|      one of       |--|          +-----------+ |--|
      +-| -b break -f |-+  |   +-----------+   |  +- infile -|           |-+
       A| -g num   -r ||   +---| -i ignore |---+             +- outfile -+
       || -w num   -t ||       | -o only   |
       |+-------------+|       +-----------+
       +---------------+


Note:  This command does not have MBCS support.

DESCRIPTION

The ptx command reads infile (standard input by default), creates a permuted
index from its input, and writes to outfile (standard output by default).

The ptx command searches infile for keywords, sorts the lines, and generates
the file outfile.  outfile can then be processed with nroff or troff to produce
a permuted index from the file infile.

The ptx command follows three steps:

  1. In the permutation, generates one line for each keyword in an input line,
     and rotates the keyword to the front.
  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 output are in the form:

   .xx, "tail" "before_keyword" "keyword_and_after" "head"

where .xx is an nroff or troff macro provided by the user, or provided by the
mptx macro package (see the AIX Operating System Technical Reference for
information on this macro package).  The before_keyword and keyword_and_after
fields incorporate as much of the line as will fit around the keyword when it
is printed.  tail or head, at least one of which is always the empty string,
are wrapped-around pieces small enough to fit in the unused space at the
opposite end of the line.




Processed November 8, 1990         PTX(1,C)                                   1





PTX(1,C)                    AIX Commands Reference                     PTX(1,C)



Notes:

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

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

FLAGS

-b  break   Uses the characters in the break file to separate words.  Tab
            characters, new-line characters, and spaces are always used as
            break characters.

-f          Does not distinguish between uppercase and lowercase characters
            while sorting (see "sort").

-g  num     Uses num as the number of spaces displayed between the four parts
            of the line.  The default num is 3.

-i  ignore  Does not use any words in the ignore file as keywords.  If the -i
            and -o flags are not used, /usr/lib/eign is the default ignore
            file.

-o  only    Uses only the words in the only file as keywords.

-r          Takes any leading nonblank characters of each input line to be a
            reference identifier separate from the text of the line.  Attaches
            that identifier as a fifth field on each output line.

-t          Prepares the output for the photo typesetter.

-w  num     Uses num as the length of the output line.  The default line length
            is 72 characters for nroff and 100 for troff.

FILES

/bin/sort       Sort program.
/usr/lib/eign   List of words to ignore.
/usr/lib/tmac/tmac.ptx
                List of permuted index nroff, troff commands.

RELATED INFORMATION

See the following commands:  "nroff, troff."

See the mm and mptx miscellaneous facilities in AIX Operating System Technical
Reference.

See "Introduction to International Character Support" in Managing the AIX
Operating System.




Processed November 8, 1990         PTX(1,C)                                   2



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