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

Daniel H. Luecking luecking at uark.edu
Mon Nov 21 20:19:35 CET 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20161121/8908ed14/attachment-0001.html>


More information about the luatex mailing list