[metapost] mpstoeps perl script

Mau mvs1952 at yahoo.it
Tue Mar 28 13:43:14 CEST 2006


Hi all!

A few weeks ago someone posted a message suggesting use of a perl script 
(mpstoeps.pl) for converting MP output into proper EPS format. Since I 
think this tool might be very useful I installed the script but I have a 
problem. I am not an expert about Perl (never wrote a script etc.) but I 
have perl on my PC and I have been able to run other scripts. I use 
MikTex (recent release) under Win2K and WinEdt as a GUI and TeX/LaTeX 
editor.

Is there anyone in my situation who could point out to me if there is 
some modification which is needed?

What I did is the following:

I have put mpstoeps.pl  into the directory

c:\Perl\site\lib

and then, for file mypicyture.mps,  I launch from winedt

perl c:\Perl\site\lib\mpstoeps.pl  mypicture.mps

Then, it's not clear what happens but I get a file mypicture.tex, where 
I see a problem. The command

\includegraphics{} includes the path of my file in the form 
c:\mydir\mysubdir\mypicture.mps

and I have to change (manually) the \'s  into /'s otherwise latex 
complains (it thinks \mydir is a command). In the end, through dvips, I 
get mypicture.ps where I can see the picure (correctly) but that's not 
an EPS file. I have to convert  to eps through the utility included in 
gsview, and all is fine.

I have the feeling that something should be changed.

Moreover: could I run the script on mypicture.1? (As you all know MP 
files come out of MP with this numbering) I have problems with that.

Thanks to all who would help and cheers to all the community.

Maurizio






More information about the metapost mailing list