Yogeshwarsing Calleecharan | 2 Dec 2009 08:36
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Hi,
    Thanks for your comments and clarifications. I'm using gnuplot and
then I'm adding the prologues:=3 output to generate the eps. I try to
stick to the metapost output (figurename.number) in my LaTeX documents 
but sometimes when sharing a work, it's useful to have the eps also.

Thanks a lot.
Yogeshwarsing

Troy Henderson wrote:
> I guess since my name was mentioned specifically, I at least should
> say something.
> 
> Yogeshwarsing,
> 
> It is worth mentioning that my mpstoeps script was written prior to
> the "prologues:=3" and "filenametemplate" (or now "outputtemplate")
> options were available in MetaPost.  I no longer use my script now
> that these features are available directly in MetaPost.
> 
> Troy Henderson
> --
> http://tug.org/metapost/
> 

--
http://tug.org/metapost/

Pétiard François | 2 Dec 2009 10:54
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Le 02/12/2009 08:36, Yogeshwarsing Calleecharan a écrit :
> Hi,
>    Thanks for your comments and clarifications. I'm using gnuplot and
> then I'm adding the prologues:=3 output to generate the eps. I try to
> stick to the metapost output (figurename.number) in my LaTeX documents 
> but sometimes when sharing a work, it's useful to have the eps also.
> 
> Thanks a lot.
> Yogeshwarsing

With prologues:=3; the metapost output (figurename.number) is an eps output!

François

--
http://tug.org/metapost/

Yogeshwarsing Calleecharan | 2 Dec 2009 11:27
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

I quote and earlier message in this thread from Taco Hoekwater:

It does in fact create eps, but it still uses the default naming
scheme. To prevent having to rename the output figures, add

   outputtemplate:="%j-%c.eps";

to the metapost source.
-------------------------------------------
-------------------------------------------

Yes you're correct. But it has to be renamed as mentioned above. To 
avoid doing the renaming manually, I added the line mentioned above in 
the mp source.

Even with prologues:=3 set in gnuplot, the generated mp file doesn't 
have the statement prologues:=3. So I have to add these two lines at the 
beginning in the mp file:

prologues:=3
outputtemplate:="%j-%c.eps";

So in my case, it is not just a renaming of the mp output to eps which I 
have to do. Instead, I have to include the above two lines in my mp 
source before running mpost or mp.

Best Regards,
Yogeshwarsing

Pétiard François wrote:
(Continue reading)

Taco Hoekwater | 2 Dec 2009 11:55
Gravatar

Re: how to use mpstoeps on a Windows machine


Yogeshwarsing Calleecharan wrote:
> 
> So in my case, it is not just a renaming of the mp output to eps which I
> have to do. Instead, I have to include the above two lines in my mp
> source before running mpost or mp.

If you have mpost 1.20X you can do that on the commandline:

  mpost --sprologues=3 -soutputtemplate='"%j-%c.eps"' test

(depending on your operating system, you may have to remove the single
quotes)

Best wishes,
Taco

--
http://tug.org/metapost/

Yogeshwarsing Calleecharan | 2 Dec 2009 21:44
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Hi,
   Thanks for the tip. I have another problem. I have TexLive 2009 on my machine with metapost version 1.208 .However as I'm getting problems to run powerdot with TL2009, I have put back an old image containing TL2008 back on my machine. For TL2008, the version of metapost was 1.005 .

I went to http://foundry.supelec.fr/gf/project/metapost/frs/ to download the source metapost-1.208-src.tar.bz2 . I have a win XP machine and I can't understand how to go about to replace the old metapost version in TL2008 with the most recent one.


Will the update to metapost 1.208 give me all the fuctionalities of metapost as in TL2009 despite the installation of metapost will be done in TL2008? Or is it better to run the latest metapost from TL2009?


Thank you very much in anticipation


Best Regards,
Yogeshwarsing


Yogeshwarsing Calleecharan wrote:
> >
> > So in my case, it is not just a renaming of the mp output to eps which I
> > have to do. Instead, I have to include the above two lines in my mp
> > source before running mpost or mp.

If you have mpost 1.20X you can do that on the commandline:

  mpost --sprologues=3 -soutputtemplate='"%j-%c.eps"' test

(depending on your operating system, you may have to remove the single
quotes)

Best wishes,
Taco




--
http://tug.org/metapost/
Yogeshwarsing Calleecharan | 2 Dec 2009 22:11
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Hi again,
         I tried to install the new metapost on TL2008 on my Windows machine. I pick the mpost.exe from the windows file (mingw.zip) at http://foundry.supelec.fr/gf/project/metapost/frs/ and replaced the old mpost.exe (v1.005) in my TL2008 with this new mpost.exe (v1.208). Then I ran the command:

fmtutil --byfmt mpost

which I found in an earlier thread. I got: Ok. mpost.exe exists and mypost.mem is created.

I then try to run the new mpost.exe on my mp file. First with the single quotes as you originally gave me and then without the single quotes as you also suggested. I have a Win XP machine. Here are the outputs:


E:\testing\gn\test35\labe>mpost --sprologues=3 -soutputtemplate='"%j-%c.eps"' my
figu.mp
This is MetaPost, version 1.208 (kpathsea version 3.5.7dev)
(./myfigu.mp
Warning: outputtemplate=0: value has the wrong type, assignment ignored.
[0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>] )
1 output file written: myfigu.0
Transcript written on myfigu.log.

E:\testing\gn\test35\labe>mpost --sprologues=3 -soutputtemplate="%j-%c.eps" myfi
gu.mp
This is MetaPost, version 1.208 (kpathsea version 3.5.7dev)
(./myfigu.mp
Warning: outputtemplate=0: value has the wrong type, assignment ignored.
[0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>] )
1 output file written: myfigu.0
Transcript written on myfigu.log.

E:\testing\gn\test35\labe>


It seems the command outputtemplate is causing problem. Any help would be most appreciated.


Best Regards,
Yogeshwarsing


--
http://tug.org/metapost/
Pétiard François | 2 Dec 2009 23:10
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Le 02/12/2009 22:11, Yogeshwarsing Calleecharan a écrit :
> Hi again, I tried to install the new metapost on TL2008 on my Windows
> machine. I pick the mpost.exe from the windows file (mingw.zip) at
> http://foundry.supelec.fr/gf/project/metapost/frs/ and replaced the
> old mpost.exe (v1.005) in my TL2008 with this new mpost.exe (v1.208).
> Then I ran the command:
> 
> fmtutil --byfmt mpost
> 
> which I found in an earlier thread. I got: Ok. mpost.exe exists and
> mypost.mem is created.
> 
> I then try to run the new mpost.exe on my mp file. First with the
> single quotes as you originally gave me and then without the single
> quotes as you also suggested. I have a Win XP machine. Here are the
> outputs:
> 
> 
> E:\testing\gn\test35\labe>mpost --sprologues=3
> -soutputtemplate='"%j-%c.eps"' my figu.mp This is MetaPost, version
> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
> outputtemplate=0: value has the wrong type, assignment ignored. 
> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
> 
> E:\testing\gn\test35\labe>mpost --sprologues=3
> -soutputtemplate="%j-%c.eps" myfi gu.mp This is MetaPost, version
> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
> outputtemplate=0: value has the wrong type, assignment ignored. 
> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
> 
> E:\testing\gn\test35\labe>
> 
> 
> It seems the command outputtemplate is causing problem. Any help
> would be most appreciated.
> 
> 

I don't have MetaPost v.1.208 on my computer but isn't it

prologues:=3  (not prologues=3)

and

outputtemplate:="%j-%c.eps" (not outputtemplate="%j-%c.eps") ?

F. Pétiard

--
http://tug.org/metapost/

Taco Hoekwater | 2 Dec 2009 23:28
Gravatar

Re: how to use mpstoeps on a Windows machine

Pétiard François wrote:
> Le 02/12/2009 22:11, Yogeshwarsing Calleecharan a écrit :
>> Hi again, I tried to install the new metapost on TL2008 on my Windows
>> machine. I pick the mpost.exe from the windows file (mingw.zip) at
>> http://foundry.supelec.fr/gf/project/metapost/frs/ and replaced the
>> old mpost.exe (v1.005) in my TL2008 with this new mpost.exe (v1.208).
>> Then I ran the command:
>>
>> fmtutil --byfmt mpost
>>
>> which I found in an earlier thread. I got: Ok. mpost.exe exists and
>> mypost.mem is created.
>>
>> I then try to run the new mpost.exe on my mp file. First with the
>> single quotes as you originally gave me and then without the single
>> quotes as you also suggested. I have a Win XP machine. Here are the
>> outputs:
>>
>>
>> E:\testing\gn\test35\labe>mpost --sprologues=3
>> -soutputtemplate='"%j-%c.eps"' my figu.mp This is MetaPost, version
>> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
>> outputtemplate=0: value has the wrong type, assignment ignored. 
>> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
>> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
>>
>> E:\testing\gn\test35\labe>mpost --sprologues=3
>> -soutputtemplate="%j-%c.eps" myfi gu.mp This is MetaPost, version
>> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
>> outputtemplate=0: value has the wrong type, assignment ignored. 
>> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
>> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
>>
>> E:\testing\gn\test35\labe>
>>
>>
>> It seems the command outputtemplate is causing problem. Any help
>> would be most appreciated.
>>
>>
> 
> I don't have MetaPost v.1.208 on my computer but isn't it
> 
> prologues:=3  (not prologues=3)
> 
> and
> 
> outputtemplate:="%j-%c.eps" (not outputtemplate="%j-%c.eps") ?

On the commandline you don't need the assignment syntax.

The problem here is windows shell quoting. My shell on linux needs
'"%j"' to preserve the inner double quotes, but I have no idea wat
the right way is for windows cmd.exe so I cannot help you.

Best wishes,
Taco
--
http://tug.org/metapost/

Pétiard François | 3 Dec 2009 00:00
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

Le 02/12/2009 23:28, Taco Hoekwater a écrit :
> Pétiard François wrote:
>> Le 02/12/2009 22:11, Yogeshwarsing Calleecharan a écrit :
>>> Hi again, I tried to install the new metapost on TL2008 on my Windows
>>> machine. I pick the mpost.exe from the windows file (mingw.zip) at
>>> http://foundry.supelec.fr/gf/project/metapost/frs/ and replaced the
>>> old mpost.exe (v1.005) in my TL2008 with this new mpost.exe (v1.208).
>>> Then I ran the command:
>>>
>>> fmtutil --byfmt mpost
>>>
>>> which I found in an earlier thread. I got: Ok. mpost.exe exists and
>>> mypost.mem is created.
>>>
>>> I then try to run the new mpost.exe on my mp file. First with the
>>> single quotes as you originally gave me and then without the single
>>> quotes as you also suggested. I have a Win XP machine. Here are the
>>> outputs:
>>>
>>>
>>> E:\testing\gn\test35\labe>mpost --sprologues=3
>>> -soutputtemplate='"%j-%c.eps"' my figu.mp This is MetaPost, version
>>> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
>>> outputtemplate=0: value has the wrong type, assignment ignored. 
>>> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
>>> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
>>>
>>> E:\testing\gn\test35\labe>mpost --sprologues=3
>>> -soutputtemplate="%j-%c.eps" myfi gu.mp This is MetaPost, version
>>> 1.208 (kpathsea version 3.5.7dev) (./myfigu.mp Warning:
>>> outputtemplate=0: value has the wrong type, assignment ignored. 
>>> [0{pdftex.map}<cmr10.pfb><cmsy10.pfb><cmmi10.pfb><cmmi7.pfb><cmmi5.pfb>]
>>> ) 1 output file written: myfigu.0 Transcript written on myfigu.log.
>>>
>>> E:\testing\gn\test35\labe>
>>>
>>>
>>> It seems the command outputtemplate is causing problem. Any help
>>> would be most appreciated.
>>>
>>>
>>
>> I don't have MetaPost v.1.208 on my computer but isn't it
>>
>> prologues:=3  (not prologues=3)
>>
>> and
>>
>> outputtemplate:="%j-%c.eps" (not outputtemplate="%j-%c.eps") ?
> 
> On the commandline you don't need the assignment syntax.

OK.

> The problem here is windows shell quoting. My shell on linux needs
> '"%j"' to preserve the inner double quotes, but I have no idea wat
> the right way is for windows cmd.exe so I cannot help you.

Maybe %%j and %%c ?

F. Pétiard
--
http://tug.org/metapost/

Dan&Jan Luecking | 3 Dec 2009 06:40
Picon
Favicon

Re: how to use mpstoeps on a Windows machine

At 03:11 PM 12/2/2009, you wrote:
>Content-class: urn:content-classes:message
>Content-Type: multipart/alternative;
>         boundary="----_=_NextPart_001_01CA7394.11B41EC5"
>
>Hi again,
>          I tried to install the new metapost on TL2008 on my 
> Windows machine. I pick the mpost.exe from the windows file 
> (mingw.zip) at 
>
<http://foundry.supelec.fr/gf/project/metapost/frs/>http://foundry.supelec.fr/gf/project/metapost/frs/ 
> and replaced the old mpost.exe (v1.005) in my TL2008 with this new 
> mpost.exe (v1.208). Then I ran the command:
>
>fmtutil --byfmt mpost
>
>which I found in an earlier thread. I got: Ok. mpost.exe exists and 
>mypost.mem is created.
>
>I then try to run the new mpost.exe on my mp file. First with the 
>single quotes as you originally gave me and then without the single 
>quotes as you also suggested. I have a Win XP machine. Here are the outputs:
>
>
>E:\testing\gn\test35\labe>mpost --sprologues=3 
>-soutputtemplate='"%j-%c.eps"' my
>figu.mp

This is windows, where % signs introduce environmental variables.
Also, quotes tend to be stripped from command line arguments.
After several failed attempts, I discovered the following works
in a cmd.exe window:

mpost -soutputtemplate:=\"%j-%c.eps\" myfigu.mp

While the following works in my usual command window (4NT.exe):

mpost -soutputtemplate:=\"%%j-%%c.eps\" myfigu.mp

I have another windows shell (TCC) on another computer
which I will test tomorrow. But one or the other of these
should work.

Dan

Dan Luecking
Fayetteville, Arkansas 

--
http://tug.org/metapost/


Gmane