Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptx(1) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nroff(1)

troff(1)

mm(5)

mptx(5)



     ptx(1)                     DG/UX 4.30                      ptx(1)



     NAME
          ptx - permuted index

     SYNOPSIS
          ptx [ options ] [ input [ output ] ]

     DESCRIPTION
          Ptx generates the file output.  Once processed with a text
          formatter, it produces a permuted index from input, which
          contains a set of phrases.  Ptx takes each input phrase and
          breaks it at each significant word (keyword), reconstructing
          a new phrase for each keyword.

          The output for a one-line file containing:

               hatchet: job entry for hackers

          will yield (after formatting):


                           hatchet: job    entry for hackers
                 hatchet: job entry for    hackers
                  job entry for hackers    hatchet:
                               hatchet:    job entry for hackers

          Ptx works in three phases:

          1.   Permute. Generate one line for each keyword in an input
               line, with the keyword rotated to the front.

          2.   Sort the lines.

          3.   Rotate each output line, placing the keyword in the
               middle of each line.  Leaves a gap before the keyword.

          During this process, it puts the nroff command .xx at the
          front of each line, and inserts double-quote characters.
          Raw, unformatted ptx output is in the form:

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

          where .xx is assumed to be an nroff or troff(1) macro
          provided by the user, or provided by the mptx(5) macro
          package in the Using the Documenter's Tool Kit on the DG/UX
          System.  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 are wrapped-
          around pieces small enough to fit in the unused space at the
          opposite end of the line.  One of them is always empty;
          which one depends on the keyword's position in the line.

          You can use these options:



     Licensed material--property of copyright holder(s)         Page 1





     ptx(1)                     DG/UX 4.30                      ptx(1)



          -f         Fold upper- and lowercase letters for sorting.
                     The default sort is an ASCII sort; all capital
                     letters come before lowercase letters.

          -t         Prepare the output for the phototypesetter.

          -w n       Use 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       Use the next argument, n, as the number of
                     characters that ptx will reserve in its
                     calculations for each gap among the four parts of
                     the line (head, before keyword, keyword and
                     after, and tail) as finally printed.  The default
                     gap is 3.

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

          -i ignore  Do 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. It
                     makes sure that words like "the," "and," and so
                     on, aren't used as keywords in the index.

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

          -r         Take any leading non-blank characters of each
                     input line as a reference identifier (as to a
                     page or chapter), separate from the text of the
                     line.  Attach that identifier as a fifth field on
                     each output line.  This option is used, for
                     example, when compiling the permuted index for
                     each reference manual.

          The index for this manual was generated using ptx.


     EXAMPLES
          $ ptx -o keyword input output

          Produces a file "output" that contains phrases begining with
          words declared in the "keyword" file, and places the result
          in "output". The output file then might be used with the
          nroff -mptx command to produce the desired permuted index.

     FILES
          /bin/sort
          /usr/lib/eign



     Licensed material--property of copyright holder(s)         Page 2





     ptx(1)                     DG/UX 4.30                      ptx(1)



          /usr/lib/tmac/tmac.ptx

     SEE ALSO
          nroff(1), troff(1), mm(5), mptx(5).
          Using the Documenter's Tool Kit on the DG/UX System.
          Documenter's Tool Kit Technical Summary for the DG/UX
          System.
     NOTE
          Since ptx produces output files that are meant to be
          formatted by nroff, it is most useful if you have the
          Documenter's Toolkit, which includes nroff.  However, since
          it produces regular output, you could use it as the first
          stage of a process to create a permuted index. You would
          have to include other processing by awk(1), ed(1), sed(1),
          and/or other facilities to produce a "clean" index.
     BUGS
          Line length counts do not account for overstriking or
          proportional spacing.
          Lines that contain tildes (~) are botched, because ptx uses
          that character internally.



































     Licensed material--property of copyright holder(s)         Page 3



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