Use of formatting codes inside conditions

Is there a way to use formatting codes inside a condition?

For example, how can I make % page break before % to be subject to a condition?

Hi Tomas,

The formatting codes cannot be directly subjected to a condition (but you can always launch a feature request.

However, you can use two different internal snippets to create a similar effect. If you factor our the common parts into yet other internal snippets, then the workaround is fairly easy to implement.

Example:

1. {#contract^value > 5000: @WITH-BREAK | else: @WITHOUT-BREAK}

@WITH-BREAK = 
1. % page break before % Alpha beta

@WITHOUT-BREAK = 
1. Alpha beta

Works perfectly within the content body of the clause, but it seems not to work within the content title (e.g. so as to force the page break before the title rather than before the clause). I am guessing this is intended. Correct?

I had never anticipated such use, but it should be possible. So this qualifies as a bug. I’ll look into it — thanks for reporting!

Hi Tomas,

I have resolved the bug, and updated the server.

The code above will now also work in the content title.

Thank you! Works great. Love the snippets.