ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* color and textext
@ 2011-11-01 12:49 Meer, H. van der
  0 siblings, 0 replies; only message in thread
From: Meer, H. van der @ 2011-11-01 12:49 UTC (permalink / raw)
  To: ConTeXt NTG


[-- Attachment #1.1: Type: text/plain, Size: 1230 bytes --]

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




[-- Attachment #1.2: Type: text/html, Size: 1966 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-01 12:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01 12:49 color and textext Meer, H. van der

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).