From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39366 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: t-tikz: problem with colorspace pgfprgb Date: Mon, 3 Mar 2008 15:25:25 +0100 Message-ID: <6faad9f00803030625m5f38c108jcc004b179e0823d9@mail.gmail.com> 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 1204554413 5186 80.91.229.12 (3 Mar 2008 14:26:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2008 14:26:53 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Mar 03 15:27:20 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 1JWBdQ-0004oJ-0w for gctc-ntg-context-518@m.gmane.org; Mon, 03 Mar 2008 15:27:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7BFD91FBD5; Mon, 3 Mar 2008 15:26:45 +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 21349-03-3; Mon, 3 Mar 2008 15:26:03 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 933E81FB6B; Mon, 3 Mar 2008 15:26:02 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E9EF81FB57 for ; Mon, 3 Mar 2008 15:26:00 +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 21338-02-12 for ; Mon, 3 Mar 2008 15:25:28 +0100 (CET) Original-Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.191]) by ronja.ntg.nl (Postfix) with ESMTP id 455491FB6B for ; Mon, 3 Mar 2008 15:25:28 +0100 (CET) Original-Received: by gv-out-0910.google.com with SMTP id o2so32958gve.1 for ; Mon, 03 Mar 2008 06:25:27 -0800 (PST) Original-Received: by 10.142.225.11 with SMTP id x11mr8925296wfg.204.1204554325576; Mon, 03 Mar 2008 06:25:25 -0800 (PST) Original-Received: by 10.143.173.8 with HTTP; Mon, 3 Mar 2008 06:25:25 -0800 (PST) In-Reply-To: Content-Disposition: inline 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:39366 Archived-At: On Mon, Mar 3, 2008 at 6:15 AM, Aditya Mahajan wrote: > On Sun, 2 Mar 2008, Finn Martensen wrote: > > 2008/3/2, Aditya Mahajan : > > > >> > I have the following problem with TikZ: When I use the "patterns" > >> > library in a tikzpicture environment, the file is compiled without > >> > problems and creates a PDF file. However, Acrobat displays an error > >> > message "Could not find the ColorSpace named 'pgfprgb'". [...] > >> > >> Can you please post a minimal example? I have compiled a few examples > >> from the tikz manual by using all tikz librarries, but never had this > >> problem. > > > > It just discovered that it depends, e.g., on whether there is only one > > page with a tikzpicture or more pages with tikzpictures. To give code > > examples: the first works, but not the second > > > > ************************************** > > Code with no problems: > > ************************************** > > \usemodule[tikz] > > \usetikzlibrary[patterns] > > \starttext > > \starttikzpicture > > \fill[pattern=dots] (0,0) -- (0,1) -- (1,1) -- (1,0); > > \stoptikzpicture > > \stoptext > > > > ************************************** > > Code with problems: > > ************************************** > > \usemodule[tikz] > > \usetikzlibrary[patterns] > > \starttext > > \starttikzpicture > > \draw (0,0) -- (1,0); > > \stoptikzpicture > > \page > > \starttikzpicture > > \fill[pattern=dots] (0,0) -- (0,1) -- (1,1) -- (1,0); > > \stoptikzpicture > > \stoptext > > I can reproduce this problem. On linux, with evince pdf viewer (2.21.91) I > get "Error: Bad color space 'pgfprgb'", with Adobe reader (8.1.2) "Wrong > operand type". > > The example does work fine with plain TeX and LaTeX. Something > wrong in the way patterns are handled by tikz for context. I do not think > that anyone on this list understands the internals of TikZ. Your best bet > is to report this to the tikz-mailing list. Till Tantau has already replied (privately): > I tracked down this problem. It turns out that ConTeXt does, well, > radical things with the page resources (it simply resets them after > each page, which is why a pattern cannot be used on any page other > than the page on which it is defined). I'll try to fix this later, > although ConTeXt could be a bit less aggressive, here... -------- > I fixed this in the CVS. You will have to check it out to use the patch. > > The main problem is that pgf and context both fight over who can set > page resources. As there is no clean way to do this, both pgf and > context have their own systems. > > Actually, context's system is a bit cleaner, but we also have to > support latex and plain tex. > > Anyway, I put in some patches that should solve the problem under > normal circumstances. If you use ConTeXt commands that also mess > around with extended graphic states, some further changes would > presumably be necessary, but I'm not sure. So ... feel free to test it (should I set up automatic updates of tikz from cvs for the minimals?). 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________