ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in wrapped placefigure
@ 2018-03-29 10:50 Henri Menke
  2018-03-29 11:20 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Henri Menke @ 2018-03-29 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear devs,

When a figure is wrapped in a paragraph and that paragraph is the first
in a section, ConTeXt adds spurious vertical space above the text
(eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.

Found at https://tex.stackexchange.com/questions/423817

Cheers, Henri

---

\setupwhitespace[big]

\starttext

\startsection[title=section]

  \startmode[fix]
    % Set default whitespace
    \setupwhitespace[none]
  \stopmode

  \startplacefigure
    [location={right},
      title={just a dummy figure}]
    \externalfigure[dummy][width=.5\textwidth]
  \stopplacefigure

  \input lorem

  \startmode[fix]
    % Restore whitespace
    \setupwhitespace[big]
  \stopmode

  \input lorem

\stopsection

\stoptext
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Bug in wrapped placefigure
  2018-03-29 10:50 Bug in wrapped placefigure Henri Menke
@ 2018-03-29 11:20 ` Hans Hagen
  2018-03-29 21:17   ` Henri Menke
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2018-03-29 11:20 UTC (permalink / raw)
  To: ntg-context

On 3/29/2018 12:50 PM, Henri Menke wrote:
> Dear devs,
> 
> When a figure is wrapped in a paragraph and that paragraph is the first
> in a section, ConTeXt adds spurious vertical space above the text
> (eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.
> 
> Found at https://tex.stackexchange.com/questions/423817
> 
> Cheers, Henri
> 
> ---
> 
> \setupwhitespace[big]
> 
> \starttext
> 
> \startsection[title=section]
> 
>    \startmode[fix]
>      % Set default whitespace
>      \setupwhitespace[none]
>    \stopmode
> 
>    \startplacefigure
>      [location={right},
>        title={just a dummy figure}]
>      \externalfigure[dummy][width=.5\textwidth]
>    \stopplacefigure
> 
>    \input lorem
> 
>    \startmode[fix]
>      % Restore whitespace
>      \setupwhitespace[big]
>    \stopmode
> 
>    \input lorem
> 
> \stopsection
> 
> \stoptext
can you test with

\def\page_sides_wrapup
   {% we need to do this aftergroup
    \aftergroup\par
    \aftergroup\ignoreparskip
    \aftergroup\ignorespaces
    }



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Bug in wrapped placefigure
  2018-03-29 11:20 ` Hans Hagen
@ 2018-03-29 21:17   ` Henri Menke
  2018-03-29 21:52     ` luigi scarso
  2018-03-29 22:38     ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Henri Menke @ 2018-03-29 21:17 UTC (permalink / raw)
  To: ntg-context

On Thu, 2018-03-29 at 13:20 +0200, Hans Hagen wrote:
> On 3/29/2018 12:50 PM, Henri Menke wrote:
> > 
> > Dear devs,
> > 
> > When a figure is wrapped in a paragraph and that paragraph is the first
> > in a section, ConTeXt adds spurious vertical space above the text
> > (eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.
> > 
> > Found at https://tex.stackexchange.com/questions/423817
> > 
> > Cheers, Henri
> > 
> > ---
> > 
> > \setupwhitespace[big]
> > 
> > \starttext
> > 
> > \startsection[title=section]
> > 
> >    \startmode[fix]
> >      % Set default whitespace
> >      \setupwhitespace[none]
> >    \stopmode
> > 
> >    \startplacefigure
> >      [location={right},
> >        title={just a dummy figure}]
> >      \externalfigure[dummy][width=.5\textwidth]
> >    \stopplacefigure
> > 
> >    \input lorem
> > 
> >    \startmode[fix]
> >      % Restore whitespace
> >      \setupwhitespace[big]
> >    \stopmode
> > 
> >    \input lorem
> > 
> > \stopsection
> > 
> > \stoptext
> can you test with
> 
> \def\page_sides_wrapup
>    {% we need to do this aftergroup
>     \aftergroup\par
>     \aftergroup\ignoreparskip
>     \aftergroup\ignorespaces
>     }

Interesting.  This fixes it in beta but not in TL17.

BTW: What snapshot is going to be in TL18?

> 
> 
> 
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ______________________________________________________________________________
> _____
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Bug in wrapped placefigure
  2018-03-29 21:17   ` Henri Menke
@ 2018-03-29 21:52     ` luigi scarso
  2018-03-29 22:38     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: luigi scarso @ 2018-03-29 21:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Mar 29, 2018 at 11:17 PM, Henri Menke <henrimenke@gmail.com> wrote:
> BTW: What snapshot is going to be in TL18?

current (ie tags/1.07.0) with luatex lua 5.2.4


-- 
luigi
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Bug in wrapped placefigure
  2018-03-29 21:17   ` Henri Menke
  2018-03-29 21:52     ` luigi scarso
@ 2018-03-29 22:38     ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2018-03-29 22:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henri Menke

On 3/29/2018 11:17 PM, Henri Menke wrote:
> On Thu, 2018-03-29 at 13:20 +0200, Hans Hagen wrote:
>> On 3/29/2018 12:50 PM, Henri Menke wrote:
>>>
>>> Dear devs,
>>>
>>> When a figure is wrapped in a paragraph and that paragraph is the first
>>> in a section, ConTeXt adds spurious vertical space above the text
>>> (eyeballing it, I'd say it is \topskip).  Find MWE with workaround below.
>>>
>>> Found at https://tex.stackexchange.com/questions/423817
>>>
>>> Cheers, Henri
>>>
>>> ---
>>>
>>> \setupwhitespace[big]
>>>
>>> \starttext
>>>
>>> \startsection[title=section]
>>>
>>>     \startmode[fix]
>>>       % Set default whitespace
>>>       \setupwhitespace[none]
>>>     \stopmode
>>>
>>>     \startplacefigure
>>>       [location={right},
>>>         title={just a dummy figure}]
>>>       \externalfigure[dummy][width=.5\textwidth]
>>>     \stopplacefigure
>>>
>>>     \input lorem
>>>
>>>     \startmode[fix]
>>>       % Restore whitespace
>>>       \setupwhitespace[big]
>>>     \stopmode
>>>
>>>     \input lorem
>>>
>>> \stopsection
>>>
>>> \stoptext
>> can you test with
>>
>> \def\page_sides_wrapup
>>     {% we need to do this aftergroup
>>      \aftergroup\par
>>      \aftergroup\ignoreparskip
>>      \aftergroup\ignorespaces
>>      }
> 
> Interesting.  This fixes it in beta but not in TL17.

side floats are redone recently ... so partly incompatible code with TL17

> BTW: What snapshot is going to be in TL18?

i might push a current

>>
>>
>>
>> -----------------------------------------------------------------
>>                                             Hans Hagen | PRAGMA ADE
>>                 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>          tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ______________________________________________________________________________
>> _____
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-03-29 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 10:50 Bug in wrapped placefigure Henri Menke
2018-03-29 11:20 ` Hans Hagen
2018-03-29 21:17   ` Henri Menke
2018-03-29 21:52     ` luigi scarso
2018-03-29 22:38     ` Hans Hagen

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