[metapost] "input mp-tool" and "input metafun" do not work

Nicola nvitacolonna at gmail.com
Fri Jan 4 11:00:59 CET 2013


In article <76BD1939-644B-4213-86C3-1C11FE9A65DC at mac.com>,
 Franck Pastor <franck.pastor at mac.com> wrote:

> Le 3 janv. 2013 à 23:46, Nicola a écrit :
> 
> > In article <EBABF461-8902-4AEA-99FC-6F88F4A937B6 at me.com>,
> > Franck Pastor <franck.pastor at me.com> wrote:
> >
> >> If I try "input metafun" instead of "input 
> >> mp-tool", as the Metafun manual also suggests, I obtain this strange error 
> >> message:
> >> 
> >> ! Redundant equation.
> >> <to be read again> 
> >>                   ;
> >> l.305 mm=2.83464;      pt=0.99626;
> >>                                          dd=1.06601;      bp:=1;
> >> ? 
> >> 
> >> If anyone can explain me what it means…
> > 
> > This seems to me like plain.mp is included twice...
> 
> Not by me anyway!!!

No, I was thinking that MetaFun has always included (a copy of) plain.mp (a file 
called mp-base), but in the past that was not causing clashes, while now 
apparently it does. The problem here is that mpost loads plain.mp by default, 
and if you add “input metafun”, that causes plain.mp (or, to be precise, a copy 
of it) to be loaded again by metafun.mp. This is why using -mem=metafun works: 
it loads MetaFun *instead of* Plain, not in addition to.

As for mp-tool, in fact mp-tool.mp does not exist any longer, because there are 
two “lines of development” for MetaFun, one for ConTeXt MKII and one for ConTeXt 
MKIV (the newer version). So, most of the files composing MetaFun now come in 
two flavors, suffixed .mpii and .mpiv respectively (they are in 
/usr/local/texlive/2012/texmf-dist/metapost/context/base). I think that you are 
not supposed to include such files directly anyway.

> Including the line "% !MPOST mem = metafun" does seem to remove the problem. 
> Thanks! 

You're welcome!

> But, as you said, it is a workaround, so I suppose there is also something to 
> be corrected at a higher level.

I do not know whether this is a bug or it is intended behaviour (after all, 
MetaFun was not meant to be used with Plain MetaPost, but with ConTeXt): my 
opinion is that compatibility can be easily restored (you just need to change a 
dozen = into := in mp-base.mpii). But you should ask in the ConTeXt mailing list.

Nicola



More information about the metapost mailing list