[metapost] "input mp-tool" and "input metafun" do not work
Nicola
nvitacolonna at gmail.com
Thu Jan 3 23:46:14 CET 2013
In article <EBABF461-8902-4AEA-99FC-6F88F4A937B6 at me.com>,
Franck Pastor <franck.pastor at me.com> wrote:
> Hello,
>
> In the Metafun manual, it is said that its is enough to input the "mp-tool"
> file, or to enter "input metafun;" to use most of the metafun macros with
> the plain format of MetaPost. It does not work with the Metapost or Metafun
> version included in TeXLive 2012 (I use MacTeX 2012, with Mac OS X 6.8).
>
> Each time I include the line
>
> input mp-tool;
>
> in a MetaPost file, it triggers this error message:
>
> ! I can't open file `mp-tool'.
> l.4 input mp-tool
> ;
> Please type another input file name: file name:
>
> Note that this bug has already been reported here:
> http://tex.stackexchange.com/questions/68750/metapost-mptopdf-complains-cant-o
> pen-file-mp-tool?rq=1
>
> The solution is apparently to enter "input mp-tool.mpii" instead of "input
> mp-tool", but as far as I know it is not documented anywhere.
>
> There is something weirder: 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...
I have not followed the recent developments in ConTeXt, but... I think I
can suggest a workaround for your problem. Since you're using TeXShop, I
recommend that you download the most recent version of my MetaPost
engines (I'm not sure what version TeXShop ships with currently) at
http://users.dimi.uniud.it/~nicola.vitacolonna/home/content/metapost-engi
nes-texshop
To update the engines, just drop the *.engine files in
~/Library/TeXShop/Engines.
Then, instead of ³input metafun;² use the following directive:
% !MPOST mem = metafun
The directive must appear before the first non-comment line in the file
and you must compile with ³nv-metapost², not ³MetaPost².
That should be enough to use MetaFun. Note that the preview (which is
called <source name>.pdf) will lack some features, like transparency,
but the compilation process will in fact produce PDF files with all the
bell-and-whistles (which will be called <source name>-0.pdf and so on).
If you want to see MetaFun special features in the preview, you must use
the nv-metafun engine instead (in which case the above directive is not
needed).
In command-line terms, the above directive replaces
mpost file.mp
with
mpost -mem=metafun file.mp
A detailed documentation can be found in the README.pdf that comes with
my engines. The archive also contains several examples.
Hope this helps,
Nicola
More information about the metapost
mailing list