From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39215 Path: news.gmane.org!not-for-mail From: Jesse Alama Newsgroups: gmane.comp.tex.context Subject: Re: colors in pgf within context Date: Tue, 19 Feb 2008 10:30:30 -0800 Message-ID: References: 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 1203492221 32465 80.91.229.12 (20 Feb 2008 07:23:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2008 07:23:41 +0000 (UTC) Cc: mailing list for ConTeXt users To: Aditya Mahajan Original-X-From: ntg-context-bounces@ntg.nl Wed Feb 20 08:24:05 2008 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 1JRjJE-0005NB-Na for gctc-ntg-context-518@m.gmane.org; Wed, 20 Feb 2008 08:24:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 07BF81FB82; Wed, 20 Feb 2008 08:23:34 +0100 (CET) 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 17256-05-5; Wed, 20 Feb 2008 08:22:56 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 298C31FBAC; Wed, 20 Feb 2008 08:22:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3854D1FB5B for ; Tue, 19 Feb 2008 19:31:08 +0100 (CET) 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 29964-02 for ; Tue, 19 Feb 2008 19:30:33 +0100 (CET) Original-Received: from smtp-roam.Stanford.EDU (smtp-roam.Stanford.EDU [171.64.10.152]) by ronja.ntg.nl (Postfix) with ESMTP id 961DA1FB74 for ; Tue, 19 Feb 2008 19:30:32 +0100 (CET) Original-Received: from localhost (calaveras.Stanford.EDU [128.12.173.46]) (authenticated bits=0) by smtp-roam.Stanford.EDU (8.12.11/8.12.11) with ESMTP id m1JIUUqk015323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 19 Feb 2008 10:30:30 -0800 User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (darwin) X-Virus-Scanned: amavisd-new at ntg.nl X-Mailman-Approved-At: Wed, 20 Feb 2008 08:22:02 +0100 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:39215 Archived-At: Aditya Mahajan writes: > On Tue, 19 Feb 2008, Jesse Alama wrote: > >> Aditya Mahajan writes: >> >>>> The example features some \definecolor's which I just did away with >>>> (sadly) by simply substituting their defining values for their >>>> occurences. (This is unfortunate, but perhaps necessary until some >>>> other mechanism is produced.) The problem is that the text box to the >>>> right of the picture is supposed to be colored, and with rounded >>>> corners. But the box is missing. Look at p. 20 of >>> >>> The TikZ manual make a lot of uses of the xcolor syntax >>> (e.g. \color{red!20}). There is no equivalent ConTeXt syntax. You need >>> to define a color, say lightred, as follows >>> >>> \definecolor[lightred][r=0.2] >>> >>> For tikz key-value options, pgf works behind the scene to define >>> appropriate colors, so xcolor syntax works for them. So >>> \fill[fillcolor=red!20] will work as expected. However, when using >>> \color inside any box, you need to follow ConTeXt syntax. So >>> \color[red!20] will not work, you need to define a context color and >>> then use that. >> >> I'm still not able to get fillcolor to work with the information box: >> >> \starttikzpicture[scale=4,information text/.style={fill=red}] >> \draw[xshift=1.85cm] node[right,text width=6cm,information text] >> { >> The \color[green]{angle $\alpha$} is >> $30^\circ$ in the example ($\pi/6$ in radians). The \color[red]{sine >> of $\alpha$}, which is the height of the red line, is >> \startformula >> \color[red]{\sin \alpha} = 1/2. >> \stopformula >> By the Theorem of Pythagoras ... >> }; >> >> Is ConTeXt correctly parsing the key "information tex/.style"? > > Works fine here. The text/.style syntax is new in Tikz. Are you using > the cvs version of tikz? No, I'm using the module from the garden, corresponding to the 1.18 release. I just installed the CVS version, and, after recompiling, I see that the backgrounds are still missing. One possible explanation: I'm using the old TPM file that's on the modules page. That should be updated to reflect the file structure of the new CVS version, right? Jesse -- Jesse Alama (alama@stanford.edu) ___________________________________________________________________________________ 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 ___________________________________________________________________________________