← Prev in month ← Prev in thread
Next in thread → Next in month →

Re: run-in section titles - activating automatic numbering

From
Bob Stayton <>
Date
2012-05-17T15:45:58+00:00
ID
0a2701cd3444$1ec8a9a0$6600a8c0@pazu
Thread
Re: run-in section titles - activating automatic numbering
Hi Michael,

You can generate the section number by applying 
templates to the sect3 element in mode="label.markup".  It just generates 
the number, so you would need to add any trailing punctuation or 
space.

 

Bob Stayton
Sagehill Enterprises


 

 

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

  
From: 
  Michael Dewar 

  
To:  

  
Cc:  
  

  
Sent: Wednesday, May 16, 2012 12:41 
  AM

  
Subject: run-in section titles - 
  activating automatic numbering

  

  

  
Could I ask what I need to do to activate section automatic numbering for 
  run-in section titles.  I'm using the sample code from the XSL 
book:

  

  

  
<xsl:template 
  name="sect3.titlepage">
  
        <fo:block 
  xsl:use-attribute-sets="normal.para.spacing">
  
            <xsl:apply-templates select="d:title" 
  mode="inline.title"/>  
  
            <xsl:if 
  test="d:para[preceding-sibling::*[1][self::d:title]]">  
  
                <xsl:text></xsl:text>  
            
      <xsl:apply-templates select="d:para[preceding-sibling::*[1][self::d:title]]"  
    
                  mode="inline.para"/>  
  
            </xsl:if>
        </fo:block>  
    </xsl:template>
    
    <xsl:template 
  match="d:sect3/d:title" mode="inline.title">  
  
        <fo:inline 
  xsl:use-attribute-sets="inline.sect3.title.properties">
  
            <xsl:apply-templates/>
        </fo:inline>

  
    </xsl:template>

  

  
    
    
  <xsl:attribute-set name="inline.sect3.title.properties"> 
  
        <xsl:attribute name="font-weight">bold</xsl:attribute>
    </xsl:attribute-set>
    
    <xsl:template match="d:sect3/d:para[preceding-sibling::*[1][self::d:title]]"  
        mode="inline.para">
        <xsl:apply-templates/>
        
    
  </xsl:template>
    
    <xsl:template match="d:sect3/para[preceding-sibling::*[1][self::d:title]]">
    </xsl:template>  

  

  
Thanks.

  

  
Michael
← Prev in month ← Prev in thread
Next in thread → Next in month →