[Dev-luatex] new/missing feature in luamplib

Keith J. Schultz keithjschultz at web.de
Tue Aug 7 09:29:54 CEST 2012

Hi Manuel, Everybody,

I am just getting into LuaLaTeX.

I needed to do some work with MetaPost. 

While working I came across a kudo. That is once inside the mblibcode
environment one can not call Lua. THIS I consider a missing feature and
a VERY important one. 

I figured it should not be not hard to add in this functionality, Which as it seems
it is not.  I look into the luamplib manual and notice that all that was needed was to
patch luamplib.addline. 

All that was needed was to create a syntax/command that was inside the MetaPost code
noticed this command extract the function call and have it executed. 

I have done this. It is just a couple of lines of code. 

On the TeX of LuaLaTeX side, one can know write

	 <some normal Metapost commands>

	mplibcodedolua(<Lua function call>)

	<more Metapost commands>

My questions are:
	1) Is there any interest in such a function.
	    As I mentionedabove this is not a Lua function, just syntatic sugar
	    so that the provide Lua function gets called.
	2) What should it be called. mblibcodedolua ?

I am asking this before I present my code here so that my code presents
a rounded picture. 


More information about the dev-luatex mailing list