]> granicus.if.org Git - docbook-dsssl/commitdiff
Previous change (adding text-align="left") caused article titles to be displayed...
authorJirka Kosek <jirka@kosek.cz>
Sat, 28 May 2005 11:54:15 +0000 (11:54 +0000)
committerJirka Kosek <jirka@kosek.cz>
Sat, 28 May 2005 11:54:15 +0000 (11:54 +0000)
Probably in the future more general fix should be done -- either creating separate article.title.properties, or refactoring FO properties settings between titlepage templates and attribute sets.

xsl/params/component.title.properties.xml

index 040f2dec4a71d49cba961dc5460b72fa5735c2df..4451882311af0ce47bbbab4d9b4972a17778d42f 100644 (file)
   <xsl:attribute name="space-before.maximum"><xsl:value-of
             select="concat($body.font.master, 'pt * 1.2')"/></xsl:attribute>
   <xsl:attribute name="hyphenate">false</xsl:attribute>
-  <xsl:attribute name="text-align">left</xsl:attribute>
+  <xsl:attribute name="text-align">
+    <xsl:choose>
+      <xsl:when test="(parent::article | parent::articleinfo) and not(ancestor::book)">center</xsl:when>
+      <xsl:otherwise>left</xsl:otherwise>
+    </xsl:choose>
+  </xsl:attribute>
   <xsl:attribute name="start-indent"><xsl:value-of 
                  select="$title.margin.left"/></xsl:attribute>
 </xsl:attribute-set>