DocBook中强调文本,于PDF输出
-
26-09-2019 - |
题
我想强调的一些静态文本字符呈现到我的PDF页脚,但不能找出标签的正确组合在我的XSL。我怎样才能做到这一点?
示例:
<!-- 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:choose>
</fo:block>
</xsl:template>
这个例子生成xsltproc的错误。帮助!
解决方案
尝试使用fo:inline
。
我不知道你想要什么样的强调来实现或者什么样的你得到的错误,但尝试这样的事情:
<!-- 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>
希望这有助于。
不隶属于 StackOverflow