[metapost] Different colours in a label
Pétiard François
petiard.francois at free.fr
Sat Nov 10 12:25:22 CET 2007
Hartmut Henkel a écrit :
> On Sat, 10 Nov 2007, Pétiard François wrote:
>
>> I want to typeset a label like that :
>>
>> E=Q(i)
>>
>> where E is in blue and i is in red.
>>
>> The command :
>>
>> label(btex $\color{blue}E\color{black}=Q(\color{red}i\color{black})$
>> etex,z0);
>>
>> does'nt work : all the label is in black.
>>
>> How can I make ?
>
> e. g. file zz.mp:
>
> verbatimtex
> %&latex
> \documentclass{article}
> \usepackage{color}
> \begin{document}
> etex
> prologues:=3;
> beginfig(1)
> z0=origin;
> label(btex $\color{blue}E\color{black}=Q(\color{red}i\color{black})$
> etex,z0);
> endfig;
> end
>
> then call either
>
> $ mptopdf -raw zz.mp
>
> (gives zz-1.pdf) or simply
>
> $ mpost zz.mp
>
> (gives EPDF file zz.1)
>
> Regards, Hartmut
Sorry, but it doesn't work. All the label is black !
Regards
François
--
petiard.francois at free.fr
More information about the metapost
mailing list