From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/7160 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Conditional text Date: Thu, 07 Mar 2002 23:54:20 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020307235203.04208490@server-1> References: <44844809.20020307194904@bigfoot.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035397643 16971 80.91.224.250 (23 Oct 2002 18:27:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:27:23 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Giuseppe Bilotta In-Reply-To: <44844809.20020307194904@bigfoot.com> Xref: main.gmane.org gmane.comp.tex.context:7160 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:7160 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 | pragma@wxs.nl 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 -------------------------------------------------------------------------