Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptx(CT) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     PTX(CT)                  XENIX System V                   PTX(CT)



     Name
          ptx - Generates a permuted index.

     Syntax
          ptx [ options ] [ input [ output ] ]

     Description
          ptx generates a permuted index to file input on file 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 each line.  ptx produces output in the form:

               .xx "tail" "before keyword" "keyword and after" "head"

          where .xx is assumed to be an nroff (CT) or troff(CT) macro
          provided by the user.  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 and 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.

          The following options can be applied:

          -f         Folds uppercase and lowercase letters for
                     sorting.

          -t         Prepares the output for the phototypesetter.

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

          -g n       Uses the next argument, n, as the gap size in
                     characters.  The gap size determines the number
                     of characters to be output for the "before
                     keyword" and "keyword and after" fields of the
                     output line.  The total number of characters in
                     these fields is no more than the maximum line
                     length less the total size of all gaps less
                     whatever characters are in the "tail" and "head"
                     fields.  ptx does not copy the gaps to the output
                     lines.  It is the responsibility of the user to
                     provide the gaps when printing the lines.  The
                     default gap is 3 characters.

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




     Page 1                                           (printed 8/7/87)





     PTX(CT)                  XENIX System V                   PTX(CT)



          -i ignore  Does not use as keywords any words given in the
                     ignore file.  If the -i and -o options are
                     missing, use /usr/lib/eign as the ignore file.

          -b break   Uses the characters in the break file to separate
                     words.  Tab, newline, and space characters are
                     always used as break characters.

          -r         Takes 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.  Attaches that identifier as a fifth field
                     on each output line.

     Files
          /bin/sort

          /usr/lib/eign

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

          Lines that contain tildes (~) are not handled correctly,
          because ptx uses that character internally.






























     Page 2                                           (printed 8/7/87)



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