Hi, for subsections I use \setuphead[subsection] [after=\vskip-1.6mm, before={\testpage[5]\vskip1.6mm}] The reason is perfect distances between text-subsection-text with activated gridding. If the subsection is not set by \testpage on the next page, then everything workes fine! But if, then I want to not use the \vskips in "after" and "before". I want (in pseudo-pseudocode) something like this: if(less then 5 lines, thas is, testpage sets the subsection on the next page) then: \setuphead[subsection] [after=, before=] I hope I could make clear, what I intend to achieve. For testing: +++++++++++++++++++++++++++++++++++++ \setuplayout[grid=yes] \showgrid \setuphead[subsection] [after=\vskip-1.6mm, before={\testpage[5]\vskip1.6mm}]] \starttext \dorecurse{13}{Linefill\\} \input tufte \subsection{Hallo} \input tufte \subsection{Hallo} \input tufte \input tufte \stoptext +++++++++++++++++++++++++++++++++++++ You see on the second page the problem: gridding is lost. Huseyin