ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Till Tantau <tantau@tcs.uni-luebeck.de>
Subject: Re: Problem with text floating around tikz picture
Date: Mon, 29 Sep 2008 22:29:35 +0200	[thread overview]
Message-ID: <48E13AAF.3030007@wxs.nl> (raw)
In-Reply-To: <6faad9f00809290619t3dc395adj1e009cd59f25594e@mail.gmail.com>

Mojca Miklavec wrote:
> Hello,
> 
> I'm forwarding the author's answer back to the mailing list. If anyone
> has some nice idea about possible solutions, let us/him know ...
> I don't remember how I was solving such problems so far, but I know
> that I have always been missing:
> 
> % maybe even some external file with extremely long code
> \starttikzpicture{picture name}
> ....
> \stoptikzpicture
> 
> \placefigure{some figure}{\usetikzpicture{picture name}}
> 
> If that was implemented, maybe \usetikzpicture could be inside an hbox?
> 
> Mojca
> 
> On Mon, Sep 29, 2008 at 3:12 PM, Till Tantau wrote:
>> Hi!
>>
>> the problem is caused by the fact that a tikz/pgf picture is a \hbox, but
>> with \leavevmode before it. This turned out to be necessary to ensure that
>> tikzpictures behave the same way for all backend drivers.
>>
>> Certainly the added \hbox is a correct solution to this problem since it
>> gets tex back into the right "mode"...
>>
>> I don't really know how to change this in an elegant manner since existing
>> code will now assume that tikzpictures are always set in horizontal mode, so
>> any change could have desastrous consequences for existing documents.

maybe you can use (in the context variant)

   \ifinsidefloat

(true when inside a floating body, so just then put an hbox around it)

(sometimes putting \dontleavehmode in front also helps)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


      reply	other threads:[~2008-09-29 20:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22 18:03 Marcin Borkowski
2008-09-22 18:38 ` Hans Hagen
2008-09-28 14:19 ` Has anybody used asymptote without LaTeX? Alan BRASLAU
2008-09-29  5:17   ` Zhichu Chen
2008-09-29  5:57     ` Yue Wang
2008-09-29 12:09       ` Zhichu Chen
2008-09-29 17:19       ` Michail Vidiassov
2008-10-08 16:49         ` Zhichu Chen
2008-10-10  2:48           ` Zhichu Chen
2008-10-11  5:25             ` Michail Vidiassov
2008-10-11 12:02               ` Zhichu Chen
     [not found] ` <6faad9f00809221113s4d7e0400t59d0d2dc21515091@mail.gmail.com>
     [not found]   ` <D4C70B23-AD3C-4464-BF88-61F25EFCBF53@tcs.uni-luebeck.de>
2008-09-29 13:19     ` Problem with text floating around tikz picture Mojca Miklavec
2008-09-29 20:29       ` Hans Hagen [this message]

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=48E13AAF.3030007@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    --cc=tantau@tcs.uni-luebeck.de \
    /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).