From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63642 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: Ugly bug with TikZ in recent ConTeXt MKIV Date: Thu, 18 Nov 2010 09:25:43 +0100 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <201011180925.43310.alan.braslau@cea.fr> 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: dough.gmane.org 1290068778 3726 80.91.229.12 (18 Nov 2010 08:26:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 18 Nov 2010 08:26:18 +0000 (UTC) Cc: ntg-context@ntg.nl To: Mojca Miklavec Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 18 09:26:13 2010 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 1PIzoq-0004lM-VC for gctc-ntg-context-518@m.gmane.org; Thu, 18 Nov 2010 09:26:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9F477CA85F; Thu, 18 Nov 2010 09:26:12 +0100 (CET) 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 5YH5Yv6cv4-O; Thu, 18 Nov 2010 09:26:09 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 17DCDCA84C; Thu, 18 Nov 2010 09:26:09 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B817ECA84C for ; Thu, 18 Nov 2010 09:26:07 +0100 (CET) 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 BzAJklrtxxeT for ; Thu, 18 Nov 2010 09:26:05 +0100 (CET) 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 93A20CA82B for ; Thu, 18 Nov 2010 09:26:05 +0100 (CET) Original-Received: from cirse-out.extra.cea.fr (cirse-out.extra.cea.fr [132.166.172.106]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oAI8Q4g6031491 for ; Thu, 18 Nov 2010 09:26:05 +0100 Original-Received: from epeire2.extra.cea.fr (epeire2.extra.cea.fr [132.167.198.32]) by cirse.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.0) with ESMTP id oAI8Q3uV008512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 18 Nov 2010 09:26:03 +0100 Original-Received: from orpin1.extra.cea.fr (orpin1.extra.cea.fr [132.167.198.4]) by epeire2.extra.cea.fr (8.14.4/8.14.4) with ESMTP id oAI8Q3BA029165; Thu, 18 Nov 2010 09:26:03 +0100 (envelope-from alan.braslau@cea.fr) Original-Received: from iram-ha-003840.localnet (iram-ha-003840.extra.cea.fr [132.166.25.152]) by orpin1.extra.cea.fr (8.13.8/8.13.8/CEAnet-Extranet-out-1.1) with ESMTP id oAI8Q3IY010252; Thu, 18 Nov 2010 09:26:03 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.32; KDE/4.4.5; x86_64; ; ) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=132.166.172.106; country=FR; region=A3; city=Gif-sur-yvette; latitude=48.6833; longitude=2.1333; http://maps.google.com/maps?q=48.6833,2.1333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cDwwq4CO - 6ab577449535 - 20101118 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:63642 Archived-At: On Thursday 18 November 2010 00:00:33 Mojca Miklavec wrote: > Dear Hans, > > The following example worked perfectly fine with the version of > ConTeXt MKIV I was using one hour ago (no idea which version, but > something less than two weeks old). It still works OK with MKII and it > works much worse in the real document that I'm using. > > In my document both images are completely screwed up. Here it's only > the second one and if I comment out the first one, the second figure > comes out fine, so I'm a bit clueless about what magic is going on > inbetween. > > Nothing in TikZ has changed (I'm still using the "frozen" version from > November 2009 from minimals), so it must have something to do with > ConTeXt MKIV. It just messes up with some boxes on the page in some > unpredictable way. > > \usemodule[tikz] > \starttext > \placefigure[force][BCl3 sigma]{x}{ > \hbox to .9\textwidth{\hss\starttikzpicture > \node[circle,inner sep=0pt] (B) at (0,0) {B}; > \node[circle,inner sep=0pt] (a1) at ( 90:0.9cm) {Cl}; > \node[circle,inner sep=0pt] (a2) at (210:0.9cm) {Cl}; > \node[circle,inner sep=0pt] (a3) at (330:0.9cm) {Cl}; > \draw (B)--(a1); > \draw (B)--(a2); > \draw (B)--(a3); > \stoptikzpicture > \hbox to 2cm{} > \starttikzpicture[>=stealth,very thick] > % \node[label=above:$a_1$] (a1) at ( 90:1cm) {$a_1$}; > \node[circle,inner sep=0pt] (a1) at ( 90:1.2cm) {$a_1$}; > \node[circle,inner sep=0pt] (a2) at (210:1.2cm) {$a_2$}; > \node[circle,inner sep=0pt] (a3) at (330:1.2cm) {$a_3$}; > % \draw[->] (0,0)--(-30:1cm); > % \draw[->] (0,0)--( 90:1cm); > % \draw[->] (0,0)--(210:1cm); > \draw[->] (0,0)--(a1); > \draw[->] (0,0)--(a2); > \draw[->] (0,0)--(a3); > \stoptikzpicture\hss} > } > \stoptext > > Thanks, > Mojca Seems to work OK for me. Alan P.S. You can try (I did not look into "stealth"): \usemodule[tikz] \starttext \placefigure[force][BCl3 sigma]{x}{ \hbox to .9\textwidth{\hss\starttikzpicture \node[circle,inner sep=0pt] (B) at (0,0) {B}; \node[circle,inner sep=0pt] (a1) at ( 90:0.9cm) {Cl}; \node[circle,inner sep=0pt] (a2) at (210:0.9cm) {Cl}; \node[circle,inner sep=0pt] (a3) at (330:0.9cm) {Cl}; \draw (B)--(a1); \draw (B)--(a2); \draw (B)--(a3); \stoptikzpicture \hbox to 2cm{} \starttikzpicture[>=stealth,very thick] \node[circle,inner sep=0pt] (a1) at ( 90:1.2cm) {$a_1$}; \node[circle,inner sep=0pt] (a2) at (210:1.2cm) {$a_2$}; \node[circle,inner sep=0pt] (a3) at (330:1.2cm) {$a_3$}; \draw[->] (0,0)--(a1); \draw[->] (0,0)--(a2); \draw[->] (0,0)--(a3); \stoptikzpicture\hss} } \placefigure [force] [BCl3 sigma bis]{x}{ \framed [frame=off,width=.9\textwidth] { \startMPcode label(textext("B"),(0,0)); for i=1 upto 3: pair p; p := (0.9cm,0) rotated (90+120(i-1)); draw (p scaled .25)--(p scaled .75); label(textext("Cl"),p); endfor \stopMPcode \hbox to 2cm{} \startMPcode for i=1 upto 3: pair p; p := (1.2cm,0) rotated (90+120(i-1)); drawarrow (0,0)--(p scaled .75) withpen pencircle scaled 1pt ;; label(textext("$a_"&decimal i&"$"),p); endfor \stopMPcode } } \stoptext ___________________________________________________________________________________ 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 ___________________________________________________________________________________