Next in thread → Next in month →

Re: [docbook-apps] Lines for simplesect in pdf

From
Bob Stayton <>
Date
2007-09-17T18:22:59+00:00
ID
070001c7f957$b02f4f70$6400a8c0@totoro
Thread
Re: [docbook-apps] Lines for simplesect in pdf
Something like the following should 
work:

 

<xsl:attribute-set 
name="section.title.properties">
  <xsl:attribute 
name="border-top">
    
<xsl:choose>
      <xsl:when 
test="parent::simplesect">1pt solid 
black</xsl:when>
      
<xsl:otherwise>0pt none black</xsl:otherwise>
    
</xsl:choose>
  </xsl:attribute>
  <xsl:attribute 
name="padding-top">
    
<xsl:choose>
      <xsl:when 
test="parent::simplesect">3pt</xsl:when>
      
<xsl:otherwise>0pt</xsl:otherwise>
    
</xsl:choose>
  
</xsl:attribute>
</xsl:attribute-set>

 

The simplesect titles are handled with the same 
templates as for sections.  The "section.title.properties" attribute-set is 
applied to all section levels.  In this case, two properties are added 
using xsl:choose with the condition testing for the parent of the title 
element.  The padding is added to provide a little breathing space for the 
title.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

  
----- Original Message ----- 

  
From: 
  Johnson, 
  Eric 

  
To:  
  

  
Sent: Monday, September 17, 2007 10:10 
  AM

  
Subject: [docbook-apps] Lines for 
  simplesect in pdf

  

  
Is there are quick 
  way to add a line (in PDF) before each simplesect?

  
 

  
TIA

  
Eric 
  J.
Next in thread → Next in month →