[comp.text.tex] PostScript Figures in LaTeX?

sxm@bebop (Sandeep Mehta) (02/21/90)

In article <1990Feb20.180954.27574@sctc.com>, thomsen@sctc (Dan Thomsen) writes:
>I have heard that postscript figures can be included in Latex documents.
>Has anyone had any luck doing this?  Is any special software needed?
>

Trevor Darrell's psfig macros packages (ftp'able from upenn), and Tony
Li's dvi2ps or ArborText's dvips can do what you are looking for.

--
sxm@philabs.philips.com                             ...to be or not to bop ?

boaz@athena.mit.edu (Boaz P Ben-Zvi) (02/23/90)

In article <1990Feb20.180954.27574@sctc.com>, thomsen@sctc.com (Dan
Thomsen) writes:
> I have heard that postscript figures can be included in Latex documents.
> Has anyone had any luck doing this?  Is any special software needed?
> 
  
To include PostScript code in your LaTeX document you need to use
the  \special  command. LaTeX (TeX) transfers the argument of \special
verbatim to the DVI output, and the software that translates the DVI
into PS should handle that argument.

The common use: a file (e.g., figure.ps) contains the postscript code
for the figure. You put in your LaTeX file something like:
....
\begin{picture}(..., ...)  % picture size enough for figure.ps
\special{psfile=figure.ps}  % include the PS file, use the same coordinates
...... % more stuff (e.g., LaTeX picture commands)
\end{picture}

Programs that convert DVI to PS:
* dvi2ps: available from rtsg.ee.lbl.gov (and other places)
* dvips: available from LaBrea.Stanford.edu

Get one of the above and read its doc to know about more options (e.g.,
with dvips you can include PS code directly inside you LaTeX file,
without using a separate PS file).

------------
Boaz Ben-Zvi
boaz@mit.edu
------------

scott@stl.stc.co.uk (Mike Scott) (02/23/90)

In article <1990Feb20.180954.27574@sctc.com> thomsen@sctc.com (Dan Thomsen) writes:
>I have heard that postscript figures can be included in Latex documents.
>Has anyone had any luck doing this?  Is any special software needed?
>

I think this is a thoroughly bad idea. Latex is supposed to be
virtually-everything-independent. What happens when some poor soul
tries to print your postscript-containing code on, say, a DEC LNO3??
Much better to use the (admittedly poor) latex drawing stuff if at all
possible. Or be honest, and write the whole lot in postscript :-)

Oh yes, I should add we got bitten by this one recently. About 3 pages
of postcript diagrams embedded in several hundred pages of printout.


>Thanks

No thanks.

>
>Dan Thomsen
>thomsen@sctc.com



--
Regards.    Mike Scott       STL, London Road, Harlow, Essex  CM17 9NA, UK
scott@stl.stc.co.uk <or> ...uunet!mcvax!ukc!stl!scott <or>
PSI%234237100122::SCOTT        phone +44-279-29531 xtn 3133.

trevor@mit-amt.MEDIA.MIT.EDU (Trevor Darrell) (02/24/90)

In article <1990Feb22.231556.5937@athena.mit.edu> boaz@lcs.mit.edu writes:
>
>In article <1990Feb20.180954.27574@sctc.com>, thomsen@sctc.com (Dan
>Thomsen) writes:
>> I have heard that postscript figures can be included in Latex documents.
>> Has anyone had any luck doing this?  Is any special software needed?
>> 
>  
>To include PostScript code in your LaTeX document you need to use
>the  \special  command. LaTeX (TeX) transfers the argument of \special
>verbatim to the DVI output, and the software that translates the DVI
>into PS should handle that argument.
...
>\special{psfile=figure.ps}  % include the PS file, use the same coordinates
>* dvips: available from LaBrea.Stanford.edu
...

If you want to include postscript without worrying about the exact
location the figure will appear on the page, use my psfig macros.  It
is smart enough to find the bounding box comment from the postscript
file and establish the appropriate coordinate transforms before
including the figure postscript.

Ftp'able from whitechapel.media.mit.edu or linc.cis.upenn.edu. I don't
email copies so don't request one. There is also a version of dvi2ps
there, although other dvi2ps's may work as well. Mac figures from
laserprep 68 and earlier are also known to work, grab lprep68 while
you're ftping.

Enjoy,
--trevor

p.s. If anyone has analyzed lprep70 and knows the major differences
from 68, please let me know.

p.p.s [*flame*] Why is Apple so g*d*amn arrogant about the postscript
generated by it's software? (Silly me, they Know the Way.)
LaserPrep is one of the worst heaps of junk I have ever seen.