[lltx] Feature Requests

Keith J. Schultz schultzk at uni-trier.de
Tue Jul 31 11:37:07 CEST 2012

Hi All,

I am not very TeX-savvy, yet a decent programmer and am therefore
embarsing Lua(La)TeX.

I am working on some code to automatically generate graphics from Lua-code.

I was disappointed by two facts of the luamplib package.

1) The documentation fails to mention, when using \begin{mplibcode} it MUST be
     on a single line of it own! Furthermore, there MUST be a linebreak before \end{mplib}
     This may be obvious to the developers and experienced users of Metapost, but is not
     to the casual user!

2) The other is the lack to call Lua from within the mplibcode environment!
     This would be a handy feature. Or at least a possiblitily to call Lua from within
      the mplibcode. It should not be that hard, in my knowledge to catch such a command,
      and call a Lua-function, that returns a string of metapost commands and feed that
      to mplib. 

I would like is to do something in Lua(La)TeX as:

Yes, I can get around this by using directlua-calls, but then I have to write a Lua function for
every Metapost image I want to produce. Having a way to call a Lua function that outputs
metapost snippets would be handierand would increase the flexibility of the package greatly.

If there is a way, already to do this I would appreciate any pointers.

Keep up the good work. 

Thanx in advance


More information about the lualatex-dev mailing list