From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55710 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.pgf.user,gmane.comp.tex.context Subject: Re: ConText and definecolor: undefined control sequence Date: Wed, 20 Jan 2010 17:01:24 -0500 (EST) Message-ID: References: <20100112150255.GA8216@shahin.dnsalias.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1397948111-1264024885=:31265" X-Trace: ger.gmane.org 1264024920 19621 80.91.229.12 (20 Jan 2010 22:02:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Jan 2010 22:02:00 +0000 (UTC) Cc: mailing list for ConTeXt users , pgf Mailing-List To: Ben Original-X-From: pgf-users-bounces@lists.sourceforge.net Wed Jan 20 23:01:52 2010 Return-path: Envelope-to: gctp-pgf-users@m.gmane.org Original-Received: from lists.sourceforge.net ([216.34.181.88]) by lo.gmane.org with esmtp (Exim 4.50) id 1NXicZ-0003ep-37 for gctp-pgf-users@m.gmane.org; Wed, 20 Jan 2010 23:01:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NXicP-0004w8-U1; Wed, 20 Jan 2010 22:01:41 +0000 Original-Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NXicO-0004w3-Oe for pgf-users@lists.sourceforge.net; Wed, 20 Jan 2010 22:01:40 +0000 X-ACL-Warn: Original-Received: from smtp.mail.umich.edu ([141.211.14.82] helo=hellskitchen.mr.itd.umich.edu) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NXicN-0001zu-9V for pgf-users@lists.sourceforge.net; Wed, 20 Jan 2010 22:01:40 +0000 Original-Received: FROM dhcp128036206067.central.yale.edu (dhcp128036206067.central.yale.edu [128.36.206.67]) By hellskitchen.mr.itd.umich.edu ID 4B577D2D.EA555.16619 ; Authuser adityam; 20 Jan 2010 17:01:18 EST Original-Newsgroups: gmane.comp.tex.pgf.user In-Reply-To: <20100112150255.GA8216@shahin.dnsalias.com> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-Headers-End: 1NXicN-0001zu-9V X-BeenThere: pgf-users@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: pgf-users-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.tex.pgf.user:3043 gmane.comp.tex.context:55710 Archived-At: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1397948111-1264024885=:31265 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Tue, 12 Jan 2010, Ben wrote: > Dear List, > using the pgf build from 20100103 and texlive2009 from the Debian unstable > I've just tried to do the following: > > \enableregime[utf] > \usemodule[tikz] > > \starttext > > \startTEXpage > \pgfutil@definecolor{magenta}{rgb}{1,0,1} > > \starttikzpicture > \draw (0,0) -- (1,1); > \stoptikzpicture > \stopTEXpage > > \stoptext > > I always get > > ! Undefined control sequence. > l.21 \pgfutil > @definecolor{magenta}{rgb}{1,0,1} > ? > ! Emergency stop. > l.21 \pgfutil > @definecolor{magenta}{rgb}{1,0,1} > End of file on the terminal! You need to add \unprotect and \protect \unprotect \pgfutil@definecolor{...} \protect They are similar to \makeatletter and \makeatother in LaTeX. The correct way is to ConTeXt's color mechanism to define colors. For example, \usemodule[tikz] \definecolor[mycolor][r=1,g=0,b=1] \starttext \starttikzpicture \node[text=mycolor] {Test} ; \stoptikzpicture \stoptext This works with MkII but gives an error with MkIV. ! Undefined control sequence. \pgfutil@registercolor ...ef \pgf@temp {\PDFcolor {#1}}\edef \pgf@marshal {\... \pgfutil@colorlet ...x \pgfutil@registercolor {#2} \fi \edef \pgf@marshal {\n... \tikz@next ...futil@colorlet {.}{\tikz@textcolor } \fi \pgfsetcolor {.}\setbo... l.7 \node[text=mycolor] { Test} That is because MkII and MkIV have a different color model, and tikz does not support the MkIV model yet. I am attaching a fix for that. I do not know what is the best way to incorporate it into tikz (perhaps a pgfutils-mkiv.tex file). For the moment, you can just input it after loading tikz. Aditya --8323328-1397948111-1264024885=:31265 Content-Type: TEXT/x-tex; name=pgf-colorfix.tex Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=pgf-colorfix.tex XHN0YXJ0bHVhY29kZQ0KICBwZ2Z1dGlsID0gcGdmdXRpbCBvciB7IH0gDQog IGxvY2FsIHRleHNwcmludCwgZm9ybWF0ID0gdGV4LnNwcmludCwgc3RyaW5n LmZvcm1hdA0KICBsb2NhbCBwcnRjYXRjb2RlcyA9IHRleC5wcnRjYXRjb2Rl cw0KDQogIGZ1bmN0aW9uIHBnZnV0aWwudW5zdXBwb3J0ZWRfY29sb3IobmFt ZSkNCiAgICB0ZXhzcHJpbnQocHJ0Y2F0Y29kZXMsZm9ybWF0KCJcXFBhY2th Z2VFcnJvcntwZ2Z9e2NvbG9yICVzIGhhcyB1bnN1cHBvcnRlZCBtb2RlbH17 fSIsIG5hbWUpKQ0KICAgIHRleHNwcmludChwcnRjYXRjb2Rlcyxmb3JtYXQo IlxccGdmdXRpbEBkZWZpbmVjb2xvcnslc317Z3JheX17MH0iLCBuYW1lKSkN CiAgZW5kDQoNCiAgZnVuY3Rpb24gcGdmdXRpbC5yZWdpc3RlcmNvbG9yKG5h bWUsIGF0dHJpYnV0ZXMpDQogICAgcHJpbnQobmFtZSwgYXR0cmlidXRlcykN CiAgICBsb2NhbCBjdiA9IGNvbG9ycy52YWx1ZShhdHRyaWJ1dGVzKSANCiAg ICBpZiBjdiB0aGVuDQogICAgICBsb2NhbCBtb2RlbCA9IGN2WzFdDQogICAg ICBpZiBtb2RlbCA9PSAxIHRoZW4NCiAgICAgICAgcHJpbnQoIm1vZGVsPTEi KQ0KICAgICAgICB0ZXhzcHJpbnQocHJ0Y2F0Y29kZXMsZm9ybWF0KCJcXHBn ZnV0aWxAZGVmaW5lY29sb3J7JXN9e2dyYXl9eyUxLjNmfSIsIG5hbWUsIGN2 WzJdKSkNCiAgICAgIGVsc2VpZiBtb2RlbCA9PSAzIHRoZW4NCiAgICAgICAg cHJpbnQoIm1vZGVsPTIiKQ0KICAgICAgICB0ZXhzcHJpbnQocHJ0Y2F0Y29k ZXMsZm9ybWF0KCJcXHBnZnV0aWxAZGVmaW5lY29sb3J7JXN9e3JnYn17JTEu M2YsJTEuM2YsJTEuM2Z9IiwgbmFtZSwgY3ZbM10sIGN2WzRdLCBjdls1XSkp DQogICAgICBlbHNlDQogICAgICAgIHByaW50KCJubyBtb2RlbCIpDQogICAg ICAgIHBnZnV0aWwudW5zdXBwb3J0ZWRfY29sb3IobmFtZSkNCiAgICAgIGVu ZA0KICAgIGVsc2UNCiAgICAgICAgcHJpbnQoIm5vIGNvbG9yIikNCiAgICAg IHBnZnV0aWwudW5zdXBwb3J0ZWRfY29sb3IobmFtZSkNCiAgICBlbmQNCiAg ZW5kDQpcc3RvcGx1YWNvZGUNCg0KXHVucHJvdGVjdA0KXGRlZlxwZ2Z1dGls QHJlZ2lzdGVyY29sb3IjMSUNCiAge1xjdHhsdWF7cGdmdXRpbC5yZWdpc3Rl cmNvbG9yKCIjMSIsXHRoZWNvbG9yYXR0cmlidXRlICAgICAgIHsjMX0pfX0N Clxwcm90ZWN0DQoNCg== --8323328-1397948111-1264024885=:31265 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev --8323328-1397948111-1264024885=:31265 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pgf-users mailing list pgf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pgf-users --8323328-1397948111-1264024885=:31265--