OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] RE: Indented leader under chapter titles


Hi Cheri,
You can add a property to the attribute-set named "component.title.properties" like this:
 
<xsl:attribute-set name="component.title.properties">
  <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
</xsl:attribute-set>
 
It will apply to all component elements, which includes chapter, appendices, indices, bibliographies, etc.  If you only want it for chapter, you can make t he value conditional:
 
<xsl:attribute-set name="component.title.properties">
  <xsl:attribute name="border-bottom">
    <xsl:choose>
      <xsl:when test="parent::chapter">0.5pt solid black</xsl:attribute>
      <xsl:otherwise>0pt none black</xsl:otherwise>
    </xsl:choose>
  </xsl:attribute>
</xsl:attribute-set>
 
The choose statement is evaluated each time the attribute-set is applied.
 
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Wednesday, July 30, 2008 9:06 AM
Subject: [docbook-apps] RE: Indented leader under chapter titles

Howdy,

Just following up on this item to see if anyone has any thoughts. Much thanks!

 

I'm using:

* Saxon 6.5.5

* Xerces 2.8.0

* Apache FOP 0.95

 

In my PDF output, I’ve got chapter titles and headings that start at the left margin, and then the body text is indented relative to that.

 

I’d like to put a horizontal line underneath the chapter title in the PDF. So, I added a leader to the template that writes the chapter title, like so:

 

<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">

<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"

            xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="28.8832pt"

            font-weight="bold">       

            <xsl:call-template name="component.title">

                        <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>

            </xsl:call-template>     

            <fo:leader leader-pattern="rule" leader-length="100%"/>

            </fo:block> 

</xsl:template>

 

 

The leader shows up, but it’s indented the same amount the body text is indented, and I want it to NOT be indented (so it matches the chapter title). The leader is being treated like the flow on the page, which is indented by the amount of $body.start.indent. Is there a way to get the leader to be considered part of the chapter title instead, and thus NOT indented? Do I have to futz with the set.flow.properties template to get it to not indent any fo:leader block it finds? Or is there a simpler way?

 

Thanks for your help on this!

cheri

 

--
Cheri Dennison / Technical Writer
AWS Platform Group
cherid@amazon.com

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]