[metapost] [luatex] Using the mplib inside luatex

Karel Horák akk64 at quick.cz
Mon Jan 5 16:14:23 CET 2009


Taco Hoekwater napsal(a):
> 
> Elie Roux wrote:
>> I can't get it working on my computer: I installed mplib 1.100, it works
>> fine, and according to the lua manual, the mplib in lua is based on this
>> version, but I get this error on the example:
>>
>> mplib: mp error: %s
>>
I got the same, so I tried to insert (into mplib.lua?) the following
word format,
> There is definately an oversight in metapost.report. Hopefully this
> works better:
> 
>   function metapost.report(...)
>       print("mplib: " .. format(...))
>   end
> 

but I did not succeeded too much:

This is LuaTeX, Version snapshot-0.25.4-2008071819 (Web2C 7.5.7) 
(format=luatex 2008.11.30)  5 JAN 2009 16:09
**mplib-example
(mplib-example.tex (mplib.tex
\scratchbox=\box16

! LuaTeX error ./mplib.lua:120: ')' expected near '...'.
l.35 ...tlua0{dofile(kpse.find_file('mplib.lua'))}

?
)
! LuaTeX error <luas[0]>:1: attempt to index global 'metapost' (a nil 
value).
\domplibcode ...t.process('\mplibformat ',[[#1]])}

l.11 \endmplibcode

Thanks a lot,
Karel


More information about the metapost mailing list