【发布时间】:2021-05-09 19:43:46
【问题描述】:
我正在尝试在 DITA-OT 中自定义 PDF2 插件。我想对出现在每章开头的字符串“Chapter”和章号应用小型大写字母。
到目前为止我做了什么
在我的自定义插件中,我修改了 static-content-attr.xsl 文件中的以下 __chapter__frontmatter__name__container 属性集以包含 <xsl:attribute name="font-variant">small-caps</xsl:attribute> :
<xsl:attribute-set name="__chapter__frontmatter__name__container">
<xsl:attribute name="font-size">14pt</xsl:attribute>
<xsl:attribute name="font-weight">none</xsl:attribute>
<xsl:attribute name="border-before-style">none</xsl:attribute>
<xsl:attribute name="border-after-style">none</xsl:attribute>
<xsl:attribute name="border-before-width">0pt</xsl:attribute>
<xsl:attribute name="border-after-width">0pt</xsl:attribute>
<xsl:attribute name="padding-top">10pt</xsl:attribute>
<xsl:attribute name="font-variant">small-caps</xsl:attribute>
</xsl:attribute-set>
实际结果
small-caps 不适用于字符串。
预期结果
如何使字体变体在 XSL FO 中工作?
XML 框架:DITA
发布引擎:DITA-OT 3.x
插件:org.dita.pdf2 , org.dita.pdf2.fop
【问题讨论】: