[pstricks] How to create an eps file?

Franco Bagnoli franco.bagnoli at unifi.it
Sat Aug 21 23:26:36 CEST 2004


On Fri, 20 Aug 2004, Manjusha Joshi wrote:

> Hello,
> 
> > Could anyone please tell me what is the best method of making an eps
> > file from a picture originally created by a PStricks code within a
> > LaTeX file? 
> 
> 1. Make separate .tex file for each fig.
> 2. make .ps file of it.
> 3. Make sure that page number is not printing along with the fig. 
> 2. view it with ghostview
> 3. there are  options you will get ps to eps option, choose it.
> 4. it will convert your .ps to .eps
> 5. repeat same for each figure.

I suppose these are instructions for windows, using linux (unix) or cygwin 
under windows you can automatize it a lot:

I usually produce a lot of pstricks files using gnuplot. I have a simple 
latex template

\documentclass{article}
\usepackage{pst-all}
\usepackage{amsmath}
\pagestyle{empty}
\begin{document}
\input XXXXX
\end{document}

and a makefile with the following rules

%.tex : figtex.orig
  sed -e "s/XXXXX/$(basename $@).pst/" $< > $@

%.eps : %.tex %.pst
  latex $< 
  dvips -E $(basename $<) -o $@
  rm $(basename $<).dvi
  rm  $(basename $<).log
  rm  $(basename $<).aux

so that I just need to write 

make myfig.eps 

and the file myfig.pst is "transformed" to 
an encapsulated postscript, ready to be included in another document. 



-- 
Franco Bagnoli (franchino) <bagnoli at dma.unifi.it> 
virtual location: Dipartimento di Energetica "S. Stecco"
ultra-virtual affiliation: Centro Dinamiche Complesse (CSDC-Firenze)
real location: Dip. Matematica Applicata "G. Sansone", Universita' Firenze,
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787




More information about the PSTricks mailing list