That works for my purposes; thank you for letting me know about it!

Joey

On Sun, Aug 15, 2021 at 1:53 AM Aditya Mahajan via ntg-context <ntg-context@ntg.nl> wrote:
On Sun, 15 Aug 2021, Joey McCollum via ntg-context wrote:

> Hi,
>
> I'm trying to implement a section break marker in a grid layout. At a
> section break, two lines of space should separate the subsequent segments
> of text (just plain paragraphs, in this case), and a symbol (in the example
> below, "X") should be set in the middle of these two lines. For my
> purposes, the section break symbol should never occur at the top of a page
> or column, and it is more desirable to have a page or column end with the
> section break symbol than to have a single orphaned line follow the symbol
> at the end of the page or column. Based on these constraints, I thought
> that using the "samepage" and "preference" options for the first and second
> line breaks would work nicely:
>
> ```
> \define\SectionBreak{%
>     \blank[halfline, samepage]% non-breaking to ensure that no column
> begins with the section break symbol
>     \startalignment[middle]%
>         {X}% section break symbol
>     \stopalignment%
>     \blank[halfline, preference]% this can (and, if possible, should) be
> broken across a column
> ```
>
> This does successfully prevent the placement of the symbol at the top of a
> page/column, but it doesn't encourage the placement of the symbol at the
> end of a page/column as often as I would like.

Depending on what you want, you can try adding \testpage[n] (where n is a number). This checks if the remainder of the page has enough space for n lines; if not, then it issues a page-break.

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
___________________________________________________________________________________