From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72059 Path: news.gmane.org!not-for-mail From: "Meer, H. van der" Newsgroups: gmane.comp.tex.context Subject: color and textext Date: Tue, 1 Nov 2011 12:49:32 +0000 Message-ID: <7A60F538-4ACB-4869-B233-A619D3E2A091@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1376865250==" X-Trace: dough.gmane.org 1320151800 24032 80.91.229.12 (1 Nov 2011 12:50:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 1 Nov 2011 12:50:00 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 01 13:49:55 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RLDms-00043r-Jt for gctc-ntg-context-518@m.gmane.org; Tue, 01 Nov 2011 13:49:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4F199CB0AF; Tue, 1 Nov 2011 13:49:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 219y7GTrfQ3i; Tue, 1 Nov 2011 13:49:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 87336CB0A9; Tue, 1 Nov 2011 13:49:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3D6FBCB0A9 for ; Tue, 1 Nov 2011 13:49:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RKpfzxYtoU3B for ; Tue, 1 Nov 2011 13:49:34 +0100 (CET) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 35F3CCB098 for ; Tue, 1 Nov 2011 13:49:34 +0100 (CET) Original-Received: from jansen.uva.nl (jansen.uva.nl [146.50.108.229]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pA1CnXIU017678 for ; Tue, 1 Nov 2011 13:49:33 +0100 Original-Received: from bijvoet.uva.nl (146.50.108.241) by jansen.uva.nl (146.50.108.229) with Microsoft SMTP Server (TLS) id 14.1.289.1; Tue, 1 Nov 2011 13:49:33 +0100 Original-Received: from ketelaar.uva.nl ([fe80::cc61:4c73:c438:df97]) by bijvoet.uva.nl ([::1]) with mapi id 14.01.0289.001; Tue, 1 Nov 2011 13:49:33 +0100 Thread-Topic: color and textext Thread-Index: AQHMmJS0Hk9IfXenQESdnR4gzIXUJg== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.95.102.36] X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.229; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06FPMNxSG - c662138b6deb - 20111101 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:72059 Archived-At: --===============1376865250== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_7A60F5384ACB4869B233A619D3E2A091uvanl_" --_000_7A60F5384ACB4869B233A619D3E2A091uvanl_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable 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 perm= anently 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 i= n the "metapost world". That would work as well. Explaining my setup: The colors are taken up in metapost with def defineColors (expr outlineColor, =85) =85 outlinecolor_ :=3D outline= Color =85 enddef; which is called in ConTeXt as =85(\MPcolor{aColor}=85 But I do not know how to transform the \MPcolor{aColor} back into a form to= be used as for example textext("=85 Hans van der Meer --_000_7A60F5384ACB4869B233A619D3E2A091uvanl_ Content-Type: text/html; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: quoted-printable 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 ;<= br>
currently does not work in mkiv. However,
label(textext("\color[red]"& decimal i), (i, 0) sca= led 1cm);

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


My question: is currently in "currently does not work in mkiv&q= uot; in fact permanently or will this restriction soon be lifted? If the restri= ction is here to stay, I will have to find a workaround for my label-typese= tting code in metapost.

Or perhaps someone can tell me how to make "textext" use a c= olor 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, =85) =85 outlinecolo= r_ :=3D outlineColor =85 enddef;
which is called in ConTeXt as =85(\MPcolor{aColor}=85
But I do not know how to transform the \MPcolor{aColor} back into a fo= rm to be used as for example
  textext("<aColor>=85

Hans van der Meer



--_000_7A60F5384ACB4869B233A619D3E2A091uvanl_-- --===============1376865250== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1376865250==--