docbook-apps

Re: [docbook-apps] Registered Trademarks

  • 1.  Re: [docbook-apps] Registered Trademarks

    Posted 10-05-2006 21:20
    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
    bobs@sagehill.net