[metapost] Different colours in a label
Pétiard François
petiard.francois at free.fr
Mon Nov 12 10:36:03 CET 2007
Mojca Miklavec a écrit :
> On 11/12/07, Pétiard François wrote:
>> Stephan Hennig a écrit :
>>> One could try to vote for this request, submitted on 2004-08-23:
>>> <URL:https://sourceforge.net/tracker/?func=detail&atid=360783&aid=1014814&group_id=10783>
>
> Thanks.
>
>> OK but how to vote for this request ?
>
> I doubt that you need to vote for it - just take a look at the number
> of open bug reports :) He usually responds very quickly.
From 2004...
>>> For the time being, the LaTeXMP package has some additional colour
>>> support that might work for the OP.
>> Thank you for the tip but I've still a problem;
>>
>> %%%%%% file test.mp
>> prologues:=3;
>> filenametemplate "%j.mps";
>> input latexmp ;
>> setupLaTeXMP(class="article",fontencoding="T1",language="francais",packages="amsmath,amssymb,lmodern",
>> textextlabel=enable,multicolor=enable);
>> beginfig(1);
>> label("$\color{blue}\sqrt{2}$",(0,0));
>> label(btex $\sqrt{2}$ etex,(100,100));
>> endfig;
>> end;
>> %%%%% end of file test.mp
>>
>> after compilation, the file test.mps is not correct: see the symbol
>> "square root" in blue...
>
> I seem to miss some files to be able to compile that file, but you're
> requesting a blue sqrt symbol:
> \color{blue}\sqrt{2}
> you can try
> \sqrt{\color{blue}2}
> if you only want a blue number.
>
No, I want also a blue sqrt symbol, but even this file:
%%%%% file test.mp
prologues:=3;
filenametemplate "%j.mps";
input latexmp ;
setupLaTeXMP(textextlabel=enable,multicolor=enable,
class="article",fontencoding="T1");
beginfig(1);
label("$\sqrt{\color{blue}2}$",(0,0));
label(btex $\sqrt{2}$ etex,(0,12));
endfig;
end;
%%%%% end of file test.mp
doesn't produce a correct file (the bar over 2 is missing).
F. Pétiard
More information about the metapost
mailing list