After some struggling with text colouring in metafun I finally encountered on 
the wiki:

Another difference is the way text is handled in mkiv. In particular, color 
(withcolor) is not applied to metapost text. For example,
draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ;

currently does not work in mkiv. However,
label(textext("\color[red]"& decimal i), (i, 0) scaled 1cm);

does work. This second solution works both in mkiv and in mkii. (Note that 
\color[red] can be abbreviated \red.)


My question: is currently in "currently does not work in mkiv" in fact 
permanently or will this restriction soon be lifted? If the restriction is here 
to stay, I will have to find a workaround for my label-typesetting code in 
metapost.

Or perhaps someone can tell me how to make "textext" use a color existing in 
the "metapost world". That would work as well.

Explaining my setup:
The colors are taken up in metapost with
   def defineColors (expr outlineColor, …) … outlinecolor_ := outlineColor … 
enddef;
which is called in ConTeXt as …(\MPcolor{aColor}…
But I do not know how to transform the \MPcolor{aColor} back into a form to be 
used as for example
  textext("<aColor>…

Hans van der Meer



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to