From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45072 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Colored labels with MetaPost in MkII Date: Fri, 24 Oct 2008 09:15:01 -0400 (EDT) Message-ID: References: <115224fb0810240148o31a5b87blacbac5bc7caca9a@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224854317 11428 80.91.229.12 (24 Oct 2008 13:18:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 13:18:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 24 15:19:29 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KtMZV-0007I4-4s for gctc-ntg-context-518@m.gmane.org; Fri, 24 Oct 2008 15:19:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 969B31FC14; Fri, 24 Oct 2008 15:18:13 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12357-01-8; Fri, 24 Oct 2008 15:17:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2B77D1FC20; Fri, 24 Oct 2008 15:16:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0ADA11FC03 for ; Fri, 24 Oct 2008 15:16:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12358-01-6 for ; Fri, 24 Oct 2008 15:15:45 +0200 (CEST) Original-Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by ronja.ntg.nl (Postfix) with ESMTP id AC9A81FB14 for ; Fri, 24 Oct 2008 15:15:04 +0200 (CEST) Original-Received: FROM adi-laptop.local (c-71-234-195-113.hsd1.ct.comcast.net [71.234.195.113]) BY hackers.mr.itd.umich.edu ID 4901CA56.C50D1.15843 ; 24 Oct 2008 09:15:03 -0400 In-Reply-To: <115224fb0810240148o31a5b87blacbac5bc7caca9a@mail.gmail.com> User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45072 Archived-At: On Fri, 24 Oct 2008, Wolfgang Schuster wrote: > Hi all, > > what is the best method to format MetaPost labels in MkII with \doattributes. \startMPenvironment[global] > \setupcolors[state=start] > > \def\labelstyle{bold} > \def\labelcolor{red} \stopMPenvironment This gives you only bold label. > \starttext > \startMPcode > label(textext("\doattributes{label}{style}{color}{Label}"),origin) ; > \stopMPcode > \stoptext Tex colors do not work inside textext. Try label(textext("\startcolor[red] red \stopcolor"), origin) ; One way to get around this is to use \sometxt. label(\sometxt{\doattributes{label}{style}{color}{Label}},(5cm,0)) ; But then you have to be careful about the differences between \sometxt in MKII and MKIV (which I need to summarize on the wiki). Aditya ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________