ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
Subject: Re: placing a tikz/pgf figure
Date: Tue, 9 Jan 2007 17:51:28 -0500 (EST)	[thread overview]
Message-ID: <alpine.WNT.0.81.0701091738520.872@nqvgln> (raw)
In-Reply-To: <45A3EC67.2030502@wxs.nl>

On Tue, 9 Jan 2007, 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.

This is because (I think) that tikzpicture does not return a box.

> 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?

Replace

    {\externalfigure[tikz.tmp]}

with

    {\hbox{\input \jobname-tikz.tmp\relax}}

I have noticed this \placefigure and I do not know if it is a bug or a 
feature. \placefigure expects you to give a box as a figure. Compare 
the output of

\placefigure
   [here]
   {Left Fulushed}
   {This is a test}

and

\placefigure
   [here]
   {centered}
   {\hbox{This is a test}}


Hans, will adding a \hbox explicitly to \placefigure break anything?


On Tue, 9 Jan 2007, Hans Hagen wrote:

> willy, what do i need to install to get this example running?

You will need to install tikz from 
(http://sourceforge.net/projects/pgf/). The directory is not TDS 
complaint, so you may need to correct that before installing the tree.

And of course, ignore Till Tantau's comments about ConTeXt on page 
67-68 of the manual. He was working with stone age ConTeXt and still 
manged to get the whole thing working :-)

And whenever you decide to overhaul the input mechanism for metapost, 
tikz has some nice ideas.

Aditya

  reply	other threads:[~2007-01-09 22:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-09 16:42 M.J. Kallen
2007-01-09 18:15 ` Willi Egger
2007-01-09 19:26   ` Hans Hagen
2007-01-09 22:51     ` Aditya Mahajan [this message]
2007-01-09 23:26     ` Mojca Miklavec
2007-01-10 20:08     ` Willi Egger
2007-01-10  0:21 ` Mojca Miklavec
2007-01-10  1:08   ` 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=alpine.WNT.0.81.0701091738520.872@nqvgln \
    --to=adityam@umich.edu \
    --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).