Can you provide the simplest but complete FO file that shows the problem you are facing? It will be a lot easier to help if we have an example.

Also, please indicate the FOP version you are using.

On 5/1/12 4:16 PM, DVezina wrote:
This is my first post so I apologize if this problem is asked elsewhere. I
did a search and couldn't find an answer.

My problem is that XSL-FO doesn't treat a single line block as a widow or
orphan. The requirements of my stylesheet are to always keep two lines below
a head.

[CODE]
<fo:block xsl:use-attribute-set="topic.title" widows="2" orphans="2"
keep-with-next.within-column="always">THIS IS MY HEAD</fo:block>
<fo:block xsl:use-attribute-set="topic.para" widows="2" orphans="2">This is
a short paragraph.</fo:block>
<fo:block  xsl:use-attribute-set="topic.para" widows="2" orphans="2">This is
a short paragraph.</fo:block>
[CODE]

Of course, if the first paragraph block contains two or more lines, it would
keep those lines with the head and my requirements are satisfied.

I must keep both of these lines with the head through the style sheet
without knowing how many lines the blocks will make.

Currently I count the characters in the block and if the block is less than
a pre-determined number than add the attribute
keep-with-next.within-column="1". This is a serious kluge and about 90%
effective.

Any other ideas?

Thanks,
DVezina





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to