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: Michael Koehmstedt, RenPet
Subject: Re: How to do Conditional Formatting?
Date: Thu, 31 May 2012 17:13:01 -0700

I do not have an example in Lout because, well, frankly, I have no real idea how to accomplish what I want :)

As an English explanation, what I'd like to do is as follows:

1) Determine whether there is room remaining on the current page to display a Table
2) If there is room, display table
3) If there is no room, display the text "See attached page"
3a) Print the table on the following page with some slight modifications

Regards,
Michael

On Thu, May 31, 2012 at 4:16 PM, Pierre <address@hidden> wrote:
Le Thursday 31 May 2012 à 13:08 -0700, Michael Koehmstedt, RenPet a
écrit :
> Hello,
>
> I'd like to know how conditional formatting could be handled in Lout.
> Here's some Psuedo C code that demonstrates what I'm after:
>
> if ( canFitOnTheCurrentPage( text ) )
>      print( text );
> else {
>      print( "See attached page" );
>      newLine( );
>      print( slightlyDifferentText );
> }
>
> I have an inkling of how I might be able to accomplish this with a
> cross-reference symbol and a two-pass run but if someone with
> experience could give me some advice I'd much appreciate it.

Knowing what you are really trying to achieve (instead of "Psuedo C
code") would help. -btw my C is probably a bit out of date but *erm
cough cough cough*.
Maybe an example in Lout and why it doesn't work for you?
Off the top of my head a lot of "place"-type options have a "try"
variant, that and a "container" should do the trick. I'm unclear on the
"slightlyDifferentText" part though.
Again, what are you really trying to do?


Regards,
Pierre





reply via email to

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