Re: How to do Conditional Formatting?

Pierre <[email protected]>
Newsgroups gmane.comp.type-setting.lout
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.