Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iw2(1) — A/UX 0.7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lp(1)



     iw2(1)                                                     iw2(1)



     NAME
          iw2 - Apple Imagewriter II print filter

     SYNOPSIS
          iw2 [-a dotspace] [-b] [-c color] [-d] [-D udcfile] [-f]
          [-h] [-k mode] [-l language] [-m margin] [-n length]
          [-o file] [-p pitch] [-q quality] [-s spacing] [-t tabs]
          [-u] [-U udcfile] [-w value] [-x] [-z] [files] ]

     DESCRIPTION
          The Apple Imagewriter II is a dot matrix printer that works
          as a normal ASCII character set printer.  It has many
          options, including color ribbons, various print qualities,
          national language character sets, downloadable fonts, and
          more.  iw2 is a program that accepts options indicating that
          a file or files (or standard input) is to be printed with
          various Apple Imagewriter II options set.

          iw2 prepares the named files for eventual printing on the
          Apple Imagewriter II by sending appropriate Apple
          Imagewriter II control codes and then the named files to the
          standard output.  If no files are specified, the standard
          input is assumed.  The various features of the Apple
          Imagewriter II may be specified by the following flag
          options:

          -a dotspace Add dot spaces to proportional pitch text.  When
                      the Apple Imagewriter II is printing in a
                      proportional pitch, the space allotted to each
                      character depends on the shape of the character.
                      Each character has one dot space added after it
                      to keep it from running into the next character.
                      This option allows additional dot spaces to be
                      added after each proportional character.  From 1
                      to 6 addtional dot spaces may be added after
                      each proportional character.

          -b          Print boldface text. Each dot of the character
                      is printed twice with a small shift of position.

          -c color    Print text in color.  The Apple Imagewriter II
                      can print in color by using the color ribbon.
                      The color ribbon contains four bands of color:
                      yellow, cyan (greenish-blue), magenta
                      (purplish-red), and black.  In addition, the
                      Apple Imagewriter II automatically prints
                      orange, green, and purple by overprinting one
                      color with another, as shown below.

                      black     Selects the black color ribbon band.
                      yellow    Selects the yellow color ribbon band.
                      red       Actually selects the magenta



     Page 1                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



                                (purplish-red) color ribbon band. You
                                can specify this color by magenta as
                                well.
                      blue      Actually selects the cyan (greenish-
                                blue) color ribbon band.  You can
                                specify this color by cyan as well.
                      orange    Orange will be printed by overprinting
                                yellow and magenta.
                      green     Green will be printed by overprinting
                                yellow and cyan.
                      purple    Purple will be printed by overprinting
                                magenta and cyan.

          -d          Print double-width characters.  Each character
                      is printed with two dots for every one normally
                      printed.

          -D udcfile  This works just like the -U flag option, except
                      that the the udcfile filename is prefixed with
                      /usr/lib/iw2/ first.  (See the -U flag option
                      above).

          -f          An initial formfeed is output before any files
                      are printed.  Generally used with the Apple
                      Imagewriter II sheetfeeder.

          -h          Print half-height characters.  Half-height
                      characters are printed by cutting in half the
                      vertical distance between the rows of dots that
                      make up the characters.

          -k mode     Select print direction mode.  The Apple
                      Imagewriter II can print both left-to-right and
                      bidirectional.  Left-to-right, while slower,
                      improves the precision at which characters line
                      up.

                      lr   Print left-to-right only.
                      bi   Print bidirectional.

          -l language Select language font.  There are 8 different
                      langauge fonts to aid in printing text in other
                      languages.  Each of these fonts substitutes
                      characters for these ten American font symbols:

                                #  @  [  \  ]  `  {  |  }  ~


                      american  Select the American language font.
                      italian   Select the Italian language font.
                      danish    Select the Danish language font.
                      british   Select the British English language



     Page 2                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



                                font.
                      german    Select the German language font.
                      swedish   Select the Swedish language font.
                      french    Select the French language font.
                      spanish   Select the Spanish language font.

          -m margin   Specify the left page margin.  This sets the
                      leftmost column to start printing in.  Normally
                      zero, column number may be set from zero
                      (leftmost) to a value thats depends on the
                      current character pitch, as shown in the table
                      below.
                               pitch   chars/line    range
                               _____________________________
                               9       72           0 to 71
                               10      80           0 to 79
                               12      96           0 to 95
                               13.4    107          0 to 106
                               15      120          0 to 119
                               17      136          0 to 135
                               pica    depends      0 to 71
                               elite   depends      0 to 79
                      For the proportional fonts, elite uses 10
                      characters per inch, and pica uses 12 characters
                      per inch when setting the margin.

          -n length   Specify page length.  This is the page length in
                      inches.  Integer values only.  If the number is
                      preceded by a ``/'', it will be considered as
                      length/144'ths of an inch, i.e., both -n 11 and
                      -n /1584 will set a page length of 11 inches.

          -o file     Specified an output file.  By default, iw2
                      writes to the standard output.  This option will
                      redirect the output to file.

          -p pitch    Specify pitch, or characters per inch.  The
                      Apple Imagewriter II prints in eight different
                      widths (character pitches), from 9 characters
                      per inch (cpi) to 17 cpi.  Two of the character
                      pitches print proportionally; that is, the space
                      allotted to each character depends on the shape
                      of the character.

                      9    Print at 9 cpi, for 72 characters per line.
                      10   Print at 10 cpi, for 80 characters per
                           line.
                      12   Print at 12 cpi, for 96 characters per
                           line.
                      13   Print at 13.4 cpi, for 107 characters per
                           line.  13.4 may also be specified.
                      15   Print at 15 cpi, for 120 characters per



     Page 3                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



                           line.
                      17   Print at at 17 cpi, for 136 characters per
                           line.
                      pica Print Pica proportional font.  Averages 10
                           cpi.
                      elite
                           Print Elite proportional font.  Averages 12
                           cpi.

          -q quality  Specify quality of printing.  The Apple
                      Imagewriter II can print ASCII test in of three
                      qualities: draft (250 cps), correspondence(180
                      cps), and near letter quality (45 cps).

                      draft    Print in draft quality mode.
                      better   Print in better, or correspondence
                               quality mode.
                      nlq      Print in best, near letter quality.
                               You may also specify best for this
                               mode.

          -s spacing  Specify spacing, or distance between lines.
                      This value can be specified in two ways.

                      2    Set line spacing to 2 lines per inch.
                      3    Set line spacing to 3 lines per inch.
                      4    Set line spacing to 4 lines per inch.
                      6    Set line spacing to 6 lines per inch.
                      8    Set line spacing to 8 lines per inch.
                      9    Set line spacing to 9 lines per inch.
          Or the value can have a slash (``/'') prepended to it.  This
          value then indicates line spacing 144'ths of an inch.  For
          example, three lines per inch would be a spacing of of
          48/144'ths, and could be specified by either -s  3 or -s
          /48.

          -t tabs     Specify tab settings. Default tabs are set every
                      8 columns (9, 17, 25, ...).  This flag option
                      may be used to set custom tab stops.  Use of
                      this options clears all default tab stops.  Tabs
                      are specified by numbers followed by commas.
                      For example, to set tabs every four columns (up
                      to column 25):
                                     -t 5,9,13,17,21,25
                      The highest legal column to set the tab stop on
                      must lie in the left margin range.  See the -b
                      flag option for the margin range table.

          -u          This flag option cause all characters and spaces
                      to be underlined.

          -U udcfile  Loads user defined characters from the file



     Page 4                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



                      udcfile.  See below for the definition of the
                      contents of a udcfile.

          -w value    Set dot spacing for proportional pitch text.
                      When the Apple Imagewriter II is printing in a
                      proportional pitch, the space allotted to each
                      character depends on the shape of the character.
                      Each character has one dot space added after it
                      to keep it from running into the next character.
                      This flag option allows setting dot spaces for
                      the proportional character set.  Dot spacing may
                      be set from 0 to 9 dot spaces.  Each
                      proportional character will always include one
                      dot space, thus the settings of 0 through nine
                      allow set dot spacing from 1 to 10.

          -x          This flag option resets the Apple Imagewriter II
                      initialization sequences (that set the default
                      settings).  In this program, first the default
                      sequences (see ``DEFAULTS'' below), then the
                      environment variable, then the options are
                      processed.  This flag option, when encountered,
                      resets the buffer holding the initialization
                      sequences that were built by processing the
                      default and environmental variable.

          -z          This specifies that all zeros are to be printed
                      with a slash through them.

     UDC FILES
          A UDC (user defined character) file consists of ASCII text
          that defines the bit patterns that make up a character.
          More than one character can be defined in a UDC file, and
          any character may be redefined.  Characters that are not
          defined in a UDC file print out as the normal ASCII
          character bit pattern.  For example, to define the ASCII
          space character (SP) to be something that resembles an
          upside down and backwards capital L:

                                     =040
                                     1####.
                                     2...#.
                                     3...#.
                                     4...#.
                                     5...#.
                                     6...#.
                                     7...#.
                                     8...#.

          In a UDC file, each character is defined by nine text lines.
          The first line starts with an equal sign (``=''), and is
          followed by an octal, decimal, or hexadecimal number that



     Page 5                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



          indicates the character to be defined.  Octal, decimal, or
          hexadecimal is selected by using the standard C language
          conventions.

          The next 8 lines defined the 8 rows of the character.
          Notice that the lines are numbered.  These numbers
          correspond to the nine-wire print head.  You are limited to
          only 8 rows, so you can specify rows 1 through 8, or rows 2
          through 9.  Each line contains a period (``.'') to indicate
          no dot, and a pound sign (``#'') to indicate dot.  The width
          of the character is computed by the longest line encountered
          in the 8 lines.  You should place extra periods at the right
          columns of the character definition to allow for space
          between it and the adjacent character.

          For example, below we have redefined the letter ``A'' to be
          a vertical bar, with a small amount of space between it and
          the character on its left, and a lot of space between it and
          the character on the right.

                                    =0x41
                                    1.##...
                                    2.##...
                                    3.##...
                                    4.##...
                                    5.##...
                                    6.##...
                                    7.##...
                                    8.##...

          The maximum width of any character is 16 columns of dots.

     NOTES
          Using the -x flag option, you can get the specific character
          strings needed to set various Apple Imagewriter II
          capabilities, without knowing the machine dependent codes.
          For example, if you wished to print a file, using pr (1),
          but wished the header to be in red, with the rest of the
          file in black, you could do the following:
               set red=`iw2 -x -c red < /dev/null`
               black=`iw2 -x -c black < /dev/null`
               pr -h "$red this is the heading $black" $1 | lp
          Or if you wanted to change the word ``red'' in the file
          foobar to print in the color red, you could do:
               set red=`iw2 -x -c red < /dev/null`
               set black=`iw2 -x -c black < /dev/null`
               sed s/red/"$red"red"$black"/g foobar | lp
          Always remember that you set and unset the capability, or
          the characters following what you have set will remain that
          way.  Also note that in the ``set red'' and ``set black''
          lines is the ```\fR'' character (the ASCII character with
          the value of hexadecimal 60).



     Page 6                                        (last mod. 1/16/87)





     iw2(1)                                                     iw2(1)



     DEFAULTS
          Draft font                  Standard ASCII
          American language           Pitch is 12 cpi (Elite)
          Black color                 Set default tabs every 8 columns (12 cpi)
          Stop double width print     Stop underlining
          Stop boldface               Stop half-height text
          Stop sub/super scripting    Zeros unslashed
          Set left margin at 0        Set page length to 11 inches
          Bidirectional printing      6 lines per inch spacing
          Forward line feeding        Paper-out sensor on
          Insert CR before LF/FF      No LF when line is full
          CR, LF, FF cause printing   Ignore 8th data bit
          Perforation skip disabled   Dot spacing is zero

     ENVIRONMENT
          The environment variable APPLE_IMAGEWRITER_II_PRINT_OPTIONS
          can be used to supply default print options.  All options
          may be specified in the environment variable.  In the C
          shell, a typical setting of the environment variable would
          be:
               setenv APPLE_IMAGEWRITER_II_PRINT_OPTIONS "-c red -q better"

     EXAMPLES
          iw2 -c red -q nlq -l british

     SEE ALSO
          lp(1).

     FILES
          /usr/bin/iw2

























     Page 7                                        (last mod. 1/16/87)



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