Hal Varian University of Michigan Jim Sterken Textset, Incorporated An
Total Page:16
File Type:pdf, Size:1020Kb
Hal Varian University of Michigan Jim Sterken Textset, Incorporated MacDraw is a program available for the Apple and the same procedure should work for them.) hlacintosh that allows one to generate 'Ltechnical" You then use W's\special command to insert drawings. MacDraw uses an object oriented the MacDraw created files into your document. approach to graphics design which is suitable for When the document is printed you will have nicely many illustration needs. MacDraw should not be integrated text and graphics. confused with MacPaint. which is a bitmap oriented Despite the ease with which the system can be system for "artistic" drawing. MacPaint represents used, there are several tricks that we had to figure a drawing by bit images, and thus its resolution out to get everything working together smoothly. is limited to the resolution of the Mac screen. We're describing the tricks here, so that others can MacDraw represents a drawing by a list of the benefit from our experience. We will assume that objects involved (square, oval, line, etc.) and their the reader is familiar with MacDraw and the general location on the page. Its resolution is determined by operating principles of the IBM AT and Macintosh. the resolution of the output device. Generating PostScript Files MacDraw is capable of generating PostScript Prepare your MacDraw disk by installing the files which can be used to generate high resolution LaserWriter icon in the system. You do not need (300 dpi) images on the Apple LaserWriter and other to have the Laserprep file on this disk, but you will PostScript printers. Textset has developed a DVI to need that file later. PostScript translator, DVILASER/PS, that allows Start PllacDraw and create an illustration in the DVI files to be printed on a PostScript printer. It top 3 inches of the page. This is basically the area seemed to us that it would be useful to be able to shown on the Macintosh screen. The TEX macro merge the graphics images generated by MacDraw defined below expects to find the hIacDraw drawing with the text output generated by In this note m. in this location. Of course it can be rewritten to we describe how we were able to accomplish this. find it elsewhere or to scale or rotate the hIacDraw An Overview drawing before merging it into the document, Once the system is in place it is quite easy to use. but we leave that up to you. First you run MacDraw on the Mac and create your When you have completed the drawing, it drawings. Then you create the PostScript files on is a good idea to save it in case something goes the Mac, and transfer them to the computer on wrong. Once you have done that you can create which you will be running DVILASER/PS. (We did the PostScript file which describes the drawing. To most of our work on an IBM AT, but DVILASER/PS accomplish this you must begin by making sure also runs on a number of other operating systems you have selected the LaserWriter printer using the "Select printer" desk accessory. Then open Editor's Note: this article was originally printed on MacDraw and choose the "Print" option. l+-hen the an Apple LaserWriter using the Laserwriter's Times LaserWriter menu box comes up, you hold down the Roman fonts, with the illustration in Figure 2 inserted by the DVILASERiPS program. For this special issue of cloverleaf key and the "I?" key simultaneously. At TUGBOAT. it was reformatted, typeset on an Alphatype this point the Macintosh should start to sound a bell CRS using the new Computer Modern fonts, and the and part of the display will flash. Keep holding down illustration was reinserted manually. the two keys and click the "OK" box. Don't let up \'olume 7, Number 1 Articles pressure on the two keys until a box appears that Xow start up KERMIT on both systems and make says "Creating Postscript File." sure that each is configured at the same baud rate. The Mac will then create a file that contains parity, etc. We used 9600 bpi and no parity. Now the PostScript commands that it would normally set the Mac to "Be a server" and move to the AT send directly to your LaserWriter. It stores these and type "get filename" where filename is the name commands in a text file called "Postscript." of the PostScript file on the %lac that you want to There seems to be no way to get it to use a more transfer. If all goes well, the file will be transferred informative name. Of course, you can use the Finder over. Again, there are other procedures that you to rename the file to something more meaningful. can use, but we found putting the Mac in the server Since you are going to transfer this file to the mode and using "get" was the quickest and easiest PC, it is a good idea to give it a legal MS-DOS for us. If you have your Postscript files on a Mac name. However, to rename the file you have to exit drive other than the default drive. you can use the MacDraw. This is not a great problem if you are -send file" menu to change the default drive before only converting a few files, but if you are converting using "get." many files, it can take a lot of time. We used a Preparing the LaserWriter public domain desk accessory called .'Rename" which Now you are almost ready to print your document. allowed us to rename the PostScript file from within But first you have to prepare the LaserWriter to MacDraw. There are other desk accessories available accept the SIacDraw document. Remember the file that will also rename files. but we stuck with the first LaserPrep that comes with your LaserWriter? This one we found that worked. file consists of a number of Postscript procedures The properly named file can then be that are used by MacDraw. You have to send this incorporated, as is, into your TEX document via file to the LaserWriter before it can understand the the \PrintMacDraw macro defined below. The material in your MacDraw file \PrintMacDraw macro assumes that figures are being Unfortunately. the LaserPrep file is not a prepared in MacDraw to print at the very top of the straight ASCII file. It seems to consist of a Mac page-it then positions them to the correct spot program that contains embedded in it the ASCII from there. codes of the PostScript macros. In order to use the You should be warned that this way of AT to send these commands to the LaserWriter. you generating PostScript files is an undocumented have to convert the LaserPrep file to straight ASCII. debugging feature of the hlac. It seems to work By far the easiest way to do this is to find with other Mac programs as well, but since it is someone else who has already done it. LVe found undocumented, we have no idea if it will continue to a copy of the LaserWriter header file on Info-\lac. work in future releases of Mac software. -4ccording to the note attached to it. "This is not the Sending the File to the IBM AT official Apple header file. It is neither endorsed nor Yow you need to transmit your Postscript file to the condemned by Apple." If you can get hold of this computer that you will be using to run DVILASER/PS. file, it will make things a lot easier. A copy of this We used an IBM AT, but similar procedures should file is included with DVILASER/PS. work for other computers. If not, you can still create one for yourself, but We used KERMIT to transfer the PostScript file it will take more work. Here is how you do it. First, from the Mac to the AT. There are other systems get hold of the Shareware editor FEDIT, created by available that should work equally well, but we'll John Mitchell. This is a handy little program for describe our KERMIT experience. editing Macintosh files. Use FEDIT to examine a copy First, you need a cable. It turns out that the of the LaserPrep file. Imagewriter cable that connects the hlac to its Now pull down the ..Options1' menu and choose printer will work fine for connecting a Mac to an "Reverse Forks." This will make the Slacintosh IBM PC, if the serial port on the PC has the right think that LaserPrep file is a data file rather than gender. If not, you need a gender converter as well. a resource file. When you've done this you can exit If you are using an IBM AT, it has a 9 pin serial from FEDIT. port just like the Mac but surprise!- they are not Kext use KERMIT to transfer LaserPrep to configured in the same way. We ended up using a the IBM. From now on, we'll refer to this file as standard AT-to-modem cable, plugged into a gender laser .prp. Use your favorite text editor to clean up converter, plugged into the Imagewriter cable. LaserPrep. Here is what you have to do. First. get hIacDraw Pictures ill Documents rid of the binary junk at the beginning and end of % the file. Next, get rid of the random characters at % PrintMacDraw parameters: the end of the PostScript lines in this file. Finally, % #I: name of MacDraw-generated PostScript file comment out the first few lines of the file up to % #2: height of space to reserve but not including the line that begins /md 200.