[xep-support] widows, orphans, keep-with-next

From: Christian Kirchhoff <christian.kirchhoff@editura.de>
Date: Tue Oct 05 2010 - 05:04:29 PDT

  Hello,

we are generating books containing different kinds of texts out of
xsl-fo which itself is the result of some xsl transformations.

Some of the texts are poems. A specific aspect of poems is that the
lines are rather short and there have to be line breaks at specific
points. Yet verses should be kept together, at least there shouldn't be
widows or orphans. Another aspect is that the title of a poem should not
be separated from the 1st verse by a page break.

A fist mark-up approach looked like this:
<fo:block text-align="center" keep-together="always"
keep-with-next="always" space-before="2 * 13pt" hyphenate="false"
line-height="13.0pt" space-after="13.0pt">Title of the poem</fo:block>
<fo:block widows="2" orphans="2" hyphenate="false">
     1st line of the poem
<fo:block />
     2nd line of the poem
<fo:block />
     3rd line of the poem
<fo:block />
     4th line of the poem
<fo:block />
</fo:block>
<fo:block space-after="13pt"/>

But both the keep-with-next="always" and the widows and orphans rules
were ignored when rendering a pdf. I thought that maybe the sub-blocks
which I inserted in order to get a line break after each line of a verse
where somehow triggering this behaviour.

So I changed the markup to the following:
<fo:block text-align="center" keep-together="always"
keep-with-next="always" space-before="2 * 13pt" hyphenate="false"
line-height="13.0pt" space-after="13.0pt">Title of the poem</fo:block>
<fo:block widows="2" orphans="2" hyphenate="false"
linefeed-treatment="preserve">
     1st line of the poem
     2nd line of the poem
     3rd line of the poem
     4th line of the poem
</fo:block>
<fo:block space-after="13pt"/>

This is only exemplary code, in fact shorter verses have
keep-together="always", only longer verses are allowed to be separated
and therefore have widows and orphans set to 2.

But the result is the same. It seems that if the text inside a block is
not floating (each line filled until the end of the line) but there are
line breaks inside, the whole orphans, widows, keep-with-next is out of
order. Is that true?

Is there a way to tag the poems so the result would be as desired?

Best regards

Christian Kirchhoff
*Editura GmbH & Co. KG*
Tempelhofer Damm 2 · 12101 Berlin
www.editura.de
AG Berlin-Charlottenburg · HRA 43189 B · USt.Id. DE217180548
Geschäftsführer: Ralf Szymanski

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Tue Oct 5 05:45:29 2010

This archive was generated by hypermail 2.1.8 : Tue Oct 05 2010 - 05:45:37 PDT