From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70778 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: pgf colors Date: Fri, 19 Aug 2011 10:32:29 +0200 Message-ID: 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: dough.gmane.org 1313742776 10194 80.91.229.12 (19 Aug 2011 08:32:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 19 Aug 2011 08:32:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 19 10:32:52 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 1QuKVU-00061C-BM for gctc-ntg-context-518@m.gmane.org; Fri, 19 Aug 2011 10:32:48 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9F341CAED5; Fri, 19 Aug 2011 10:32:47 +0200 (CEST) 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 mvA31wNBz7s3; Fri, 19 Aug 2011 10:32:44 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 661D2CAED0; Fri, 19 Aug 2011 10:32:44 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A0551CAED0 for ; Fri, 19 Aug 2011 10:32:43 +0200 (CEST) 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 b-imYnLK+9fz for ; Fri, 19 Aug 2011 10:32:32 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 282C8CAEAA for ; Fri, 19 Aug 2011 10:32:32 +0200 (CEST) Original-Received: from mail-qw0-f41.google.com (mail-qw0-f41.google.com [209.85.216.41]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p7J8WUkp031162 for ; Fri, 19 Aug 2011 10:32:31 +0200 Original-Received: by qwa26 with SMTP id 26so2668074qwa.14 for ; Fri, 19 Aug 2011 01:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=eLEB/nPnKesng2v1EXL5CtKF8wGI6PTa/Ax4U7WDaU8=; b=HYWdffS0AaRF0MBic1oV6Op1R6YpNth49+1bQmimtzKrFbSWwSea8XTiW2F8nCNJcN 7+nIgA7O5p0x1whOYykAL48MMpAlt6WCgHKgHatzOhgtNUSlGspKhR89WGIX2BLwva1Q t+8oD/83nCPfRtn0vLFSO4p3w1fJc8w44vBio= Original-Received: by 10.224.204.133 with SMTP id fm5mr1647584qab.160.1313742749974; Fri, 19 Aug 2011 01:32:29 -0700 (PDT) Original-Received: by 10.229.235.5 with HTTP; Fri, 19 Aug 2011 01:32:29 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.216.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cFm8wuWJ - e8c4b3f6ce80 - 20110819 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 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:70778 Archived-At: Hello, I'm asking just in case that there is any PGF guru on this mailing list, else I will ask on the PGF list. I have noticed that TikZ terminal for gnuplot is broken (it worked half a year ago) because of the following definitions: \def\gpcolor#1{\tikzset{global #1}} \tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}} \tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}} \tikzset{global color/.code={\color{#1}}} Example of usage: \gpcolor{color=gp lt color 0} \gpcolor{rgb color={1.000,0.000,0.000}} Clearly the command \color{...} is something latex-specific. The question is - does anyone know how to rewrite the commands written above into generic code that will work in all of the three: plain TeX, LaTeX and ConTeXt? "Minimal" example: \usemodule[tikz] \edef\tikzatcode{\the\catcode`\@} \catcode`\@=11 \def\gpcolor#1{\tikzset{global #1}} \tikzset{rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}} \tikzset{global rgb color/.code={\pgfutil@definecolor{.}{rgb}{#1}\color{.}}} \tikzset{global color/.code={\color{#1}}} \catcode`\@=\tikzatcode \starttext \starttikzpicture \gpcolor{color=red} % or: \gpcolor{rgb color={1.000,0.000,0.000}} \draw (0,0)--(10,0)--(10,5)--(0,5)--cycle; % this one should be red \stoptikzpicture \stoptext Thanks, Mojca ___________________________________________________________________________________ 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 ___________________________________________________________________________________