Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cw(CT) — Xenix 2.3.4g

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

eqn(CT)

mmt(CT)

tbl(CT)

troff(CT)



     CW(CT)                   XENIX System V                    CW(CT)



     Name
          cw, checkcw, cwcheck - Prepares constant-width text for
          troff.

     Syntax
          cw [ -lxx ] [ -rxx ] [ -fn ] [ -t ] [ +t ] [ -d ] [ file ...
          ]

          checkcw [ -lxx ] [ -rxx ] file ...

          cwcheck [ -lxx ] [ -rxx ] file ...

     Description
          cw prepares troff(CT) input files that contain text in the
          constant-width (CW) font for typesetting.

          Because the CW font contains a nonstandard set of characters
          and requires different character and interword spacing from
          standard fonts, documents that use the CW font must be
          preprocessed by cw.  Typical usage is:

               cw file | troff ...

          The checkcw and cwcheck programs check to see that the left
          and right delimiters, as well as the .CW/.CN pairs, are
          properly balanced. They print out all incorrect lines.

          The options for cw, checkcw, cwcheck are:

          -lxx    Designates the one- or two-character string xx as
                  the left delimiter. If xx is omitted, the left
                  delimiter is undefined, which is the default
                  setting.

          -rxx    Designates the one- or two-character string xx as
                  the right delimiter.  The left and right delimiters
                  may be different.

          -fn     Mounts the CW font in font position n; acceptable
                  values for n are 1, 2, and 3.  The default is 3,
                  replacing the bold font.  This option is only useful
                  at the beginning of a document, and can only be used
                  with cw.

          -t      Turns transparent mode off. This option can only be
                  used with cw.

          +t      Turns transparent mode on.  (This is the default.)
                  This option can only be used with cw.

          -d      Prints current option settings on the standard
                  error, in the form of troff(CT) comment lines.  This



     Page 1                                           (printed 8/7/87)





     CW(CT)                   XENIX System V                    CW(CT)



                  option is meant for debugging, and can only be used
                  with cw.

          The left and right delimiters perform the same function as
          the .CW/.CN requests; they are meant, however, to enclose CW
          words or phrases in running text.  cw treats text enclosed
          by delimiters exactly like text bracketed by .CW/.CN pairs.
          For aesthetic reasons, spaces in text bracketed by .CW/.CN
          pairs have the same width as any other CW character.
          However, spaces between delimiters are half as wide, so that
          they are the same width as spacing in the rest of the text,
          though not adjustable.

          Delimiters have no special meaning inside .CW/.CN pairs.

          Cw recognizes five requests.  The requests look like
          troff(CT) macros (see EXAMPLES below), and are copied by cw
          onto its output.  Thus, they can be defined by the user as
          troff(CT) macros.

          The five requests are:

          .CW    Marks the start of text to be set in the CW font.
                 .CW takes the same options, in the same format, that
                 are available on the cw command line.

          .CN    Marks the end of text to be set in the CW font; .CN
                 takes the same options that are available on the cw
                 command line.

          .CD option(s)
                 Changes delimiters and/or settings of other options;
                 takes the same options as the cw command line.

          .CP arg1 arg2 arg3 ...
                 Sets the odd-numbered arguments in the CW font and
                 the even-numbered arguments in the prevailing font.
                 The arguments are delimited like rtroff(CT) macro
                 arguments.

          .PC arg1 arg2 arg3 ...
                 Same as .CP, except that the even-numbered (rather
                 than odd-numbered) arguments are set in the CW font,
                 and the odd-numbered arguments are set in the
                 prevailing font.

          Except for the .CD request and the nine special four-
          character names listed in the table below, every character
          between the .CW and .CN requests is taken literally and
          output as is.  The -t option turns off this feature (called
          transparent mode), and applies normal troff(CT) rules to the
          CW text.



     Page 2                                           (printed 8/7/87)





     CW(CT)                   XENIX System V                    CW(CT)



          Text typeset with the CW font resembles the output of
          terminals and lineprinters.  This font is often used to
          typeset examples of programs and computer output in
          documents such as user guides and programming texts.  The CW
          font contains the 94 printing ASCII characters:

               abcdefghijklmnopqrstuvwxyz
               ABCDEFGHIJKLMNOPQRSTUVWXYZ
               0123456789
               !$&()`'*+@.,/:;=?[]|-_^~"<>{}#\

          It also contains eight non-ASCII characters represented by
          four-character troff(CT) names

               __________________________________________
              |               Character Symbol Troff Nam|
              |_________________________________________|
              |          ``Cents'' sign   /    \(ct     |
              |     EBCDIC ``not'' sign        \(no     |
              |              Left arrow   <-   \(<-     |
              |             Right arrow   ->   \(->     |
              |              Down arrow        \(da     |
              |   Vertical single quote   '    \(fm     |
              | Control-shift indicator   -    \(dg     |
              | Visible space indicator   []   \(sq     |
              |                  Hyphen   -    \(hy     |
              |_________________________________________|

          The hyphen is a synonym for the minus sign (-).

     Examples
          The following are typical definitions of the .CW and .CN
          macros.  They are meant to be used with the mm(CT) macro
          package:

          .de CW                  Begins definition
          .DS I                   Display start, indented
          .ps 9                   9 point type
          .vs 10.5p               Vertical spacing 10.5 points
          .ta 16m/3u 32m/3u 48m/3u 64m/3u 80m/3u 96m/3u Sets tabs
          ..                      Ends definition

          .de CN                  Begins definition
          .ta 0.5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i Resets tabs
          .vs                     Resets vertical spacing
          .ps                     Resets point size
          .DE                     Ends display
          ..                      Ends definition

          When set in running text, the CW font is, by default, set in
          the same point size as the rest of the text.  In displayed
          matter, it can often be set one point smaller than the



     Page 3                                           (printed 8/7/87)





     CW(CT)                   XENIX System V                    CW(CT)



          prevailing point size.  (The displayed definitions of .CW
          and .CN above are one point smaller than the running text on
          this page.) When the .CW font is set in 9-point type, there
          are 12 characters per inch.

          If a document that contains CW text also contains tables and
          equations, the order of preprocessing should be cw, tbl, and
          eqn.  Usually, the tables contained in such documents will
          not contain any CW text, although it is possible to have
          elements of the table set in the CW font; care must be taken
          that tbl(CT) format information is not modified by cw.
          Attempts to set equations in the CW font are not likely to
          be either pleasing or successful.

          In the CW font, overstriking is most easily accomplished
          with backspaces. ( <- represents a backspace.) Because
          spaces (and, therefore, backspaces) are half as wide between
          delimiters as inside .CW/.CN pairs (see above), two
          backspaces are required for each overstrike between
          delimiters.

     Files
          /usr/lib/font/ftCW     CW font-width table

     See Also
          eqn(CT), mmt(CT), tbl(CT), troff(CT)

     Warning
          Text preprocessed by cw must be set on a typesetter equipped
          with the CW font.

     Notes
          Do not use periods (.) or backslashes (\) as delimiters.

          Certain CW characters do not fit well with certain Times
          Roman characters, such as a CW ampersand (&) followed by a
          Times Roman comma(,); in such cases, use troff(CT) half- and
          quarter-spaces.  See also Notes under troff(CT).

















     Page 4                                           (printed 8/7/87)



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