I'm having the same problem, and I'm working in DocBook XML 4.2 with the
1.50.0 XSL on Red Hat 7.2, processing with xsltproc and PassiveTeX. I asked
this same question on Friday.
If the keep-with-next.within-column in the component.title.properties
attribute-set is set to "always", why are my section titles and bodies
splitting at page breaks? Is this broken, or are we missing something?
Dennis Grace
Information Developer
IBM Linux Technology Center
(512) 838-3937 T/L 678-3937 cell: (512)-296-7830
[EMAIL PROTECTED]
What is this some kind of demonstrative pronoun?
|---------+---------------------------->
| | Steinar Bang |
| | <[EMAIL PROTECTED]> |
| | |
| | 04/22/02 08:46 AM|
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: DOCBOOK-APPS: Re: How to avoid pagebreak between <section> title
and body? |
|
|
|
|
>--------------------------------------------------------------------------------------------------------------|
>>>>> Steinar Bang <[EMAIL PROTECTED]>:
>>>>> Steinar Bang <[EMAIL PROTECTED]>:
>>>>> Steinar Bang <[EMAIL PROTECTED]>:
>>>>> Steinar Bang <[EMAIL PROTECTED]>:
>>>> Is it possible to make the <title> of a <section> in a DocBook
>>>> XML article, stay with the body, when the body is pushed over to
>>>> the next page during Fop formatting?
>>> As an experiment, i put the attribute
>>> break-before="page"
>>> in the <fo:block> holding the title text for a section, and that
>>> pushed the title over on the next page.
[snip!]
> I tried that now, by putting the following into my local XSL style
> sheet:
> <xsl:template name="section.heading">
[snip!]
> <fo:block font-size="{$fsize}pt"
> break-before="page"
[snip!]
> <xsl:copy-of select="$title"/>
> </fo:block>
> </xsl:template>
I think "keep-with-next" is closer to what I want. I replaced
break-before="page"
with
keep-with-next="always"
but that formatted the same as with the vanilla DocBook XSL template.
And when I looked at the produced FO, I saw that the <fo:block>
surrounding the <fo:block> containing the title text, it already had a
keep-with-next.within-column attribute:
<fo:block id="d0e152">
<fo:block>
<fo:block keep-together="always" margin-left="-4pc"
font-family="Helvetica">
<fo:block keep-with-next.within-column="always">
<fo:block font-size="14pt" keep-with-next="always"
font-weight="bold" font-family="Helvetica"
space-before.minimum="1em" space-before.optimum="1.5em"
space-before.maximum="2em">Configure mouse</fo:block>
</fo:block>
</fo:block>
</fo:block>
</fo:block>
So why does the title separate from the body of the section? Because
of confusion about what's the "next" to stay with?