Span Style

It is sometimes desirable for clauses to appear in a generated document in different styles. This is especially so in legal documents where things like punctuation and outline numbering play a significant role.
For example, consider a pair of sub-clauses in
Heading 3
style. The first is unconditional and the second is conditional.
3.1.1 Sub-Clause 1
3.1.2 [
SC2
Sub-Clause 2]
The requirement is to move the first sub-clause to
Indent 3
style (without outline numbering) whenever the second sub-clause is omitted.
One way to accomplish this would be to duplicate the clause in the source template, once for each of the alternative styles, and then to add further constraints to each instance that determine when that style is used.
For example:
[
Not SC2
Sub-Clause 1]
3.1.1 [
SC2
Sub-Clause 1]
3.1.2 [
SC2
Sub-Clause 2]
The same effect can be accomplished far more elegantly by varying the style of the first sub-clause without duplicating it:
3.1.1 [
Style ( If SC2 Then "Heading3" Else "Indent3"
) Sub-Clause 1]
3.1.2 [
SC2
Sub-Clause 2]
This can also be applied to repeating clauses:
3.1 Service Options
3.1.2 [
Style ( If NumberServiceOptions IsMoreThan 1 Then "Heading3" Else "Indent3" )[Repeat NumberServiceOptions
{ServiceOptionDetails}]]
Spans reference styles by name; for this to be possible the style must be physically present in the template. This can be achieved using the OnlyOnInput tag with the desired style.
For example, to use
Heading 3
you would do the following.
[
OnlyOnInput
This is heading 3.]
Where the text "This is heading 3" is styled as
Heading 3
.
Then we can use
Heading 3
as follows.
[
Style "Heading3"
This is heading 3.]