Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!ogccse!blake!uw-beaver!rice!sun-spots-request From: chuck@morgan.com (Chuck Ocheret) Newsgroups: comp.sys.sun Subject: Postscript within TeX/LaTeX (dvi2ps help)? Keywords: Software Message-ID: <8903141936.AA03255@terminus.Morgan.COM> Date: 31 Mar 89 07:50:14 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 47 Approved: Sun-Spots@rice.edu Original-Date: Tue, 14 Mar 89 14:36:34 EST X-Sun-Spots-Digest: Volume 7, Issue 218, message 17 of 17 I am using dvi2ps (from MIT?) to convert LaTeX output to postscript. I am running on a network of Sun 3's and 4's (and one crummy 386i) under SunOS 4.0.1. The manual page for dvi2ps mentions support for the TeX \special command which should allow the inclusion of encapsulated Postscript. I am not having any luck at all getting figures to appear where I want (if I can get them to appear at all). Would someone please e-mail directly to me ways to include the following Postscript code as a figure (with a caption) within a LaTeX document scaled arbitrarily? ---- begin postscript code ------------ %!PS-Adobe-1.0 %%Title: line drawing %%EndComments gsave 0 setlinewidth newpath % % Data varies between 0 and 1 in x and y % Data should be displayed in rectangular region within 1 inch border on page % % Translate by 1 inch 72.0 72.0 translate % % Scale to fit in rectangular region 468 648 scale % % Draw box 0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto 0 0 lineto % % Draw 'X' 1 1 lineto 0 1 moveto 1 0 lineto stroke showpage grestore ---- end postscript code ------------ I have tried things like the following with no success... --- begin LaTeX code-------- \begin{figure} \special{psfile=foo.ps hscale=.5 vscale=.5} \caption{test caption} \label{figure_x} \end{figure} --- end LaTeX code--------