首页 > 解决方案 > 更改 DITA 中的 custom-attrs.xsl 文件并没有更改我的表格列标题的背景颜色。那我怎么改呢?

问题描述

我预计用 with更改trgoup.thead元素会改变表格列标题的背景颜色。custom-attrs.xslbackground-color

但表格列标题的背景并没有改变。我把文件放在fo/xsl/attrs/. 我究竟做错了什么?

标签: background-colorditadita-ot

解决方案


因此,具有 xsl:attribute 的 XSLT 自定义样式表应该可以工作:

<xsl:attribute-set name="tgroup.thead">
  <xsl:attribute name="background-color">yellow</xsl:attribute>
</xsl:attribute-set>

如果您使用 PDF 自定义文件夹来提供 XSLT,则有一个“catalog.xml.orig”目录文件需要重命名为“catalog.xml”,您应该在其中取消注释此映射:

然后在“Customization/fo/attrs”文件夹中添加一个“custom.xsl”样式表,其中包含您的自定义 XSLT 覆盖。

https://www.dita-ot.org/dev/topics/pdf-plugin-structure.html


推荐阅读