Hi,
looking for a reliable soluion to the problem of keeping section heads
with following paragraphs I found the email below from Hans 2003.
But using it gives an error (see below):
\starttext
\definehead[myhead][section]
\setuphead[myhead][after={\blank[big]\blank[inhibit]}]
\input tufte \par
\input knuth \par
\input tufte \par
\input knuth \par
\myhead{Sektion}
\index{Index}
\subsection{Subsektion}
\input knuth \par
\stoptext
Is "inhibit" broken?
Steffen (still on mkii)
------------------------------
! Missing number, treated as zero.
<to be read again>
i
<argument> i
nhibit
\redoblank ...\else \global \advance \blankskip #1
\relax \fi \fi \fi
\dodorepeatwithcommand ...repeatwithcommand [#1]#5
\else
\dododorepeatwithcom...
\next1 ...lse \dorepeatwithcommand [#1]\redoblank
\fi \fi \fi
\rawprocesscommaitem ...commalevel \endcsname {#1}
\expandafter
\rawprocessco...
...
l.17 \myhead{Sektion}
?
------------------------------
------------------------------
Am 10.04.2003 um 18:17 schrieb Hans Hagen:
"NTG-context] keep section head with following paragraphs"
> At 15:17 09/04/2003 -0700, you wrote:
>
>> my question:
>> how do i make sure that section heads will not be alone at the
>> bottom of
>> the page, with the following paragraphs at the start of the next
>> page? i
>> want the section head to stay with the first paragraph (or at least
>> the
>> first two lines) of the paragraph immediately following the section
>> head.
>
> (1) use the sectioning commands, so
>
> \definehead[myhead][subsubsection]
> \setuphead[myhead][style=bold]
>
> instead of
>
> \def\myhead#1{{\bf#1}}
>
> since the sectioning commands will keep successive heads together as
> well
> discourage a pagebreak after a head; only lower level heads are kept
> together, while sam elevel heads may break (makes sense)
>
> (2) this game is spoiled when the head is followed by a command like
> \blank; a way out can be:
>
> \setuphead[myhead][after={\blank[big]\blank[inhibit]}]
>
> another option is:
>
> \setuphead[myhead][before={\testpage[4]}]
>
> which will break if there are less than 4 lines left
>
> Hans
>
>
>
> -------------------------------------------------------------------------
> Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
> Ridderstraat 27 | 8061 GH Hasselt | The
> Netherlands
> tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
> -------------------------------------------------------------------------
> information: http://www.pragma-ade.com/roadmap.pdf
> documentation: http://www.pragma-ade.com/showcase.pdf
> -------------------------------------------------------------------------
>
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________