Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cw(1) — sys5 — Apollo Domain/IX SR9.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

eqn(1)

mm(1)

tbl(1)

troff(1)



CW(1)                    DOMAIN/IX SYS5                     CW(1)



NAME
     cw, checkcw - prepare constant-width text for troff

USAGE
     cw [-lxx] [-rxx] [-fn] [-t|+t] [-d] file(s)
     checkcw [-lxx]  [-rxx] file(s)

DESCRIPTION
     Cw is a preprocessor for troff(1) input files containing
     text to be typeset in the constant-width (CW) font.

     Since text typeset using the CW font resembles the output of
     terminals and line printers, this font is used to typeset
     program examples and computer output in user manuals, pro-
     gramming texts, etc.  It has been designed to look quite
     distinctive when used with the Times Roman font.

     Because the CW font contains a ``non-standard'' set of char-
     acters, and text typeset with it requires different charac-
     ter and interword spacing than is used for ``standard''
     fonts, documents that use the CW font must be preprocessed
     by cw.

     The CW font contains the following 94 printable ASCII char-
     acters:

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

     plus eight non-ASCII characters represented by four-
     character troff(1) names (in some cases attaching these
     names to ``non-standard'' graphics), as follows:

                        Character Symbol Troff Name
          _________________________________________
                   ``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







Printed 12/4/86                                              CW-1







CW(1)                    DOMAIN/IX SYS5                     CW(1)



     The hyphen is a synonym for a plain minus sign (-).  Certain
     versions of cw recognize two additional names: \(ua for an
     up arrow and \(lh for a diagonal left-up (home) arrow.

     Cw recognizes five request lines, as well as user-defined
     delimiters.  The request lines look like troff(1) macro
     requests, and are copied in their entirety by cw onto its
     output.  Thus, you can define them as troff(1) macros.  In
     fact, the %.CW% and %.CN% macros should be defined this way.

     Cw reads the standard input when no files are specified, so
     it can be used as a filter.  A typical use is as follows:

          cw files | troff ...

     Checkcw checks that left and right delimiters, as well as
     the %.CW%/%.CN% pairs, are properly balanced.  It prints out
     all offending lines.

     This version of the commands is an older one (pre-System V),
     because the System V version is only available through the
     AT&T Documenter's Workbench for which Apollo has not yet
     been licensed.

REQUESTS
     .CW  Set start of text in the CW font. Use %.CW% to cause a
          break.  Take precisely the same options, in precisely
          the same format, that are available on the cw command
          line.

     .CN  Set end of text in the CW font.  Use %.CN% to cause a
          break.  Take the same options that are available on the
          cw command line.

     .CD  Change delimiters and/or settings of other options.
          Take the same options that are available on the cw com-
          mand line.

     .CParg1 arg2 arg3 ...argn
          Concatenate all arguments that are delimited like
          troff(1) macro arguments.  Set the the odd-numbered
          arguments in the CW font, and the even-numbered ones in
          the prevailing font.

     .PCarg1 arg2 arg3 ...argn
          Perform the same function as %.CP%, except set the
          even-numbered (rather than odd-numbered) arguments in
          the CW font.





CW-2                                              Printed 12/4/86







CW(1)                    DOMAIN/IX SYS5                     CW(1)



     The %.CW% and %.CN% requests are meant to bracket text
     (e.g., a program fragment) to be typeset in the CW font ``as
     is.''  Normally, cw operates in the transparent mode.  In
     this mode, except for the %.CD% request and the nine special
     four-character names listed in the table above, every char-
     acter between %.CW% and %.CN% request lines stands for
     itself.

     In particular, cw arranges for periods (.) and apostrophes
     (') at the beginning of lines, and backslashes (%\%) and
     ligatures (%fi%, %ff%, etc.) everywhere to be ``hidden''
     from troff(1).  The transparent mode can be turned off (see
     below), in which case normal troff(1) rules apply.  In any
     case, the effect of the font changes generated by the %.CW%
     and %.CN% requests are invisible to you.

     The only purpose of the %.CD% request is to allow the chang-
     ing of various options other than just at the beginning of a
     document.

DELIMITERS
     You can also define delimiters.  The left and right delim-
     iters 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 just like text bracketed by %.CW%/%.CN% pairs.
     For aesthetic reasons, however, spaces in text bracketed by
     %.CW%/%.CN% pairs have the same width as any other CW char-
     acter.  Spaces between delimiters are half as wide, so that
     they have the same width as spaces in the prevailing text
     (but they are not adjustable).

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

OPTIONS
     -lxx      Specify the one- or two-character string xx as the
               left delimiter.  If xx is omitted, specify the
               left delimiter as undefined, which it is ini-
               tially.

     -rxx      Specify the one- or two-character string xx as the
               right delimiter.  The left and right delimiters
               may (but need not) be different.

     -fn       Mount 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.

     -t        Turn transparent mode off.



Printed 12/4/86                                              CW-3







CW(1)                    DOMAIN/IX SYS5                     CW(1)



     +t        Turn transparent mode on (initial default).

     -d        Print current option settings on file descriptor 2
               in the form of troff(1) comment lines.  This
               option is meant for debugging.

CAUTIONS
     Text preprocessed by cw requires that it be set typeset on a
     machine equipped with the CW font.

     It is not wise to use periods (%.%) or backslashes (%\%) as
     delimiters.

     Some CW characters do not concatenate gracefully with cer-
     tain Times Roman characters; e.g., a CW ampersand (%&%) fol-
     lowed by a Times Roman comma(%,%).  In such cases, troff(1)
     half- and quarter-spaces must be carefully used.

     Cw output is often difficult to read.

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

RELATED INFORMATION
     eqn(1)
     mm(1)
     tbl(1)
     troff(1)

























CW-4                                              Printed 12/4/86





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