Command only if \testpage is active
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
Am 18.04.2013 um 17:44 schrieb "H. Özoguz"
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.
I can’t reproduce the problem, the text on the second page stays on the grid. Wolfgang
participants (2)
-
"H. Özoguz"
-
Wolfgang Schuster