From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71202 Path: news.gmane.org!not-for-mail From: Felix Ingram Newsgroups: gmane.comp.tex.context Subject: Re: Tikz and \color Date: Mon, 19 Sep 2011 13:28:22 +0100 Message-ID: References: <4E772A80.2090000@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316435334 10041 80.91.229.12 (19 Sep 2011 12:28:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Sep 2011 12:28:54 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 19 14:28:50 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 1R5cxu-0004vb-Fl for gctc-ntg-context-518@m.gmane.org; Mon, 19 Sep 2011 14:28:50 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 37408CAFAE; Mon, 19 Sep 2011 14:28:49 +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 FUNzf0zHTToI; Mon, 19 Sep 2011 14:28:42 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 67D36CAFA6; Mon, 19 Sep 2011 14:28:42 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C5206CAFA6 for ; Mon, 19 Sep 2011 14:28:40 +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 vNKPOMcQAL8n for ; Mon, 19 Sep 2011 14:28:23 +0200 (CEST) Original-Received: from filter1-ams.mf.surf.net (filter1-ams.mf.surf.net [192.87.102.69]) by balder.ntg.nl (Postfix) with ESMTP id 5F18FCAFA3 for ; Mon, 19 Sep 2011 14:28:23 +0200 (CEST) Original-Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by filter1-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p8JCSMnf011777 for ; Mon, 19 Sep 2011 14:28:22 +0200 Original-Received: by ewy4 with SMTP id 4so532569ewy.5 for ; Mon, 19 Sep 2011 05:28:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Kwx9iktRMAoFAaLF4c2LjtDZ8fH19/pdVthlfCI0fVc=; b=Yhqa5Mb4GoWWFFQYd30ajH/qeaB5WiCYUtyt4NK2vR+N3IGS2bgTKb5XeLyp22a3u2 DnuZdy6u1b1NGgxK4VgBtbhvL2fkNFOsCamJkAJ48YO9fXgHj8FEpQk4M1sN9ustwc4Y xBeegQlUWrjEVhfON7dKkv+MraIndBPYgAVLA= Original-Received: by 10.52.99.42 with SMTP id en10mr2081779vdb.220.1316435302214; Mon, 19 Sep 2011 05:28:22 -0700 (PDT) Original-Received: by 10.52.184.229 with HTTP; Mon, 19 Sep 2011 05:28:22 -0700 (PDT) In-Reply-To: <4E772A80.2090000@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.215.46; 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: 06FyAsmb4 - 475d0b9fe8bf - 20110919 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.69 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:71202 Archived-At: Excellent. Thanks Hans - that works brilliantly. However, it's now made me realise that I'm using movesidefloat incorrectly! (need to float something higher than the start of the paragraph). Back to the details manual! Thanks again, Felix On 19 September 2011 12:41, Hans Hagen wrote: > On 19-9-2011 13:10, Felix Ingram wrote: >> >> Hello all, >> >> I'm using Tikz to draw some fancy text boxes, but I've bumped into an >> annoying problem. If you run the example below then the body text will >> be rendered in red. If you remove the "REMOVE ME" text, then it will >> be rendered in black. I would expect the black version to be the >> correct version but I need to add text to my node. > >> Am I using \color correctly? Does anyone know how I might go about >> debugging this? Is there a way to determine whether it's Context or >> Tikz that's misbehaving? > > Tikz implements it own color handling and that interferes with the handli= ng > built in context. The following works. > > \usemodule[tikz] > > \setuphead[section][after=3D{\blackrule[color=3Dred,width=3D125mm,height= =3D1pt,depth=3D1pt]\vskip > 2em}] > > \starttext > > \section{Some Title} > > \dontleavehmode\forcecolorhack > \starttikzpicture > =A0 =A0\node{x}; > \stoptikzpicture > > Flank sint culpa, dolore dolore ham hock chicken t-bone irure > pastrami. Eiusmod corned beef sint enim. Corned beef nulla qui aute, > meatloaf ground round cillum ex. Ut swine pork belly, tongue pig sed > tail frankfurter biltong ut bresaola anim. Jowl consequat tenderloin, > meatloaf fatback eu sint duis mollit chuck biltong. Nostrud cupidatat > nulla meatball, brisket irure dolor. Aliqua chuck ut in, nisi ea > t-bone shankle bresaola. > > \stoptext > > We can consider adding some dummy to the tikz wrapper (\char0 will do) so > that the context color mechanism gets reset before tikz doe some literal > juggling. > > Anyway, when text precedes the picture it will go okay. > > Hans > > ----------------------------------------------------------------- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0Hans Hagen | PRAGMA ADE > =A0 =A0 =A0 =A0 =A0 =A0 =A0Ridderstraat 27 | 8061 GH Hasselt | The Nether= lands > =A0 =A0tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | www.pragma-pod.nl > ----------------------------------------------------------------- > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________