Isthatpossible
Isthatpossible

Reputation: 81

Get FOP to add space-before and space-after

I have two paragraphs. How do I get FOP to add the values of the space-after attribute of the first and the space-before attribute of the second paragraph?

For example:

    <fo:block space-after="20mm">Text 1</fo:block>
    <fo:block space-before="20mm">Text 2</fo:block>

I want the space between those two blocks to be 40mm instead of 20mm. I tried .minimum, .optimum and space-after.conditionality="retain", but nothing seems to work.

Thanks for your help

Upvotes: 1

Views: 6607

Answers (1)

Jeremias M&#228;rki
Jeremias M&#228;rki

Reputation: 1757

You need to use the .precedence="force" sub-property, possibly on both space-after and space-before. Otherwise, neighboring spaces collapse to the largest space of the set (simplified rule).

The ".conditionality" sub-property is only for omitting the space as first or last space on a reference area (ex. page). It is not used to resolve neighboring spaces.

Upvotes: 2

Related Questions