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. I tried replacing the "preference" option with options with better negative penalties, like "penalty:-1000", "penalty:-2000", and even "penalty:-5000", but these didn't make any difference. The option "penalty:-10000" trivially works, but it forces a page/column break at every section break marker, which is far too extreme.

Is this normal behavior? I would have thought that progressively more negative penalties would gradually encourage page/column breaks, but this doesn't seem to happen. In the following MWE, the "preference" and "penalty" options (apart from "penalty:-10000") for the second line break don't change the total page count or appearance of the final page at all (which would be expected in a document of this size):

```

\setuplayout[

grid=yes %enable baseline grid

]


\setupinterlinespace[18bp] % text line spacing


%Define macro for section break:

\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]% a column break here is neither encouraged nor discouraged

% \blank[halfline, preference]% this should encourage a column break here, but it doesn't seem to make a difference

% \blank[halfline, penalty:-1000]% still no difference

% \blank[halfline, penalty:-2000]% still no difference

% \blank[halfline, penalty:-5000]% still no difference

% \blank[halfline, penalty:-10000]% this works, but it is too extreme!

}


%Set things up for fakewords:

\usemodule[visual]

\setupsystem[random=10]


\starttext

\dorecurse{400}{\fakewords{20}{100}\SectionBreak}

\stoptext

```

As always, any help is appreciated!

Joey