W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2010

tagging for poems (widows, orphans, keep-together)

From: Christian Kirchhoff <christian.kirchhoff@editura.de>
Date: Mon, 27 Sep 2010 05:25:08 -0700 (PDT)
Message-ID: <29815745.post@talk.nabble.com>
To: www-xsl-fo@w3.org

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/>

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 
View this message in context: http://old.nabble.com/tagging-for-poems-%28widows%2C-orphans%2C-keep-together%29-tp29815745p29815745.html
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Monday, 27 September 2010 13:39:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:13 UTC