At 07:49 PM 3/7/2002 +0100, Giuseppe Bilotta wrote:
>Hello,
>
>I'd like to separate two blocks of text with some stuff which
>depending on wether the two blocks are on the same page or not.
>
>Example one: two paragraph are separate by a \blank of space, but
>if there is a page change, then three starts are inserted on top
>of the next page.
>
>Example two: sections start without creating a new page, but if
>they stay on the same page, then a line is drawn before them.
>
>The nicest thing would be a command (to be used after a \blank)
>like \ifstillonsamepageelse{do something}{do something else}.
>
>Do I have to go through the referencing mechanism or is there
>something built-in already?
Ah, another example of italian typesetting:
\setuplayout[height=12cm]
\starttext
\xypos{b1}\input tufte\xypos{e1}
\doifpositionsonsamepageelse{e1,b2}{yes}{no}
\xypos{b2}\input tufte\xypos{e2}
\doifpositionsonsamepageelse{e2,b3}{yes}{no}
\xypos{b3}\input tufte\xypos{e3} \page
\doifpositionsonsamepageelse{e3,b4}{yes}{no}
\xypos{b4}\input tufte\xypos{e4}
\stoptext
Unfortunately i found out that there is a circular call in the macro (will
send you the patch)
[beware: such playing with spacing may influence the process and you can
end up in cycles, so, make sure to start without a tuo file, and only move
forward, not back]
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
-------------------------------------------------------------------------
fall-back web server:
www.pragma-ade.nl
-------------------------------------------------------------------------