steinar@ifi.uio.no (Steinar Kj{rnsr|d) (02/01/91)
Hi, I wonder if someone has seen the same problems as we have, regarding inclusion of PostScript figures from MacDraw into LaTeX documents. Both dvitps version 3.14 and its psfig macros as well as dvips V5.47 together with the epsf* macros are having exactly the same problem. Scenario: - A PS figure from MacDraw using version 70 of the AppleDict md macros. - The file is included as a figure in a LaTeX document, enclosed in a figure environment: psfig/dvitps: \begin{figure} \centerline{\psfig{figure=macdraw-sketch.ps,prolog=prep70.ps,width=6in}} \caption{...} \end{figure} epsfbox/dvips: \begin{figure} \epsfxsize=6in \centerline{\fbox{\epsfbox{macdraw-sketch.ps}}} \caption{...} \end{figure} Both constructions are processed by LaTeX without problems. When it comes to the driver, the correct Apple prologue is included explicitely in the dvitps case, and by the -h option in the dvips case. Previewing the DVI file with xdvi indicates that everything is ok in both cases. The caption occurres where it should and the bounding rectangle (\fbox) shows up where it should too. The PS hardcopy output blows up however. The figure caption is where it should be, but the figure appears on a page by itself, no page numbers or anything generated by TeX on that page. The same happens on the NeXT printer, HPLJ III with Adobe cartridge as well as an Imagen 7320XP with Ultrascript. I've not looked closely on the MacDraw PostScript, just anticipating it to be well conforming and ok. I noticed, however, that the bounding box was wrong. The lly coordinate said something like 28 while the real coordinate should be 400 or so. This was true for other figures as well. The coordinate was corrected before we ran TeX/dvi[t]ps. Any clues will be appreciated. +==================================================================+ ! ! ! Steinar Kjaernsroed, ! ! Dpt. of Informatics, ! ! University of Oslo, ! ! P.O.Box 1080, Blindern, ! ! 0316, Oslo 3, ! ! NORWAY ! ! ! ! Phone: 047+2+453460 (work), ! ! Email: steinar@ifi.uio.no (Internet) ! ! ..!mcsun!ifi!steinar (UUCP) ! ! ! +==================================================================+
edgar@function.mps.ohio-state.edu (Gerald Edgar) (02/01/91)
>- A PS figure from MacDraw using version 70 of the AppleDict md macros.
This arrangement works (usually) on a LaserWriter printer, because
it is supported by Apple. For other printers, you probably need
to modify the LaserPrep prolog. So those you should be talking to
are those with the same printer as yours.
--
Gerald A. Edgar
Department of Mathematics Bitnet: EDGAR@OHSTPY
The Ohio State University Internet: edgar@mps.ohio-state.edu
Columbus, OH 43210 ...!{att,pyramid}!osu-cis!shape.mps.ohio-state.edu!edgar
ogawa@orion.arc.nasa.gov (Arthur Ogawa) (02/02/91)
teinar@ifi.uio.no (Steinar Kj{rnsr|d), in message <CMM.0.88.665408166.steinar@fram.ifi.uio.no>, writes that he encountered problems including a MacDraw-generated PostScript file into his TeX document. Len Schwer wrote a fine article on this subject in TugBoat 11/2, in which he noted that the prep file to be included with the graphic should not be the one supplied withthe Macintosh's system software, but must be a modified one. He also notes that the prep ver. 70 has not yet been so modified. Hopefully the passage of time has changed this last. In general {\em any} PostScript file generated via the print-to-disk method on the Mac (command-F method) will {\em not} be encapsulated PS. That's the basic problem. I was told by someone at BMUG that there is a chooser-level driver that lets you print-to-disk in Adobe Illustrator format. Now that's definitely EPS! Also editable via Adobe Illustrator, even better. So Steinar's efforts seem doomed, but others may know more than I: I would appreciate hearing about the driver in the previous paragraph if anyone knows where it is. Also, does anyone have an update on Len's techniques?
steinar@ifi.uio.no (Steinar Kj{rnsr|d) (02/07/91)
Thanks to all of you who responded to my question on problems with the inclusion of MacDraw figures in LaTeX. I got a number of useful replies and also a copy of a TUGBoat article which addressed the problem. The problem arises since the MacDraw captured QuickDraw after being translated to PostScript is far from being encapsulated. For versions of MacDraw using the laserprep 68, the problem has been fixed by patches to the prep file. Patched prep-68 files can be retrieved by ftp from a number of places, ymir.claremont.edu and linc.cis.upenn.edu to mention some. However, my figures require LaserPrep 70 and no patches seem to be available for this version yet. Luckily, Mr. Eliot Moss posted his advises to the net: >I have found that since MacDraw doesnot produce encapsulated PostScript, etc., >it is sometimes necessary to make some small changes to the MacDraw PostScript >output to get the right behavior. The symptoms you mentioned seem similar to >ones I fixed as follows: > >1) replace the "op" line (near the top) with "/pm save def" >2) replace the "F T cp" line (near the bottom) with "pm restore" > >I have also noticed that the number of argument to psu (up near the top of the >file) has changed over time, and it is sometimes necessary to add additional >values there to get an older file to print correctly with a newer prologue. >Best of luck -- this is not always entirely clear cut! Eliot >-- > The good news is that 1) and 2) together do the job! The psu stuff seems to be ok in my files. Thanks to you Mr. Moss, I'll buy you a beer if you come to Norway ... +==================================================================+ ! ! ! Steinar Kjaernsroed, ! ! Dpt. of Informatics, ! ! University of Oslo, ! ! P.O.Box 1080, Blindern, ! ! 0316, Oslo 3, ! ! NORWAY ! ! ! ! Phone: 047+2+453460 (work), ! ! Email: steinar@ifi.uio.no (Internet) ! ! ..!mcsun!ifi!steinar (UUCP) ! ! ! +==================================================================+