On 6 mai 2010, at 11:13, Wolfgang Schuster wrote:
Am 06.05.10 10:46, schrieb Otared Kavian:
Hi Peter,
I had noticed such strange page breaks before and since it was always in small documents (maths problem sheets), I used an elementary workaround which consists in adding a \medskip or \smallskip before every \section. Actually analogous bad page breaks happen in Plain TeX with \beginsection. Regarding the minimal example you sent, adding \setuphead[section][before=\smallskip] to the top of your document, solves the problem appearing in the first section. I don't know whether this solves all other strange page breaks or not.
You should at least keep the original space before the \section.
\setuphead[section][before={\allowbreak\blank[2*big]}]
Hi Wolfgang, Yes, indeed you are right: my point was that adding something before the section solves, sometimes such problems (I can't say why), but as you say one must, or it is wiser to, keep the original space around the \section.
The problem is indeed that ConTeXt tries to keep the header and the material before the header together and there is no real key to control this. What you can find in the core is this
% \chardef\somestructureheadbreakmethod\plusone % 0=nothing, 1=weighted, 2=strict, 3=vspacing \chardef\somestructureheadbreakmethod\plusthree
but that's not what i consider to be available for the user.
… well, at least not available for users such as me… But it is available for you :-) Best regards: OK