[metapost] Different colours in a label

Pétiard François petiard.francois at free.fr
Mon Nov 12 18:48:41 CET 2007


Aditya Mahajan a écrit :
> Sorry, I can't help you with latex, but if you can work with a pdf file, 
> then ConTeXt seems to handle colors fine. To get just a blue square root 
> symbol, you can use
> 
> \setupcolors[state=start]
> 
> \starttext
> 
> \startMPpage
> label(\sometxt{$\color[blue]{\sqrt{\color[black] 2}}$},(0,0));
> label(\sometxt{$\sqrt{2}$},(100,100));
> \stopMPpage
> 
> \stoptext
> 
> 
> You need to have both ConTeXt and ruby installed. Compile this with
> texexec <filename> and it will give you a pdf file.
> 
> So you can generate your figures through context, and include the 
> resulting pdf file in the latex document.

Thank you but I don't have installed ruby and that's not a solution for 
me, because I need to exchange files with other persons and I can't ask 
them to install ruby...

F. Pétiard



More information about the metapost mailing list