background-color - 更改 DITA 中的 custom-attrs.xsl 文件并没有更改我的表格列标题的背景颜色。那我怎么改呢?
问题描述
我预计用 with更改trgoup.thead
元素会改变表格列标题的背景颜色。custom-attrs.xsl
background-color
但表格列标题的背景并没有改变。我把文件放在fo/xsl/
和attrs/
. 我究竟做错了什么?
解决方案
因此,具有 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
推荐阅读
- c# - 如何在 serilog 配置设置中应用,从 appsetting.json (而不是代码)为每个会话生成新日志
- java - 我想在 Android 7.1 中删除最近的应用项目
- clickhouse - 如何在clickhouse中实现递归加入?
- tensorflow - 在没有 numpy 的情况下将图像数组从 GPU 内存加载到 keras/tensorflow
- javascript - 构造函数是否比类中的其他构造函数运行得更快?
- mongodb - 通过 mongodb $reduce 过滤列表(聚合)
- python - ValueError:Tensorflow2 错误的输出尺寸
- node.js - 如何在 webpack 中使用 ejs 模板/部分?
- python - np.save 用于 for 循环中的大数据
- c# - 我的代码是 ac# 随机生成的数学测验我需要在最后显示用户正确和错误答案的结果