[lltx] mplibcode inside a command?

Manuel Pégourié-Gonnard mpg at elzevir.fr
Tue Jul 5 14:00:28 CEST 2011


Hi,

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.

Manuel.


More information about the lualatex-dev mailing list