Postscript within TeX/LaTeX (dvi2ps help)?

Chuck Ocheret chuck at morgan.com
Fri Mar 31 17:50:14 AEST 1989


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--------



More information about the Comp.sys.sun mailing list