ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Section head placement wrong when the after key is used
@ 2020-11-19 10:55 Marco Patzer
  2020-11-19 15:53 ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Patzer @ 2020-11-19 10:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

In the following example the 2nd section head stays on page one when
the “after” key is used. If the blackrule is commented out the
section head moves to page two as intended.

What's the reason the section head stays on the previous page when
the “after” is used and how to fix this?

\setuphead
  [section]
  [after=\blackrule]  %% works as desired when commenting this one out

\starttext
  \startsection [title=Foo]
    \samplefile{knuth}
  \stopsection

  \startsection [title=Bar]
    \framed[height=15cm]{}
    \samplefile{knuth}
  \stopsection
\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] 3+ messages in thread

* Re: Section head placement wrong when the after key is used
  2020-11-19 10:55 Section head placement wrong when the after key is used Marco Patzer
@ 2020-11-19 15:53 ` Pablo Rodriguez
  2020-11-19 16:07   ` Marco Patzer
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2020-11-19 15:53 UTC (permalink / raw)
  To: ntg-context

On 11/19/20 11:55 AM, Marco Patzer wrote:
> Hi!
> [...]
> What's the reason the section head stays on the previous page when
> the “after” is used and how to fix this?

Hi Marco,

by default (according to strc-def.mkiv), \section has "after=\blank".

In some cases, I had used "after={”\blank[samepage, medium]}" to prevent
similar issues.

In this case, a nasty trick could be "after={”\blackrule\blank[samepage,
Opt]}".

Just in case it helps,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Section head placement wrong when the after key is used
  2020-11-19 15:53 ` Pablo Rodriguez
@ 2020-11-19 16:07   ` Marco Patzer
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Patzer @ 2020-11-19 16:07 UTC (permalink / raw)
  To: ntg-context

On Thu, 19 Nov 2020 16:53:52 +0100
Pablo Rodriguez <oinos@gmx.es> wrote:

> On 11/19/20 11:55 AM, Marco Patzer wrote:
> > Hi!
> > [...]
> > What's the reason the section head stays on the previous page when
> > the “after” is used and how to fix this?  
> 
> Hi Marco,
> 
> by default (according to strc-def.mkiv), \section has "after=\blank".
> 
> In some cases, I had used "after={”\blank[samepage, medium]}" to
> prevent similar issues.

In my actual document I already use \blank[halfline]. Changing this
to \blank[halfline, samepage] fixes it.

Thank you very much.

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] 3+ messages in thread

end of thread, other threads:[~2020-11-19 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 10:55 Section head placement wrong when the after key is used Marco Patzer
2020-11-19 15:53 ` Pablo Rodriguez
2020-11-19 16:07   ` 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).