# [NTG-context] Environment \starttikzpicture \stoptikzpicture like float

Hans Hagen pragma at wxs.nl
Sun May 24 17:03:00 CEST 2015

On 5/24/2015 2:36 PM, Aditya Mahajan wrote:
>
>
>> On May 24, 2015, at 5:48 AM, Mojca Miklavec <mojca.miklavec.lists at gmail.com> wrote:
>>
>>> On Sun, May 24, 2015 at 11:20 AM, Fabrice Couvreur wrote:
>>>
>>> Hi,
>>> Why the command \placerecipe{}{} does not with an environment
>>> \starttikzpicture
>>> \stoptikzpicture ?
>>
>> In my opinion this is a "bug" in TikZ that has been pointed out a
>> while ago already. The picture creates a "wrong type of the box". If I
>> remember correctly the behaviour is different in LaTeX.
>>
>> An easy workaround (that I always use) is to enclose the graphic into
>> an \hbox{}, like this:
>>
>> \hbox{\starttikzpicture
>> ...
>> % content
>> ...
>> \stoptikzpicture}
>>
>> (With \placefigure or \placerecipe or whatever used as usual before
>> the \hbox{}.)
>>
>> We might want to coordinate a patch with the TikZ team.
>
> Yes, it is a two line change in t-tikz that would not affect the latex or plain tex behavior.

it all depends how sensitive the environment is with respect to spaces
as unwanted one can creep in when in horizontal mode

Hans

-----------------------------------------------------------------