From: Michael Murphy <michael.murphy@uni-ulm.de>
To: Context Mailing List <ntg-context@ntg.nl>
Subject: Tikz figures not centred
Date: Thu, 11 Nov 2010 12:07:52 +0100 [thread overview]
Message-ID: <1289473672.2152.4.camel@silver-fox> (raw)
In-Reply-To: <1288088447.2222.4.camel@silver-fox>
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
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.
--
Michael Murphy <michael.murphy@uni-ulm.de>
University of Ulm
[-- Attachment #2: min_tikz_nocenter.tex --]
[-- Type: text/x-tex, Size: 390 bytes --]
\usemodule[tikz]
\starttext
\startbuffer[tikz-picture]
\starttikzpicture
\fill[red] (0,0) circle (2);
\stoptikzpicture
\stopbuffer
\placefigure{A tikz figure}{\getbuffer[tikz-picture]}
\placefigure{Another tikz figure}{
\starttikzpicture
\fill[red] (0,0) circle (2);
\stoptikzpicture
}
\placefigure{An external tikz figure}{
\externalfigure[tikzfig.pdf]
}
\stoptext
[-- Attachment #3: tikzfig.pdf --]
[-- Type: application/pdf, Size: 3107 bytes --]
[-- Attachment #4: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-11-11 11:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 10:20 ConText, TikZ and definecolor: undefined control sequence Michael Murphy
2010-10-27 12:49 ` Cedric Mauclair
2010-10-27 17:18 ` Marius
2010-10-27 20:08 ` Michael Murphy
2010-10-28 7:54 ` Cedric Mauclair
2010-10-28 8:24 ` Cedric Mauclair
2010-10-28 11:47 ` Hans Hagen
2010-10-28 11:46 ` Hans Hagen
2010-10-28 12:14 ` Cedric Mauclair
2010-10-28 9:44 ` Marius
2010-11-11 11:07 ` Michael Murphy [this message]
2010-11-11 11:14 ` Tikz figures not centred Vedran Miletić
2010-11-11 16:18 ` Michael Murphy
2010-11-11 19:34 ` Aditya Mahajan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289473672.2152.4.camel@silver-fox \
--to=michael.murphy@uni-ulm.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).