ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Images run into each other when using side floats
@ 2019-10-30 15:41 Marco Patzer
  2019-10-30 15:55 ` Aditya Mahajan
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Patzer @ 2019-10-30 15:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

Some images run into each other when using floats. The following
example illustrates this. The second image (or frame) runs into the
side figure frame. How to prevent this?

\setupfloat [figure] [default=left]

\starttext
  \samplefile{knuth}

  \startplacefigure [title=Foo]
    \framed [width=5cm, height=5cm]{}
  \stopplacefigure

  \samplefile{ward} \blank
  \framed [width=4cm, height=4cm]{}
  \samplefile{knuth}
\stoptext

context 2019.10.29 15:00

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Images run into each other when using side floats
  2019-10-30 15:41 Images run into each other when using side floats Marco Patzer
@ 2019-10-30 15:55 ` Aditya Mahajan
  2019-10-30 15:57   ` Wolfgang Schuster
  2019-10-30 16:16   ` Marco Patzer
  0 siblings, 2 replies; 6+ messages in thread
From: Aditya Mahajan @ 2019-10-30 15:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 30 Oct 2019, Marco Patzer wrote:

> Hi!
>
> Some images run into each other when using floats. The following
> example illustrates this. The second image (or frame) runs into the
> side figure frame. How to prevent this?
>
> \setupfloat [figure] [default=left]
>
> \starttext
>  \samplefile{knuth}
>
>  \startplacefigure [title=Foo]
>    \framed [width=5cm, height=5cm]{}
>  \stopplacefigure
>
>  \samplefile{ward} \blank
Add:

\dontleavehmode
>  \framed [width=4cm, height=4cm]{}
>  \samplefile{knuth}
> \stoptext
>
> context 2019.10.29 15:00

Aditya
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Images run into each other when using side floats
  2019-10-30 15:55 ` Aditya Mahajan
@ 2019-10-30 15:57   ` Wolfgang Schuster
  2019-10-30 16:16   ` Marco Patzer
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2019-10-30 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Aditya Mahajan

Aditya Mahajan schrieb am 30.10.2019 um 16:55:
> On Wed, 30 Oct 2019, Marco Patzer wrote:
>
>> Hi!
>>
>> Some images run into each other when using floats. The following
>> example illustrates this. The second image (or frame) runs into the
>> side figure frame. How to prevent this?
>>
>> \setupfloat [figure] [default=left]
>>
>> \starttext
>>  \samplefile{knuth}
>>
>>  \startplacefigure [title=Foo]
>>    \framed [width=5cm, height=5cm]{}
>>  \stopplacefigure
>>
>>  \samplefile{ward} \blank
> Add:
>
> \dontleavehmode
You need also \par or a blank line after the frame.

\dontleavehmode\framed [width=4cm, height=4cm]{}\par

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Images run into each other when using side floats
  2019-10-30 15:55 ` Aditya Mahajan
  2019-10-30 15:57   ` Wolfgang Schuster
@ 2019-10-30 16:16   ` Marco Patzer
  2019-10-30 17:48     ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Marco Patzer @ 2019-10-30 16:16 UTC (permalink / raw)
  To: ntg-context

On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
Aditya Mahajan <adityam@umich.edu> wrote:

> On Wed, 30 Oct 2019, Marco Patzer wrote:
> 
> > Hi!
> >
> > Some images run into each other when using floats. The following
> > example illustrates this. The second image (or frame) runs into the
> > side figure frame. How to prevent this?
> >
> > \setupfloat [figure] [default=left]
> >
> > \starttext
> >  \samplefile{knuth}
> >
> >  \startplacefigure [title=Foo]
> >    \framed [width=5cm, height=5cm]{}
> >  \stopplacefigure
> >
> >  \samplefile{ward} \blank  
> Add:
> 
> \dontleavehmode

Thanks for the nudge in the right direction.

Is there a way to include the \dontleavehmode in the combinations?
The frame is actually a combination (removed while creating MWE).
The before key from \setupcombinations doesn't seem to do the right
thing here. If that's possible I can leave the sources as they are.

\setupfloat [figure] [default=left]

\starttext
  \samplefile{knuth}

  \startplacefigure [title=Foo]
    \framed [width=5cm, height=5cm]{}
  \stopplacefigure

  \samplefile{ward} \blank

  \dontleavehmode
  \startcombination [1*1]
    \startcontent \framed [width=4cm, height=4cm]{} \stopcontent
    \startcaption Foo \stopcaption
  \stopcombination

  \samplefile{knuth}
\stoptext

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Images run into each other when using side floats
  2019-10-30 16:16   ` Marco Patzer
@ 2019-10-30 17:48     ` Wolfgang Schuster
  2019-10-30 18:40       ` Marco Patzer
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2019-10-30 17:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Marco Patzer

Marco Patzer schrieb am 30.10.2019 um 17:16:
> On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> On Wed, 30 Oct 2019, Marco Patzer wrote:
>>
>>> Hi!
>>>
>>> Some images run into each other when using floats. The following
>>> example illustrates this. The second image (or frame) runs into the
>>> side figure frame. How to prevent this?
>>>
>>> \setupfloat [figure] [default=left]
>>>
>>> \starttext
>>>   \samplefile{knuth}
>>>
>>>   \startplacefigure [title=Foo]
>>>     \framed [width=5cm, height=5cm]{}
>>>   \stopplacefigure
>>>
>>>   \samplefile{ward} \blank
>> Add:
>>
>> \dontleavehmode
> Thanks for the nudge in the right direction.
>
> Is there a way to include the \dontleavehmode in the combinations?
No.

Wolfgang

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Images run into each other when using side floats
  2019-10-30 17:48     ` Wolfgang Schuster
@ 2019-10-30 18:40       ` Marco Patzer
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Patzer @ 2019-10-30 18:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 30 Oct 2019 18:48:43 +0100
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> Marco Patzer schrieb am 30.10.2019 um 17:16:
> > On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
> > Aditya Mahajan <adityam@umich.edu> wrote:
> >  
> >> On Wed, 30 Oct 2019, Marco Patzer wrote:
> >>  
> >>> Hi!
> >>>
> >>> Some images run into each other when using floats. The following
> >>> example illustrates this. The second image (or frame) runs into
> >>> the side figure frame. How to prevent this?
> >>>
> >>> \setupfloat [figure] [default=left]
> >>>
> >>> \starttext
> >>>   \samplefile{knuth}
> >>>
> >>>   \startplacefigure [title=Foo]
> >>>     \framed [width=5cm, height=5cm]{}
> >>>   \stopplacefigure
> >>>
> >>>   \samplefile{ward} \blank  
> >> Add:
> >>
> >> \dontleavehmode  
> > Thanks for the nudge in the right direction.
> >
> > Is there a way to include the \dontleavehmode in the combinations?  
> No.

Thanks for the answer and the quick help. Then I'll change the
sources.

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-30 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 15:41 Images run into each other when using side floats Marco Patzer
2019-10-30 15:55 ` Aditya Mahajan
2019-10-30 15:57   ` Wolfgang Schuster
2019-10-30 16:16   ` Marco Patzer
2019-10-30 17:48     ` Wolfgang Schuster
2019-10-30 18:40       ` Marco Patzer

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).