Emphasized text in docbook, fo, pdf out put
I am trying to emphasize a character of some static text to render into the footer of my pdf, but can't figure out the right combination of tags in my xsl. How can I accomplish this?
Example:
<!-- Footer content -->
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<xsl:choose>
...
<xsl:when test="$sequence = 'odd' and $position = 'left'">
<xsl:text>©<emphasis>My</emphasis>Company</xsl:text>
</xsl:when>
...
</xsl:choos开发者_开发知识库e>
</fo:block>
</xsl:template>
This example generates an error in xsltproc. Help!
Try using fo:inline
.
I'm not sure what kind of emphasis you're trying to achieve or what kind of error you're getting, but try something like this:
<!-- Footer content -->
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<xsl:choose>
...
<xsl:when test="$sequence = 'odd' and $position = 'left'">
<xsl:text>©</xsl:text><fo:inline text-decoration="underline">My</fo:inline><xsl:text>Company</xsl:text>
</xsl:when>
...
</xsl:choose>
</fo:block>
Hope this helps.
精彩评论