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