🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #41807

Re: MAC-PostScript & TeX

#41807
From: Jack Hodges
Date: Wed, 03 May 1989 05:42
86 lines
4049 bytes
In article <28996@ucbvax.BERKELEY.EDU> munson@renoir.Berkeley.EDU.UUCP (Ethan V. Munson) writes:
>About two months ago I posted a message to the TEXHAX mailing list for
>help on how to include Macintosh generated illustrations in TeX documents
>which use the psfig macro package.  Many events have intervened, but I
>think that I finally have an answer that is sufficiently correct to
>post publicly.  I know of four basic approaches of which I consider
>only three effective.  They are:
 
>1) MODIFY THE LASERPREP FILE (Ineffective): Several people reported
>success with this method, but I couldn't duplicate their results.

>3) CRICKET DRAW PLUS SOME GYRATIONS (Effective but many steps):
 
>Cricket Draw presents a cheap solution that requires some elbow-grease.
>I think that most of the file editing on the UNIX box can be automated, but
>a run of bbfig will always be required.

I really don't understand the problem here.  Whether you use macpaint,
macdraw, superpaint, cricket draw or whatever all that you need do is
use command-f very shortly after telling the system that it is OK to print
the document.  The system than creates a postscript rather than appending
the laserprep file and sending to the printer.  After that you need a
proper laserprep file to add into your latex document, and a macro for inserting
the postscript into your document.  I have included my versions below in case
you are wondering.  One of the issues is what version of laserprep you are
using with your machine to prepare the figure (generate the postscript) since
it must match at the other end.  And of course the form of the figure macro
depends on what version of dvi2ps (or dvips) that you are running.  My current
macro is based on dvips but I have others using the older format.

A sample section for a LaTeX document...

\documentstyle{article}

...

\newcommand{\figcap}[2]{
  \small
  \rm
  {\caption{#2\label{#1}}}
  }

\newcommand{\macputhv}[5]{
  \special{psfile="#1",
           hscale=#2,
           vscale=#2,
           hoffset=#4,
           voffset=#5}
  \vspace{#3in}
  }

...

\begin{document}
\special{header /usr/local/lib/tex/laserprep.5.0.pro}

...

\end{document}

I have also included a figure captioning macro which I use with macputhv
in obvious ways.  The macputhv macro uses dvips format, and you can modify
scales and offsets at will.  In dvi2ps the syntax is slightly different.
The header that I have in this sample is laserprep.5.0.  In systems where
your Mac has 5.2 (or other) installed there is no need for this statement.
I have it because I am still trying to maintain consistency with a myriad
of figures produced under the 5.0 laserprep version.  An example of the
use of macput is shown below:

\begin{figure}
\macputhv{foo.ps}{1.0}{4.5}{144}{0}
\vskip 0.05in
\figcap{foo}{Foos live in large jungles without trees}
\end{figure}

I have used various versions of these macros on papers, books, dissertation
and so forth for various versions of LaTeX on various Unix boxes and Mac
laserprep files.  Sometimes the propblems have been incompatible laserprep
files, or changing syntax for the dvi2ps -> dvips conversion, or whatever but
the figures always eventually came out.  My current preference is Cricket Draw
but only because of the quality of figure and not because it takes more or
less effort to produce the postscript file...that is invariant.

Of course, if I have answered the wrong question then I apologize.

Jack Hodges, UCLA 
Technical Details
Message-ID: <23522@shemp.CS.UCLA.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!elroy!usc!orion.cf.uci.edu!uci-ics!ucla-cs!hodges
References: <362100013@uicsl.csl.uiuc.edu> <28996@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!ames!elroy!usc!orion.cf.uci.edu!uci-ics!ucla-cs!hodges
From: hodges@maui.cs.ucla.edu (Jack Hodges)
Newsgroups: comp.sys.mac
Subject: Re: MAC-PostScript & TeX
Message-ID: <23522@shemp.CS.UCLA.EDU>
Date: 3 May 89 05:42:31 GMT
References: <362100013@uicsl.csl.uiuc.edu> <28996@ucbvax.BERKELEY.EDU>
Sender: news@CS.UCLA.EDU
Reply-To: hodges@cs.ucla.edu (Jack Hodges)
Organization: UCLA Computer Science Department
Lines: 86