Hi Manuel, All,

I find that the mplibcode environment in LuaLaTeX is missing
an important feature. There is no way to call Lua from inside it!

I have investigated the code and found that the use of the verbatim-
environment is preventing this. But, there is a way to install a Lua-calling
mechanism.

In the Lua-code of of luamplib. the function addline needs to be patched to
catch a dolua-command, extract the Lua-function, call it and finally feed the 
result
in the normal way to mplib.

I have done that!

Is there an interest for such a feature.? What kind of syntax would be 
preferred?

It would be possible to write:

\begin{mplibcode}
        . . .

    dolua(generatesomecommands(with, and, that))

        . . .
\end{mplibcode}

regards
        Keith


Reply via email to