Maxime Chupin wrote:
> But there is a problème with \mpcolor (\test):
> -------------------
> \test ->draw (0,0) -- (2cm,0) withcolor \mpcolor
> {red}
It does appear that luamplib has been changed without changing the
documentation or the comments. There is no \mpcolor, but rather \mplibcolor.
Its syntax is
\usepackage{luamplib}
\usepackage{color} % or xcolor
% define a macro, followed by a color specification:
\mplibcolor\myclr[rgb]{1,0,0}
\newcommand\test{draw (0,0) -- (2cm,0) withcolor \myclr;}
% and don't forget to terminate the draw command
% here (e.g., with a semicolon) or when \test is used.
Good luck,
Dan
Daniel H. Luecking
University of Arkansas
Fayetteville, AR, USA