On 2014-02-08 Jan Tosovsky wrote:
On 2014-02-08 Jan Tosovsky wrote:
Additionally, I'd like to keep that divider with the previous content (paragraph).
In this case AFAIK \testpage[n] cannot be used directly in the divider definition as it breaks the page at position of this command.
I'd like to express rather: If there is no space for three lines, break the page, but grab few previous lines (at least 2) together with me (according to orphan/widow settings).
The current behaviour can be demonstrated using this example:
\startsetups[grid][mypenalties] \setdefaultpenalties \setpenalties\widowpenalties{2}{10000} \setpenalties\clubpenalties {2}{10000} \stopsetups
\setuplayout[grid=yes, setups=mypenalties] \showgrid \showlayoutcomponents
\starttext \blank[force, 30*line] \input{tufte} \blank[4mm]\middlealigned{\hl[4]}\blank[6mm] \stoptext
I found that \page[no] does exactly what I wanted. If needed, it breaks the page not at the positon of a divider, but sooner, so that divider is preceded at least with 2 lines of text. \page[no]\blank[4mm]\middlealigned{\hl[4]}\blank[6mm] Jan