[lltx] mplibcode inside a command?

Arno Trautmann Arno.Trautmann at gmx.de
Tue Jul 5 14:03:09 CEST 2011


Hi Manuel,

Manuel Pégourié-Gonnard wrote:
> Le 04/07/2011 21:02, Arno Trautmann a écrit :
>> I was wondering what would be the best way to pack metapost-code so I
>> can use a LaTeX-command to typeset it. But I fail due to fancy verb (I
>> guess …), assume the following code:
>>
>> \documentclass{minimal}
>> \usepackage{luamplib}
>> \def\foo{
>> \begin{mplibcode}

>> beginfig(1)

>> draw (0,0) -- (7,2);


>> endfig
>> 
\end{mplibcode}
>> }
>> \begin{document}
>> \foo
>> \end{document}
>>
> I'm afraid there is no easy way to achieve that right now. I've noted it and
> future versions of luamplib will probably provide a wider range of commands and
> environments with different catcode regimes, probably like luacode now, to make
> this easier.

Ok, thanks for your answer. Let me know if I can help with 
coding/testing! (rather testing than coding …)

cheers
Arno


More information about the lualatex-dev mailing list