From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/32626 Path: news.gmane.org!not-for-mail From: Willi Egger Newsgroups: gmane.comp.tex.context Subject: Re: placing a tikz/pgf figure Date: Tue, 09 Jan 2007 19:15:52 +0100 Message-ID: <45A3DBD8.70803@boede.nl> References: <20070109164240.58526.qmail@web51807.mail.yahoo.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" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168366773 7187 80.91.229.12 (9 Jan 2007 18:19:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2007 18:19:33 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 09 19:19:31 2007 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 1H4LZ8-0002nB-Da for gctc-ntg-context-518@m.gmane.org; Tue, 09 Jan 2007 19:19:18 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 24D551FEC1; Tue, 9 Jan 2007 19:15:53 +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 28828-01; Tue, 9 Jan 2007 19:15:50 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 08AA81FEEA; Tue, 9 Jan 2007 19:12:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D71C21FEEA for ; Tue, 9 Jan 2007 19:12:30 +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 28321-02-7 for ; Tue, 9 Jan 2007 19:12:23 +0100 (CET) Original-Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by ronja.ntg.nl (Postfix) with ESMTP id BD47A1FE67 for ; Tue, 9 Jan 2007 19:12:23 +0100 (CET) Original-Received: from [127.0.0.1] (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) (authenticated bits=0) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id l09IFmOa089209 for ; Tue, 9 Jan 2007 19:15:48 +0100 (CET) (envelope-from w.egger@boede.nl) User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: mailing list for ConTeXt users In-Reply-To: <20070109164240.58526.qmail@web51807.mail.yahoo.com> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:32626 Archived-At: Indeed I also get the results as you describe them. When looking at the file *.tmp then you see, that the figure is generated on the fly. When external figure is issued, then the textwidth is the base and therefore the figure ends up leftaligned. -- In such cases I prefer to have the figures prepared in a separate pdf-file by means of \startTEXpage -- \stopTEXpage. Afterwards I include the TEXpages with \externalfigure referencing the page in the file obtained. -- In my experience this makes the runs faster. Kind regards Willi M.J. Kallen wrote: > Hi all, > > I'm trying to determine how to best insert a figure/graph created using the tikz/pgf module (I'm using v1.10). The attached sample file compares the result of just using \placefigure and \placefigure with \startcombination[1*1]. In the first case, the result is not centered (which should be default in ConTeXt, if I'm correct) but flushed left. Only if I place the figure inside a \startcombination by using \input, do I get the desired result. If I use \externalfigure inside the \startcombination, I again get an incorrect result. > > In theory, the first version should work but some special settings (using e.g. \useexternalfigure) may be required. I do not know why the second version does work. Does anyone have an idea? > > Thanks, > > Maarten-Jan > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > ------------------------------------------------------------------------ > > \usemodule[tikz] > \setupfloat[figure][location=middle,frame=on] > > \starttext > > \startbuffer[tikz] > \starttikzpicture > \draw[red,thick] (0,0) -- (1,1) > {[rounded corners] -- (2,0) -- (3,1)} > -- (3,0) -- (2,1); > \stoptikzpicture > \stopbuffer > > \placefigure > [here] > [fig:test1] > {The figure is flushed left, whereas it should be centered.} > {\externalfigure[tikz.tmp]} > > \placefigure > [here] > [fig:test2] > {Using \type{\startcombination[1*1]} together with \type{\input}, the result looks as expected.} > {\startcombination[1*1] > {\input test-pgf-tikz.tmp } {} > \stopcombination > } > > \placefigure > [here] > [fig:test3] > {Using \type{\startcombination[1*1]} together with \type{\externalfigure}, the result looks again as in the first figure.} > {\startcombination[1*1] > {\externalfigure[tikz.tmp]} {} > \stopcombination > } > > > \stoptext > > ------------------------------------------------------------------------ > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >