[luatex] luamplib : btex etex and \mpcolor in macros

Maxime Chupin notezik at gmail.com
Mon Nov 21 16:48:11 CET 2016


I want to define LaTeX macros containing some MP code that I want to use in
mplibcode environment :


\newcommand\test{draw (0,0) -- (2cm,0) withcolor \mpcolor{red}}
\newcommand\testb{label(btex $x$ etex, (0,0));}


But there is a problème with \mpcolor (\test):
\test ->draw (0,0) -- (2cm,0) withcolor \mpcolor
l.14 \end{mplibcode}
an a problem with btex etex (\testb) :
(luamplib)               ! You can only use `btex' or `verbatimtex' in a

Do you understand why ? and do you have a solution ?
All the best,

Maxime Chupin
Site personnel : http://fougeriens.org/~mc/
Site professionnel : https://www.ceremade.dauphine.fr/~chupin/
adresse libre : chupin at fougeriens.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20161121/1cad19fc/attachment.html>

More information about the luatex mailing list