On 12 Apr 2008 at 9:39, [EMAIL PROTECTED] wrote:
> > \startlua
> > mp = mplib.new ( {
> > hash_size = 100000,
> > main_memory = 2000000,
> > param_size = 100000,
> > } )
> >
> > if mp then
> > res = mp:execute(
> > "beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;" )
> > tex.print("[" .. tostring(res.status) .. "]")
> > mp:finish()
> > end
> > \stoplua
>
> no format, so beginfig, draw etc are unknown
I thought 'plain.mem' is the default. But I see, there exists only
'metafun.mem'.
So I wrote:
------------------------------------------------------
mp = mplib.new ( {
hash_size = 100000,
main_memory = 2000000,
param_size = 100000,
mem_name = "metafun.mem"
} )
------------------------------------------------------
and it get the same result
> metapost.process("metafun","some commands")
>
> may work better
------------------------------------------------------
\startlua
mp = mplib.new ( {
hash_size = 100000,
main_memory = 2000000,
param_size = 100000
} )
if mp then
res = metapost.process("metafun","beginfig(1) draw (0,0) .. (1,1)
.. (2,1); endfig; bye;")
tex.print("[" .. tostring(res.status) .. "]")
mp:finish()
end
\stoplua
------------------------------------------------------
results in :
------------------------------------------------------
mplib : loading format: metafun.mp, name:
d:/context/tex/texmf-cache/luatex-
cache/context/c80dc1fd5292ec817c6e82c295beaf1e/formats/cont-en-
metafun.mem
! Emergency stop.
\@@expanded ..... "]")
-- mp:finish()
-- end
}
l.54 \stoplua
! ==> Fatal error occurred, no output PDF file produced!
------------------------------------------------------
why does it load 'metafun.mp'?
after that I tried
------------------------------------------------------
\startlua
mp = mplib.new ( {
hash_size = 100000,
main_memory = 2000000,
param_size = 100000,
mem_name = "metafun.mem"
} )
if mp then
res = metapost.process(mp,
"beginfig(1) draw (0,0) .. (1,1) .. (2,1); endfig; bye;")
tex.print("[" .. tostring(res.status) .. "]")
mp:finish()
end
\stoplua
------------------------------------------------------
which gives the following error:
------------------------------------------------------
report >> error: This is MetaPost, Version 1.003 (Cweb version 0.40)
I can't find the PLAIN mem file!
------------------------------------------------------
What else should I check to find the error?
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________