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


    ----- Original Message -----
    From: Nelson, Dean
    To: docbook-apps@lists.oasis-open.org
    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