[metapost] Different colours in a label
Hartmut Henkel
hartmut_henkel at gmx.de
Sat Nov 10 12:10:49 CET 2007
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
More information about the metapost
mailing list