lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do Conditional Formatting?


From: Jeff Kingston
Subject: Re: How to do Conditional Formatting?
Date: Sat, 2 Jun 2012 08:15:09 +1000
User-agent: Mutt/1.4i

Certainly there is nothing packaged up and ready to go.

It's possible, using a @Case which compares the current
page number with the page number that the thing is on, and
returns "See attached page" if they differ.  That could be
packaged up so you could call

    tag.of.floating.thing @IfOnDifferentPage { See attached text }

which would be fairly convenient, or perhaps

    tag.of.floating.thing @OnThisPage
       yes { @Null }
       no { See attached text }


Convergence might be a problem, I can see it flipping back and
forth between its two results on alternating runs sometimes.

Writing and testing @OnThisPage would be a small, fun exercise.
If no-one else wants to do it, and Michael really really needs
it, then I will do it.

I haven't considered the difference between

   print( text );

and

   print( slightlyDifferentText );

You could probably do that in much the same way.

Jeff

On Fri, Jun 01, 2012 at 03:58:46PM +0200, Ludovic Court?s wrote:
> Hi,
> 
> "Michael Koehmstedt, RenPet" <address@hidden> skribis:
> 
> > if ( canFitOnTheCurrentPage( text ) )
> >      print( text );
> > else {
> >      print( "See attached page" );
> >      newLine( );
> >      print( slightlyDifferentText );
> > }
> 
> I don???t think this can be achieved in pure Lout.
> 
> There???s the @CNP symbol, which does a ???conditional page break???:
> 
>     macro @CNP        { // 3.2v @High //0io //{}              }
> 
> But it???s not as sophisticated as what you???re looking for.
> 
> Thanks,
> Ludo???.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]