[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[xsl-fo] tagging for poems (widows, orphans, keep-tog

Subject: [xsl-fo] tagging for poems (widows, orphans, keep-together)
From: Christian Kirchhoff <christian.kirchhoff@xxxxxxxxxx>
Date: Fri, 24 Sep 2010 14:46:11 +0200
 [xsl-fo] tagging for poems (widows
Hello,

I am trying to find a good solution for tagging poems in xsl-fo. The xsl-fo is then to be converted into a PDF with XEP/RenderX.

Right now I am having problems avoiding widows and orphans. It seems (but I am not sure about that) that when there are empty fo:block tags (serving as line breaks) within a parent fo:block, then the widows and/or orphans settings don't apply.

A tagging of a poem might look like this:
<fo:block widows="5" orphans="5" hyphenate="false">
    Er folgte seinem Regiment<fo:block/>
    Ins Land, wo hoch die Palmen stehen,<fo:block/>
    Die Sonne hei_ herniederbrennt<fo:block/>
    Auf Bombays Tempel und Moscheen,<fo:block/>
    Wo tausend Scenen bunt und wild<fo:block/>
    Den Sinn berauschen und umfloren,<fo:block/>
    Allein der fernen Heimat Bild<fo:block/>
    Blieb seiner Seele unverloren.<fo:block/>
</fo:block>

But though widows and orphans are set to 5, my experience is that sometimes less than 5 lines are on the beginning or the end of a page.

If I set keep-together to "always" another problem comes up. Because if a verse is very long and doesn't fit entirely on the current page, the whole verse is shifted to the next page, leaving a huge amount of white space on the current page.

My questions:
1. Is it true that settings for widows and orphans are only working when there are no sub-blocks in a block?
2. What would be an appropriate tagging for poems in order to achieve my goal (avoiding widows and orphans but NOT placing verses that are too big on the next page)


Any help would be appreciated.

--
Best regards

Christian Kirchhoff
Editura GmbH & Co. KG
Tempelhofer Damm 2 7 12101 Berlin
www.editura.de
AG Berlin-Charlottenburg 7 HRA 43189 B 7 USt.Id. DE217180548
Geschdftsf|hrer: Ralf Szymanski

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.