[comp.text] How to incorporate Macintosh generated PostScript graphics into TeX or LaTeX documents

lfwang@athena.mit.edu (L. F. Wang) (02/21/88)

Recently I have tried to incorporate graphics generated by McDraw
on the Macintosh computer into LaTeX documents and encountered some
problems.  What I did is the following.  First I obtained the PostScript
output from the Macintosh McDraw program and transferred it onto a
mainframe computer running Unix.  I add the appropriate header file
to the front of the file of the Postscript code.  (When I send the file
to the Laser Writer, the output is what I expect.)
Then I created a test LaTeX file the content of which is

\documentstyle{article}
\begin{document}
\begin{figure}
\special{psfile=test.ps}
\vspace{3in}
\caption{This is a test figure.}
\end{figure}
\end{document}

When I run the LaTeX file to produce the dvi file, run "dvi2ps" to
get PostScript output, and send it to the Apple Laser Writer, I
get an output page with nothing on it but the caption for the figure.
I would appreciate it if anyone who has successfully incorporated
Macintosh-generated Postscript code into TeX or LaTeX documents
would give me a hint as to how he or she did do.  If you think the
answer would be of general interest to readers of the "comp.text"
news group, then post the reply there; otherwise, please write to
the following electronic mail address:
lfwang@athena.mit.edu
Thanks in advance for any help with this question.

lamy@ai.toronto.edu (Jean-Francois Lamy) (02/24/88)

When including Mac documents in a Tex/LaTeX document one must redefine
some of the commands that occur in the LaserWriter header.  Your picture
is most likely being clipped because it falls off the page.

So adding this before your Mac picture (after the LaserPrep header) should
work.

      % make X grow towards the bottom of the page, make positioning
      % relative to current position by ignoring Mac translations.
      /txpose{
	 1 -1 scale  % make y coordinates relative to top of figure
      } bind def

      % ignore Mac page breaks
      /cp {pop pop} bind def


Jean-Francois Lamy
AI Group, Department of Computer Science           lamy@ai.toronto.edu
University of Toronto, Canada M5S 1A4              uunet!ai.toronto.edu!lamy