Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iw2(1) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

daiw(1)

lp(1)




iw2(1) iw2(1)
NAME iw2 - prepares data to be printed on the Apple ImageWriter II printer 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]... ARGUMENTS -a dotspace Adds 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 from 1 to 6 additional dot spaces to be added after each proportional character. -b Prints boldface text. Each dot of the character is printed twice with a small shift of position. -c color Prints 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 Selects the magenta color ribbon band. You can specify this color by magenta as well. blue Selects the cyan color ribbon band. You can specify this color by cyan as well. orange Prints orange by overprinting yellow and magenta. green Prints green by overprinting yellow and cyan. purple Prints purple by overprinting magenta and cyan. -d Prints double-width characters. Each character is printed with double the number of dots with which it is normally printed. January 1992 1



iw2(1) iw2(1)
-D udcfile Works the same as the -U option, except that the udcfile filename is prefixed with the directory pathname /usr/lib/iw2/ (see the -U option later in this section). -f Outputs an initial formfeed before any files are printed. Generally used with the Apple Imagewriter II sheetfeeder. file Specifies the file that is prepared for printing. If no file is specified, the standard input is assumed. -h Prints 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 Selects print direction mode. The Apple Imagewriter II can print from left-to-right or 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 Selects language font. As an aid, there are 8 different language fonts used for printing text in other languages. Each of these fonts substitutes characters for these ten American font symbols: # @ [ \ ] ` { | } ~ american Selects the American language font. italian Selects the Italian language font. danish Selects the Danish language font. british Selects the British language font. german Selects the German language font. swedish 2 January 1992



iw2(1) iw2(1)
Selects the Swedish language font. french Selects the French language font. spanish Selects the Spanish language font. -m margin Specifies 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 following 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 Specifies page length. This must be an integer value in inches. 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 Specifies an output file. By default, iw2 writes to the standard output, so this option will redirect the output to file. -p pitch Specifies 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 Prints at 9 cpi, for 72 characters per line. 10 Prints at 10 cpi, for 80 characters per line. 12 Prints at 12 cpi, for 96 characters per line. January 1992 3



iw2(1) iw2(1)
13 Prints at 13.4 cpi, for 107 characters per line. 13.4 may also be specified. 15 Prints at 15 cpi, for 120 characters per line. 17 Prints at at 17 cpi, for 136 characters per line. pica Prints pica proportional font. Averages 10 cpi. elite Prints elite proportional font. Averages 12 cpi. -q quality Specifies quality of printing. The Apple Imagewriter II can print ASCII text in one of three qualities: draft (250 characters per second), correspondence (180 cps), and near letter quality (45 cps). draft Prints in draft quality mode. better Prints in better, or correspondence quality mode. nlq Prints in best, near letter quality. You may also specify best for this mode. -s spacing Specifies spacing, or distance between lines. This value can be specified in two ways. 2 Sets line spacing to 2 lines per inch. 3 Sets line spacing to 3 lines per inch. 4 Sets line spacing to 4 lines per inch. 6 Sets line spacing to 6 lines per inch. 8 Sets line spacing to 8 lines per inch. 9 Sets line spacing to 9 lines per inch. The value can also have a slash (/) affixed to it. Then, this value 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 4 January 1992



iw2(1) iw2(1)
/48. -t tabs Specifies tab settings. Default tabs are set every 8 columns (9, 17, 25, ...). This option 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 option for the margin range table. -u 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. -w value Sets 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 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 9 allow you to set the dot spacing from 1 to 10. -x 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 option, when encountered, resets the buffer holding the initialization sequences that were built by processing the default and environmental variable. -z Specifies that all zeros are to be printed with a slash through them. DESCRIPTION The Apple Imagewriter II is a dot matrix printer that works as a normal ASCII character set printer. It has many January 1992 5



iw2(1) iw2(1)
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 option sets. The iw2 command 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. 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 in the normal ASCII character bit pattern. For example, to define the ASCII space character (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 followed by an octal, decimal, or hexadecimal number that indicates the character to be defined. Octal, decimal, or hexadecimal is selected by using the standard C language conventions. 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. 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 6 January 1992



iw2(1) iw2(1)
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. 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 variables 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 The command: iw2 -c red -q nlq -l british will print text using the red color ribbon, in near letter quality (nlq) mode, using the British language font. January 1992 7



iw2(1) iw2(1)
NOTES When using the -x 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 wanted 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 If you wanted to change the word ``red'' in the file foobar to print in the color red, you could do the following: 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 set and unset the capability, 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 the value of hexadecimal 60). The -o option is ignored when iw2 reads from the standard input. If an input file is specified as an argument, then the -o option works as documented. FILES /usr/bin/iw2 Executable file SEE ALSO daiw(1), lp(1) 8 January 1992

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