From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63408 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Vedran_Mileti=C4=87?= Newsgroups: gmane.comp.tex.context Subject: Re: Tikz figures not centred Date: Thu, 11 Nov 2010 12:14:21 +0100 Message-ID: References: <1288088447.2222.4.camel@silver-fox> <1289473672.2152.4.camel@silver-fox> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1229182032==" X-Trace: dough.gmane.org 1289474098 8482 80.91.229.12 (11 Nov 2010 11:14:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 11 Nov 2010 11:14:58 +0000 (UTC) To: michael.murphy@uni-ulm.de, mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 11 12:14:54 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 1PGV7D-0008U1-9v for gctc-ntg-context-518@m.gmane.org; Thu, 11 Nov 2010 12:14:51 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0D9FCCA85D; Thu, 11 Nov 2010 12:14:50 +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 AlfLO85xRWik; Thu, 11 Nov 2010 12:14:46 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BD0A8CA84F; Thu, 11 Nov 2010 12:14:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8C655CA84F for ; Thu, 11 Nov 2010 12:14:45 +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 lTvrLq-rw5OC for ; Thu, 11 Nov 2010 12:14:43 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 08CB1CA7D4 for ; Thu, 11 Nov 2010 12:14:43 +0100 (CET) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oABBEgWF008298 for ; Thu, 11 Nov 2010 12:14:42 +0100 Original-Received: by wwb39 with SMTP id 39so92434wwb.2 for ; Thu, 11 Nov 2010 03:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=kcqnHWOO7dOuJgFIg1sOTMZ0h/ZdETy3m3WpsDsEkeo=; b=gbYaz6JXR0RUF7ZmHUajs4UQFbFzTEfUuxE0nmg+seTu/xeZFyYhXnece88/uQfVPY CxONw0oHZurLbAvoqHAkXRMPUO/44xdZZZHmS3knwvR8suAS/IaJQEJrhKNPVM5rvCmz nBxUVHh8OHCRrC1lgmY+CM+oEX5nXmI3No8mI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=WPfYvQfU8MysIBZY7n1M0cHoELFlERg8ZUvgU8i+vsvF8u75XuUTrP2cMG24qRqm66 +usoT3xPU2kyoFOfG0+f9gQUHa7qLOcEfC2iS2+nch0CLLzLPVlJgP8uW3mo/TqLhNEL pfhLg2AiVmL/+zRAtQDqcqvQW5CtMjevEU8c8= Original-Received: by 10.227.154.143 with SMTP id o15mr676510wbw.8.1289474081811; Thu, 11 Nov 2010 03:14:41 -0800 (PST) Original-Received: by 10.227.136.200 with HTTP; Thu, 11 Nov 2010 03:14:21 -0800 (PST) In-Reply-To: <1289473672.2152.4.camel@silver-fox> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; 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: 0eDtLeGML - 3576b8c15911 - 20101111 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:63408 Archived-At: --===============1229182032== Content-Type: multipart/alternative; boundary=001636832f089803cd0494c514a5 --001636832f089803cd0494c514a5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2010/11/11 Michael Murphy > Hi, > > I've been having some problems with tikz figures. When I define a new > tikz figure, I normally put it in a buffer: > > \startbuffer[mypic] > \starttikzfigure > ... > \stoptikzfigure > \stopbuffer > > which I use later when I place the figure > > \placefigure{My picture}{\getbuffer[mypic]} > > The problem is that the figure is not centred: it is always aligned with > the left side of the document. I guess this has something to do with > Context not being able to get the image bounds, since it works fine for > tikz images that are already precompiled into PDFs: > > \placefigure{My picture}{\externalimage[mypic.pdf]} > > Minimal example is attached. > > Michael. > > You have to wrap up the picture inside of a \hbox, e.g. \hbox{\starttikzfigure ... \stoptikzfigure} Regards, --=20 Vedran Mileti=C4=87 --001636832f089803cd0494c514a5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2010/11/11 Michael Murphy <= michael.murphy@uni-ulm.de&= gt;
Hi,

I've been having some problems with tikz figures. When I define a new tikz figure, I normally put it in a buffer:

\startbuffer[mypic]
=C2=A0 =C2=A0 =C2=A0 =C2=A0\starttikzfigure
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0...
=C2=A0 =C2=A0 =C2=A0 =C2=A0\stoptikzfigure
\stopbuffer

which I use later when I place the figure

\placefigure{My picture}{\getbuffer[mypic]}

The problem is that the figure is not centred: it is always aligned with the left side of the document. I guess this has something to do with
Context not being able to get the image bounds, since it works fine for
tikz images that are already precompiled into PDFs:

\placefigure{My picture}{\externalimage[mypic.pdf]}

Minimal example is attached.

Michael.


You= have to wrap up the picture inside of a \hbox, e.g.

\hbox{\starttik= zfigure
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ...
=C2=A0=C2=A0=C2=A0 \= stoptikzfigure}

Regards,

--
Vedran Mileti=C4=87
--001636832f089803cd0494c514a5-- --===============1229182032== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1229182032==--