Taco Hoekwater | 6 May 12:04 2011

MetaPost 1.504


We are happy to announce a new release of MetaPost:

----------------------------------------------------------------------
MetaPost 1.504
----------------------------------------------------------------------

The standalone distribution package and a win32 binary can be downloaded
immediately from

   http://foundry.supelec.fr/gf/project/metapost/

This is a bugfix release following the major internal rewrite done
for 1.500. In fact, this will be the version of metapost that will
be on TeXLive 2011.

The win32 binary is intended for texlive or a similar web2c-based
installation, this executable will *not* work for miktex.

Of course, we welcome any comments (either good or bad) that you may
have. Simply replying to this message is fine, but see the bottom of
the message for a more formal way to report bugs and feature requests.

----------------------------------------------------------------------
What is new in MetaPost version 1.504:
----------------------------------------------------------------------

* A fix to the automatic detection of 'dvitomp' mode based on the
   executable name (proposed by PEB).

(Continue reading)

Brian Kell | 6 May 00:20 2011
Picon

Limits for TEX.mp?

I am working on a couple of MetaPost drawings that have a lot of nearly 
identical labels, differing only in subscripts, so I'm generating them 
with the TEX() macro from TEX.mp inside a pair of nested loops. These 
are all very simple labels---they're all of the following form:
     TEX("$c_{" & decimal(i) & decimal(j) & "}$")

Partway through my second drawing, I get the error "Unable to make mpx 
file" from MetaPost, on a loop iteration that is just like all the other 
iterations. The full error is shown below.

fatal: Command failed: etex --parse-first-line --interaction=nonstopmode 
mp632926.tex; see mpxerr.log
 >> mptextmp.mp
 >> mptextmp.mpx
! Unable to make mpx file.
l.1 btex
          $c_{31}$ etex
1 output file written: final-3a.mps
Transcript written on final.log.

It seems that MetaPost is running into a limit on the number of times 
the TEX() macro can be called. For this particular file, the limit 
appears to be 122 times (the error occurs on the 123rd call).

I was able to isolate the problem to a simpler input file:

input TEX;
beginfig(1);
for i=1 upto 300:  label(TEX(decimal(i)), (0,0));  endfor
endfig;
(Continue reading)

Taco Hoekwater | 6 May 17:08 2011

Re: Limits for TEX.mp?

On 05/06/2011 12:20 AM, Brian Kell wrote:
>
> input TEX;
> beginfig(1);
> for i=1 upto 300:
> label(TEX("$x_{" & decimal(i) & "}$"), (0,0));
> endfor
> endfig;
>
> In this case I get 122 successful iterations, but the "Unable to make
> mpx file" error occurs on the 123rd iteration, which is exactly where I
> see the problem in my original file.

It looks like metapost is running out of open file handles.
(I see the same effect on linux but only after 506 iterations,
which happens to match 1024 open file handles). I'll investigate
this further in the weekend.

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

Taco Hoekwater | 9 May 15:26 2011

Re: Limits for TEX.mp?

On 05/06/2011 05:08 PM, Taco Hoekwater wrote:
> On 05/06/2011 12:20 AM, Brian Kell wrote:
>>
>> input TEX;
>> beginfig(1);
>> for i=1 upto 300:
>> label(TEX("$x_{" & decimal(i) & "}$"), (0,0));
>> endfor
>> endfig;
>>
>> In this case I get 122 successful iterations, but the "Unable to make
>> mpx file" error occurs on the 123rd iteration, which is exactly where I
>> see the problem in my original file.
>
> It looks like metapost is running out of open file handles.
> (I see the same effect on linux but only after 506 iterations,
> which happens to match 1024 open file handles). I'll investigate
> this further in the weekend.

Found the problem: the .mpx file reader forgot to close any of the tfm 
files it had to read, resulting in lots of open tfm files. Fixed in 
trunk, branches/1.5, and tl2011 (dev).

Best wishes,
Taco

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

(Continue reading)

Karl Koeller | 17 May 18:00 2011

MPEDIT env var

I have a question:

I use WinEdt as my editor.

It sets the environment variables TEXEDIT, MFEDIT and MPEDIT to itself 
for 'e' response to errors.

e.g. TEXEDIT=WinEdt.exe "[Open(|%s|);SelPar(%d,7)]"

and it works fine. WinEdt opens the file at the line corresponding to 
the error.

Instead, when I do the same with metapost, WinEdt opens the file, but 
the line is the last used, not the line where the error is found.
And the sintax is the same:

MPEDIT=WinEdt.exe "[Open(|%s|);SelPar(%d,7)]"

Any idea on how to set MPEDIT to act the same way as TEXEDIT?

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

Joe Neeman | 19 May 07:49 2011
Picon

metapost 1.211 and *.mem files

Consider the attached mf2pt1.mp file. In metapost 1.208, I can do:

mpost -progname=mpost -ini mf2pt1.mp -progname=mpost \\dump
mpost -mem=mf2pt1 -progname=mpost '\mode:=localfont; mag:=100; bpppix 0.02;'

and mpost exits without an error. If I try the same two commands in metapost 1.211, however, I get the following output from the second command:

This is MetaPost, version 1.211 (TeX Live 2010/Arch Linux) (kpathsea version 6.0.0)
>> bpppix0.02
! Isolated expression.
<to be read again>
                   ;
<*> \mode:=localfont; mag:=100; bpppix 0.02;

I got these two commands (along with the mf2pt1 file) from the lilypond build system, which used to work with metapost 1.208. How can I get them working in a newer version of metapost?

Cheers,
Joe

Attachment (mf2pt1.mp): application/octet-stream, 19 KiB
--
http://tug.org/metapost/
Werner LEMBERG | 19 May 16:44 2011
Picon

Re: metapost 1.211 and *.mem files

> Consider the attached mf2pt1.mp file. In metapost 1.208, I can do:
> 
> mpost -progname=mpost -ini mf2pt1.mp -progname=mpost \\dump
> mpost -mem=mf2pt1 -progname=mpost \
>       '\mode:=localfont; mag:=100; bpppix 0.02;'

This should be

  bpppix:=0.02;

and I really doubt that it has worked before without `:='...

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

Werner LEMBERG | 19 May 16:55 2011
Picon

Re: metapost 1.211 and *.mem files

From: Werner LEMBERG <wl <at> gnu.org>
Subject: Re: [metapost] metapost 1.211 and *.mem files
Date: Thu, 19 May 2011 16:44:42 +0200 (CEST)

>> Consider the attached mf2pt1.mp file. In metapost 1.208, I can do:
>> 
>> mpost -progname=mpost -ini mf2pt1.mp -progname=mpost \\dump
>> mpost -mem=mf2pt1 -progname=mpost \
>>       '\mode:=localfont; mag:=100; bpppix 0.02;'
> 
> This should be
> 
>   bpppix:=0.02;
> 
> and I really doubt that it has worked before without `:='...

Oops, sorry!  Please forget my remark.

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

Werner LEMBERG | 19 May 16:57 2011
Picon

Re: metapost 1.211 and *.mem files

> Consider the attached mf2pt1.mp file. In metapost 1.208, I can do:
> 
> mpost -progname=mpost -ini mf2pt1.mp -progname=mpost \\dump
> mpost -mem=mf2pt1 -progname=mpost '\mode:=localfont; mag:=100; bpppix 0.02;'
> 
> and mpost exits without an error. If I try the same two commands in metapost
> 1.211, however, I get the following output from the second command:
> 
> This is MetaPost, version 1.211 (TeX Live 2010/Arch Linux) (kpathsea version
> 6.0.0)
>>> bpppix0.02
> ! Isolated expression.
> <to be read again>
>                    ;
> <*> \mode:=localfont; mag:=100; bpppix 0.02;
> 
> I got these two commands (along with the mf2pt1 file) from the lilypond
> build system, which used to work with metapost 1.208. How can I get them
> working in a newer version of metapost?

Another try: Is it possible that somewhere in your metapost source
file path there is another, old `mf2pt1.mp' file which doesn't have a
`bpppix' function?

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

Hans Hagen | 19 May 16:22 2011
Picon

Re: metapost 1.211 and *.mem files

On 19-5-2011 7:49, Joe Neeman wrote:
> Consider the attached mf2pt1.mp file. In metapost 1.208, I can do:
>
> mpost -progname=mpost -ini mf2pt1.mp -progname=mpost \\dump
> mpost -mem=mf2pt1 -progname=mpost '\mode:=localfont; mag:=100; bpppix 0.02;'
>
> and mpost exits without an error. If I try the same two commands in metapost
> 1.211, however, I get the following output from the second command:
>
> This is MetaPost, version 1.211 (TeX Live 2010/Arch Linux) (kpathsea version
> 6.0.0)
>>> bpppix0.02
> ! Isolated expression.
> <to be read again>
>                     ;
> <*>  \mode:=localfont; mag:=100; bpppix 0.02;

best find out what bppix is supposed to be, a variable or a macro; maybe 
try

bpppix := 0.02 ;

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
--
http://tug.org/metapost/


Gmane