Hi all, I've come to understand taht using the \page[no] command should prevent a pagebreak at that particular spot whenever possible. However, this seems to be not working for me. My actual problem is with a \startframed directly after a description "header", but the problem is easily reproduced with the below example (for MkII, replace the 25cm with 20cm). The \dontleavehmod was needed to make the \blank work... \starttext \dontleavehmode \blank[25cm] A \page[no] \startframedtext H \stopframedtext \stoptext This example generates the "A" at the bottom of the first page, with the boxed H on the next page, putting a page break exactly where the page[no] is. Is it broken, or am I missing an important detail about how page[no] works? I've also tried \defineblankmethod [nobreak] {\nobreak} \blank[nobreak,line] and some variations as suggested by Wolfgang (IIRC) in some thread from 2008, but that failed with "missing number, treated as zero" for me. Gr. Matthijs
Hi Wolfgang,
However, using your \blank command directly does work. I've now put it in the before= of my typing environment and that works as well. Thanks for this! However, I'm still surprised that the \page[no] command, which is documented to supress page breaks, does not do anything, while I need to insert some magical blank as well. Should \page[no] be documented as broken? Gr. Matthijs
Am 08.12.2009 um 09:27 schrieb Matthijs Kooijman:
\page[no] did work but only when you use it in the correct way. \starttext \blank[force,20cm] A \page[no] \startframedtext H \stopframedtext \stoptext or \starttext \blank[force,20cm] A \par\page[no] \startframedtext H \stopframedtext \stoptext
As you're unwilling to show a example I can't give a concrete answer.
However, using your \blank command directly does work. I've now put it in the before= of my typing environment and that works as well. Thanks for this!
\starttext \blank[force,20cm] A \blank[samepage,line] \startframedtext H \stopframedtext \stoptext Wolfgang
Hi Wolfgang,
\page[no] did work but only when you use it in the correct way. <snip exapmles>
Aha, page[no] only works directly after a paragraph break. I haven't seen that documented anywhere. I'll put it up on the \page reference page. Is "only after a paragraph break" the right usage instructions, or is it more complicated than that?
Fortunately, you've now provided me with two working commands (\par\page[no] and \blank[samepage,line]), so I managed to make my document look pretty! If you could only answer my first question above, then I'll improve the \page documentation. Thanks! Matthijs
Am 08.12.2009 um 10:14 schrieb Matthijs Kooijman:
I think the better answer is that you have to call it in vertical mode where you go with \par or a empty line.
You wrote: My actual problem is with a \startframed directly after a description "header" ... which is for me \startdescription{...} \startframed ... \stopframed ... and what you showed is something different and putting \page[no] between \startdescription and \startframed is not what I would suggest. Wolfgang
participants (3)
-
luigi scarso
-
Matthijs Kooijman
-
Wolfgang Schuster