From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51963 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: no line breaks between figures Date: Tue, 21 Jul 2009 21:08:15 -0400 (EDT) Message-ID: References: <6faad9f00907211140j11ce2c4xa41d1b443abcf3c7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248225022 4348 80.91.229.12 (22 Jul 2009 01:10:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Jul 2009 01:10:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 22 03:10:15 2009 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 1MTQLW-0002s5-TA for gctc-ntg-context-518@m.gmane.org; Wed, 22 Jul 2009 03:10:14 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B43501FADF; Wed, 22 Jul 2009 03:10:13 +0200 (CEST) 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 22871-07; Wed, 22 Jul 2009 03:09:05 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1F52B1FAD7; Wed, 22 Jul 2009 03:09:05 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 320401FAD7 for ; Wed, 22 Jul 2009 03:09:02 +0200 (CEST) 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 25809-05 for ; Wed, 22 Jul 2009 03:08:40 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id 577821FA4C for ; Wed, 22 Jul 2009 03:08:40 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n6M18cQR007351 for ; Wed, 22 Jul 2009 03:08:39 +0200 Original-Received: FROM [192.168.2.8] (c-71-192-164-42.hsd1.ct.comcast.net [71.192.164.42]) By tombraider.mr.itd.umich.edu ID 4A666694.DC010.4980 ; Authuser adityam; 21 Jul 2009 21:08:37 EDT Original-Newsgroups: gmane.comp.tex.pgf.user In-Reply-To: <6faad9f00907211140j11ce2c4xa41d1b443abcf3c7@mail.gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.93.161; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 264171403 - 5d884ed6caeb - 20090722 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:51963 Archived-At: CCed to ConTeXt mailing list. On Tue, 21 Jul 2009, Mojca Miklavec wrote to pgf.user list: > Hello, > > I noticed that a large number of > \begin{tikzpicture} \draw (0,0) -- (5,1); \end{tikzpicture} > breaks at line end while > \starttikzpicture \draw (0,0) -- (5,1); \stoptikzpicture > just generates an infinitely long line. > > Is there any simple way to fix the behaviour in ConTeXt? Don't know. > I also don't like the behaviour in > \placefigure{title}{\starttikzpicture ... \stoptikzpicture} > that has to be surrounded with > \hbox{\starttikzpicture ... \stoptikzpicture} > else the figure gets placed at the beginning of line instead of being centered. This is what is happening. The pgf code basically boils down to this. \starttext \newbox\pgfpic \setbox\pgfpic\hbox to 10pt\bgroup abc \egroup \placefigure {testing box placement} {\leavevmode\raise-2pt\box\pgfpic} \stoptext Now since \placefigure internally places its contents in a \vbox, this boils down to a differnce beween \hbox to \textwidth {\hss \vbox{\hbox{abc}} \hss} \hbox to \textwidth {\hss \vbox{\leavevmode\raise-2pt \hbox{abc}} \hss} So, the solution is to either patch \placefigure so that \def\setlocalfloatdimensions#1% {... \global\setbox\floatbox\hbox% was \vbox ....} or redefine \pgfsys@typesetpicturebox to \def\pgfsys@typesetpicturebox#1{% .... \hbox{\leavevmode\raise-\pgf@x\box#1}%\hbox added } The redefinition at ConTeXt will break some existing documents (i.e., the authors will have to manually add a \vbox where there was none earlier). The redefinition at tikz end will make all pgf code run slightly slower (an extra hbox for each typeset pgfpicture) If neither of these is acceptable, then we can have a simple wrapper around \start-stop tikzpicture: \def\startTIKZcode{\hbox\bgroup\starttikzpicture} \def\stopTIKZcode {\stoptikzpicture\egroup} which will only affect ConTeXt code. Aditya ___________________________________________________________________________________ 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 ___________________________________________________________________________________