我正在使用dita-ot工具将dita转换为pdf。
我有这样的父ditamap文件:
<topicref href="111.ditamap" navtitle="Parent title 111" format="ditamap">
...
</topicref>
<topicref href="222.ditamap" navtitle="Parent title 222" format="ditamap">
...
</topicref>和2个子ditamap文件
111.ditamap:
<topicref navtitle="Child title 111" format="ditamap">
Child content 111
</topicref>222.ditamap:
<topicref navtitle="Child title 222" format="ditamap">
Child content 222
</topicref>在结果pdf中,我有一些东西。如下所示:
...
Child title 111
Child content 111
Child title 222
Child content 222
...但我想要这个:
...
Parent title 111
Child content 111
Parent title 222
Child content 222我怎样才能做到这一点?
发布于 2015-04-30 14:01:29
对DITA映射的引用在目录中是透明的,它不会向其添加额外的标题和级别。你想要的东西可以像这样实现:
<topichead navtitle="Parent title 111">
<topicref href="111.ditamap" format="ditamap">
...
</topicref>
</topichead>问候你,Radu
发布于 2015-05-29 17:04:28
是的,另一种可能是在主DITA映射中引用辅助映射,如下所示:
<topicref href="secondary.ditamap" format="ditamap">
...
</topicref>并且secondary.ditamap将只有一个第一级主题引用,如:
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>DITA Topic Map</title>
<topicref href="installation.dita">
<topicref href="linux-installation.dita"/>
..........
</topicref>
</map>https://stackoverflow.com/questions/29947828
复制相似问题