haverl@haverl.applicon.UUCP (05/24/88)
Last week, I was trying to figure out how to port MacDraw illustrations into Latex. I didn't entirely solve the problem (anyone else?), but I will tell you what I know. On the Mac side, your first task is to produce a postscript file. You will need to have a Laser writer printer driver and also "Laser Prep" in your system folder. Use the chooser to select the Laser Writer as your printer, even if actually have one connected to the Mac. You will need to make Appletalk active, irrespective of whether or not you have an Appletalk network. Quit the chooser. Now to create a postscript dump. Fire up MacDraw as you usually would. Select "print" from the "file" menu. A dialog box will appear. Hold down the 'f' key to get a postscript dump of the file, hold down the 'k' key to get a postscript dump which include the postscript header (aka Laser Prep). You do not need the header, unless you want to understand Apple's postscript macros which are defined there. As I was saying, you hold down one of these keys when the dialog box appears. Mac will begin to say "beep-beep-beep..." While this is happening, click "OK". Make sure you continue to hold down your key until the message "writing postscript file" appears. These instructions refer to the LaserWriter II printer driver, I don't know if they apply to the drivers for the new laser printers NT and NTX. I would pretty much gaurantee you they do NOT apply to the SC printer. Next you will probably need to find your postscript file. There doesn't seem to be any logic to where Mac puts it. Use findfile. The name is "postscript". Transfer the file to your Suns. Use a communications program which will end lines with line-feed. This is what at least the Suns here like to see. Note: many file transfer programs add garbage to the end of your file. You need an editor which will display ALL control characters to see these extra characters. I suggest Gnu Emacs. You need to delete the extra characters. Note: postscipt files are text files, have a look at them. Now that you have your postscipt file on the Sun network, you should be able to print (only the headerless version) it by typing: lpr -P{name of postscript printer} <name of file> You do output your dvi files in postscript, don't you? If not I think you're stuck. Here is how you include a postscript file in a Latex document: \special{psfile=logo.ps voffset=-18 hoffset=168} I suggest you precede this with a \par to get consistent placing of your drawings, assuming you get that far. Latex and Tex do not understand, and do not try to understand, the argument of \special; instead, the argument is placed in the .dvi file exactly as it is found. It is up to your .dvi to postscript conversion program to interpret "psfile..." Ours does. If you want an example of a postscript file which can successfully be included in a Latex document, I can e-mail you our company logo. Mac postscript is not so easy though. Mac postscript files consist almost exclusively of calls to macros which are defined in Laser Prep. Two calls pairs which cannot be commented out are 'begin-end' (standard Adobe postscript) and 'od-cd.' The 'od' (open document?) call is the one I believe causes our printer to bag the file. I have not put in the time to figure out this macro. It looks like a fair amount of work. Help. Does anyone else know more about Apple Postscript macros? --== Carl Haverl ==-- e-mail: ...!harvard!ulowell!applicon!haverl -or- ...!mit-eddie!applicon!haverl -or- ...!sun!applicon!haverl -or- haverl@applicon.com