[luatex] Problem with mplib format in Lua script

Taco Hoekwater taco at elvenkind.com
Sun Dec 20 22:14:45 CET 2009

luigi scarso wrote:
> On Sun, Dec 20, 2009 at 7:11 PM, Nicola <nvitacolonna at gmail.com> wrote:
>> In article <4B2E5B99.9080208 at elvenkind.com>,
>>  Taco Hoekwater <taco at elvenkind.com> wrote:
>>> keeping mem files up-to-date is a bit of a pain, especially for the
>>> embedded version of the library, so I would suggest not using them at
>>> all (plain.mp is tiny anyway).
>>> Just set ini_version to true always and start with an
>>>    mp:execute("input plain")
>> Thank you! That's something I couldn't have figured out myself. Now it
>> makes sense to me why ini_version is true by default.
>> One more thing: to generate a pdf file from the given figure(s), should
>> I call an external program, such as mptopdf? I see that mplib outputs
>> Postscript and SVG and the pdf library does not seem to suit this
>> purpose (but maybe I'm wrong).

You should look into luamplib (it is on texlive, under tex/luatex/,
documentation under doc/luatex/). This is a combined effort by Hans
Hagen and Elie Roux, and it defines an environment that allows you
to key in metapost code inline in Lua(La)TeX documents.

Even if you want to 'roll your own', this is the best place for

Best wishes,

More information about the luatex mailing list