Next in thread → Next in month →

Re: [docbook-apps] Registered Trademarks

From
"Cob Rtayton"
Date
2006-10-05T21:19:36+00:00
ID
012d01c6e8c3$f51998c0$7d711bac@totoro
Thread
Re: [docbook-apps] Registered Trademarks
You would need to do a customization of the 
match="trademark" template from fo/inline.xsl that sets the font size when it is 
in a title.  Something like this:

 

<xsl:template match="trademark">
  
<xsl:call-template name="inline.charseq"/>
  
<fo:inline>
    <xsl:if 
test="ancestor::title">
      <xsl:attribute 
name="font-size">8pt</xsl:attribute>
      
<xsl:attribute 
name="baseline-shift">super</xsl:attribute>
    
</xsl:if>

 

    
<xsl:choose>
      <xsl:when test="@class = 
'copyright'
                      
or @class = 'registered'">
        
<xsl:call-template 
name="dingbat">
          
<xsl:with-param name="dingbat" 
select="@class"/>
        
</xsl:call-template>
      
</xsl:when>
      <xsl:when test="@class = 
'service'">
        
<xsl:call-template 
name="inline.superscriptseq">
          
<xsl:with-param name="content" 
select="'SM'"/>
        
</xsl:call-template>
      
</xsl:when>
      
<xsl:otherwise>
        
<xsl:call-template 
name="dingbat">
          
<xsl:with-param name="dingbat" 
select="'trademark'"/>
        
</xsl:call-template>
      
</xsl:otherwise>
    </xsl:choose>
  
</fo:inline>
</xsl:template>

This adds font-size and baseline-shift properties 
to the symbol if it appears inside a title element.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting


 

 

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

  
From: 
  Nelson, Dean 

  
To:  
  

  
Sent: Wednesday, October 04, 2006 2:38 
  PM

  
Subject: [docbook-apps] Registered 
  Trademarks

  

  

  
Hello,

  
 

  
I need to have registered 
  trademarks in inline text. However, the way they are implemented now, they are 
  as large as the current letters inline. The trademark needs to be smaller. How 
  do I do this in the stylesheets?

  
 

  
It looks like this 

  
EEC®

  
and I need it to look like 
  this

  
 

  
EEC®

  
 

  
(For those viewing with just ascii 
  text – I need the circle R to show up at half the size of the rest of the 
  trademark.)

  
 

  
Thanks,

  
 

  
Dean Nelson
Next in thread → Next in month →