docbook、fo、pdf 输出中强调的文本

发布于 2024-09-05 22:33:52 字数 696 浏览 2 评论 0原文

我试图强调一些静态文本的字符以呈现到我的 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>&#x00A9;<emphasis>My</emphasis>Company</xsl:text>
</xsl:when>
...
</xsl:choose>
</fo:block>
</xsl:template>

此示例在 xsltproc 中生成错误。帮助!

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:choose>
</fo:block>
</xsl:template>

This example generates an error in xsltproc. Help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千笙结 2024-09-12 22:33:52

尝试使用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>

希望这有帮助。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文