[metapost] Re: [metafont] [question about metapost]How to make color text in boxes?

Laurence Finston lfinsto1 at gwdg.de
Sun Jan 23 14:07:14 CET 2005


On Tue, 18 Jan 2005, Johan Ingvast wrote:

> The pictures that btex ... etex generates can be painted in any color
> when drawn. I use
>     label(btex $A$ etex withcolor red, origin);
> and the like alot.

Hello,

beginfig(1);

%% This didn't work:

%% %label(btex $A$ etex withcolor red, origin);

%% ! Missing `,' has been inserted.
%% <to be read again>
%%                    withcolor
%% l.13 label(btex $A$ etex withcolor
%%                                    red, origin);
%% ?

%% This is the version of MP I'm using:

%% mpost --version
%% MetaPost (Web2C 7.3.7) 0.641
%% kpathsea version 3.3.7

picture p;

%% This didn't work either:

%% p := btex $b$ etex withcolor blue;

%% ! Extra tokens will be flushed.
%% <to be read again>
%%                    withcolor
%% l.24 p = btex $b$ etex withcolor
%%                                  blue;
%% ?

%% This worked:

p = nullpicture;
addto p also btex $b$ etex withcolor blue;
dotlabel.lft(p, (0, 0));
endfig;

Laurence Finston
http://www.gnu.org/software/3dldf/LDF.html



More information about the metapost mailing list