# Re: ferret to .eps

```On Nov 9, 10:29am, S.P. Jewson wrote:
> Subject: ferret to .eps
>
> I'm looking for ways to include ferret output in a latex document.
>
> Using 'set mode meta' and gksm2ps/Fprint results in a .ps file
> which cannot be resized within the latex document.
>
> The best way round this that I have found is to use the freeware
> ImageMagick-display to rotate the plot and resave as .eps format.
> This can then be resized within latex.
> This, however, results in a loss of quality.
>
> My question: is there a better way to do this?
> Can the .plt files be converted directly into .eps files?
> Can the .ps output from gksm2ps be edited to rotate it
> and make it resizable in latex?

This one threw me for a while too.

First thing, the gksm2ps output is not strictly EPS compliant. There is a line
in the postscript that causes problems when trying to include the graphic in a
LaTeX file. The best way to exclude the problematic line is to use grep. For
example:

grep -v initmatrix FILENAME.ps > NEWFILENAME.ps

This will exclude a line that contains the command `initmatrix' from the
postscript file. Now you can include the EPS file in a LaTeX document. (You
could also just edit the .ps file, search for initmatrix and delete the whole
line.

The best way I have found for including postscript files in LaTex is via the
pstricks macros written by Timothy Van Zandt. This is freeware, and should be
available at CTAN archives, if I remember correctly. This gives you a lot more
flexibility than anything else I have tried. Here is a brief example:

In the document declaration include epsf and pstricks:

Then to include a graphic:

\pspicture(0,0)(8.4,9.4)
%  \psgrid
\epsfxsize=8.1cm
\rput(4.4,5.2){\epsfbox{pacio_plots/pacio.ps}}
\endpspicture

The pspicture declares the positioning of a graphics "space" in the document,
psgrid turns on a useful underlying grid, that helps with positioning and
sizing, epsfxsize is the usual scaling command,
rput allows positioning and rotation of the graphic, epsfbox include the eps
file.

It's pretty quick and dirty. Plus there are alot of other nice tricks in the
pstricks macros that I find useful.

Hope this helps! Mark

--
-------------------------------------------------------------------------------
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
===============================================================================

Mark Verschell (markv@coaps.fsu.edu)
Center for Ocean and Atmospheric Prediction Studies
020 Love Building
Florida State University
Tallahassee, FL  32306-3041
(904) 644-6532
(904) 644-4841 (fax)

```