On 04/17/2012 01:32 PM, Alberto Perri wrote:
>
> thanks for the info. I wanted to examine the <xyz>.fo file to understand
> what i need to do to keep a topic title together with an imagine
> following it.
>
> I found more or less by hacking that what is required is that both the
> fig template and image container along with the section# title include
> the "keep-together.within-page" attribute formally shown below.
>
> <xsl:attribute name="keep-together.within-page">always</xsl:attribute>
>

The stock fo.xsl contains attribute-set such as these ones:

---
   <xsl:attribute-set name="title" use-attribute-sets="block-style">
     <xsl:attribute name="font-family" select="$title-font-family"/>
     <xsl:attribute name="font-weight">bold</xsl:attribute>
     <xsl:attribute name="color" select="$title-color"/>
     <xsl:attribute name="text-align">left</xsl:attribute>
     <xsl:attribute name="hyphenate">false</xsl:attribute>
     <xsl:attribute 
name="keep-with-next.within-column">always</xsl:attribute>
   </xsl:attribute-set>

   <xsl:attribute-set name="topic-title" use-attribute-sets="title">
     <xsl:attribute name="font-size">160%</xsl:attribute>
     <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
     <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
     <xsl:attribute name="border-bottom-color" select="$title-color"/>
     <xsl:attribute name="padding-bottom">0.05em</xsl:attribute>
     <xsl:attribute name="space-before.optimum">1.5em</xsl:attribute>
     <xsl:attribute name="space-before.minimum">1.2em</xsl:attribute>
     <xsl:attribute name="space-before.maximum">1.8em</xsl:attribute>
   </xsl:attribute-set>
---

Notice that the base "title" attribute-set has:

---
     <xsl:attribute 
name="keep-with-next.within-column">always</xsl:attribute>
---

Normally this is sufficient to make a <title> of any kind stick with the 
element (e.g. a <p>) which immediately follows it.

May be the XSL-FO processor you are using (FOP?) does not support 
keep-with-next, but supports keep-together.

We find that keep-together is somewhat overkill. That's why we have used 
just keep-with-next. But given the  XSL-FO processor you are using, may 
be you have no  other choice. Therefore we consider what you did to be 
more a workaround for the limitation of your XSL-FO processor than a bug 
fix for ditac.


 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to