如何使用DITA-OT 3.0.4覆盖html5转换中的默认css?

如何使用DITA-OT 3.0.4覆盖html5转换中的默认css?,html,css,dita,dita-ot,Html,Css,Dita,Dita Ot,我正在使用DITA-OT 3.0.4 我正在尝试使用以下命令将我的标记文件转换为html5 dita --input="note.ditamap" --output="out" --format=html5 --args.css=style.css --args.cssroot=metadata --args.copycss=yes --args.csspath=css 我有这些目录结构 ├── note.ditamap ├── metadata │   ├── note.properties

我正在使用DITA-OT 3.0.4

我正在尝试使用以下命令将我的标记文件转换为html5

dita --input="note.ditamap" --output="out" --format=html5 --args.css=style.css --args.cssroot=metadata --args.copycss=yes --args.csspath=css
我有这些目录结构

├── note.ditamap
├── metadata
│   ├── note.properties
│   └── style.css(this is my custom CSS)
作为上述命令的结果,转换成功,但输出html(即index.html)不包含自定义CSS

我也尝试使用这些命令和属性,但结果与以前相同

dita --input="note.ditamap" --output="out" --format=html5 --propertyfile="metadata/note.properties"
以下是
注释.properties
内容

args.csspath = css
args.copycss = YES
args.css = style.css
args.cssroot = metadata
我发现输出html引用了
${DITA\u INSTALL\u DIR}/DITA-ot-3.0.4/plugins/org.DITA.html5/css/commonltr.css
,所以我将css附加到它,我的预期输出即将到来,但我认为这并不好,因为这些更改将影响所有其他项目

我在GitHub上查看了一些文档和问题,但还没有找到解决方案。你有什么建议吗

参考资料:

您的“args.cssroot”作为相对位置“元数据”提供。 参数的文档说明如下:

   The value you enter here will be interpreted relative to the location of the input map file.
但从我在构建文件中看到的情况来看,这不是真的,相对位置似乎是相对于发布过程开始的当前文件夹(可能是“DITA-OT\bin”)。 所以,也许您可以尝试将args.cssroot作为一个绝对路径传递,看看它是否更适合您


通常在这种情况下,我不是直接传递args.cssroot,而是直接传递“args.css”作为绝对路径,这似乎也适用于我。

我在DITA OT问题列表中为此添加了一个问题:再次感谢。我明白此刻我需要通过绝对路径。好多了。另外,谢谢你添加这个问题,我真的很感激。非常感谢你。