Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iw2(1) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

daiw(1)

iwprep(1)

lp(1)

iwmap(4)




iw2(1) iw2(1)
NAME iw2 - Apple ImageWriter 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] [file...] DESCRIPTION The Apple Imagewriter II is a dot matrix printer that works as a normal ASCII character set printer. It has many op- tions, including color ribbons, various print qualities, na- tional 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 Imagewrit- er 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 pro- portional 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 from 1 to 6 additional dot spaces to be added after each proportional char- acter. -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, magenta, and black. In addition, the Apple Imagewriter II automatically prints orange, green, and purple by overprinting one color with another, as follows: black Selects the black color ribbon band. yellow Selects the yellow color ribbon band. red Actually selects the magenta color ribbon band. You can specify this color by magenta as well. blue Actually selects the cyan color ribbon April, 1990 1



iw2(1) iw2(1)
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 udcfile filename is prefixed with the directory pathname /usr/lib/iw2/ first. (See the -U flag option later in this section). -f An initial formfeed is output before any files are printed. Generally used with the Apple Im- agewriter II sheetfeeder. -h Print half-height characters. Half-height char- acters are printed by cutting in half the verti- cal distance between the rows of dots that make up the characters. -k mode Select print direction mode. The Apple Image- writer II can print from left-to-right or bi- directional. Left-to-right, while slower, im- proves the precision at which characters line up. lr Print left-to-right only. bi Print bidirectional. -l language Select language font. As an aid, there are 8 different language fonts used for printing text in other languages. Each of these fonts substi- tutes 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 language 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. 2 April, 1990



iw2(1) iw2(1)
-m margin Specify the left page margin. This sets the leftmost column to start printing in. Normally zero, the column number may be set from zero (leftmost) to a value that depends on the current character pitch, as shown in the follow- ing list. 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 setting the margin when using proportional fonts, elite uses 10 characters per inch and pica uses 12 characters per inch. -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 in. That is, both -n 11 and -n /1584 will set a page length of 11 inches. -o file Specify an output file. By default, iw2 writes to the standard output, so this option will redirect the output to file. -p pitch Specify pitch, or characters per inch. The Ap- ple 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 line. 17 Print at at 17 cpi, for 136 characters per line. pica Print pica proportional font. Averages 10 cpi. elite April, 1990 3



iw2(1) iw2(1)
Print elite proportional font. Averages 12 cpi. -q quality Specify quality of printing. The Apple Image- writer II can print ASCII text in one of three qualities: draft (250 characters per second), correspondence (180 cps), and near letter quali- ty (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 (/) affixed to it. This value, then, indicates line spacing at 1/144 in. For example, three lines per inch would be a spacing of 48/144 in., 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 op- tion clears all default tab stops and is used to set custom 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 limit on the number of settable tabs is 8. The highest legal column for the tab stop must lie in the left margin range. See the -m flag option for the margin range table. -u This flag option causes all characters and spaces to be underlined. -U udcfile Loads user defined characters from the file udcfile, the contents of which are defined later in this section. 4 April, 1990



iw2(1) iw2(1)
-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 a single 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 are processed (see ``DEFAULTS'' later in this section), then the environment variable, and then the options. This flag option, when encountered, resets the buffer holding the ini- tialization sequences that were built by pro- cessing 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 de- fined in a UDC file print out in the normal ASCII character bit pattern. For example, to define the ASCII space charac- ter (SP) to resemble 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 9 text lines. The first line starts with an equal sign (=), and is fol- lowed by an octal, decimal, or hexadecimal number that indi- cates the character to be defined. Octal, decimal, or hexa- decimal is selected by using the standard C language conven- tions. April, 1990 5



iw2(1) iw2(1)
The next 8 lines define 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 8 rows only, 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, 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 specify character strings, as 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 want the header to be in red and 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 the follow- ing: 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 must both set and unset the capa- bility, or else the characters following what you have set will remain that way. Also note that in the set red and set black lines is the ```'' character (the ASCII character with 6 April, 1990



iw2(1) iw2(1)
the value of hexadecimal 60). The -o flag is ignored when iw2 reads from the standard in- put. If an input file is specified as an argument, then the -o option works as documented. 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 FILES /usr/bin/iw2 SEE ALSO daiw(1), iwprep(1), lp(1), iwmap(4). April, 1990 7

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