Re: [NTG-context] Keeping titles together with the following text when grid is on
![](https://secure.gravatar.com/avatar/4a68af71fe5327c72564458ef9d00c6b.jpg?s=120&d=mm&r=g)
Hello, this is not the same question as handling orphan and widows - because you surely do not want some titles with only 2-3 lines of body text after them. I always use "\testpage[x]" to handle those issues, see your example with testpage: \setuppapersize[B5] \startsetups[grid][mypenalties] \setdefaultpenalties \setpenalties\widowpenalties{2}{10000} \setpenalties\clubpenalties {2}{10000} \stopsetups \setuphead[section] [before={\testpage[8]\blank}] %comment the following line to see the difference \setuplayout[grid=yes, setups=mypenalties] \showgrid \starttext \blank[force, 9.5cm] \input tufte \section{Tufte} \input tufte \stoptext Huseyin
![](https://secure.gravatar.com/avatar/b725c6396317bce49729e7787da89aef.jpg?s=120&d=mm&r=g)
On 2013-12-02 "H. Özoguz" wrote:
On 2013-12-01 Jan Tosovsky wrote:
when grid is on, orphan and widows have to be eliminated using
additional
penalty settings. Whereas it works fine for body text, section titles are still sometimes left at the bottom of the page.
this is not the same question as handling orphan and widows - because you surely do not want some titles with only 2-3 lines of body text after them.
I always use "\testpage[x]" to handle those issues, see your example with testpage:
\setuphead[section][before={\testpage[8]\blank}]
Thanks, it works! Another magic command not documented anywhere in the ConTeXt Guide or Wiki... I was looking for any alternative for XSL-FO's keep-with-next="always". This is a different approach, but it doesn't matter. Btw, I still don't understand why keeping the title and text behaves differently when grid is on... Jan
participants (2)
-
"H. Özoguz"
-
Jan Tosovsky