[Home] [By Thread] [By Date] [Recent Entries]
Mati Hadi wrote:
My xsl-fo is look like this: You repeat your question. Please read my previous comments, it answers your question. The space-before/after are not meant for keeping widows and orphans. By default, two lines are kept together as widow/orphan. You can override this for any block-level element with the widow/orphan properties. The value is numeric and denotes the number of lines to keep. For more info I suggest you read up on chapter 9.2 "Widows and Orphans" of Ken Holman's book. I tried your xsl-fo file, but it contained errors. After fixing them, it did not show what you seem to try to tell (i.e., nothing breaks on the page-end). To test the widow/orphan, you can try the following xsl fo stylesheet. When processed, notice that, without widow/orphan control, two lines show on the next page (this is the default), but with widows="3", you will see three lines on the second page. <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
master-name="test-page-master" page-width="2in"
page-height="1.5in">
<fo:region-body margin="0.25in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence
master-reference="test-page-master">
<fo:flow flow-name="xsl-region-body">
<fo:block widows="3">
Neque porro quisquam est
qui dolorem ipsum quia
dolor sit amet, consectetur,
adipisci velit...
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>-- Abel Braaksma
|

Cart



