如何在通过 dita-ot 生成 pdf 期间使用来自父主题引用的导航标题而不是子主题



我正在使用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中,我有somth。 像这样:

...
Child title 111
   Child content 111
Child title 222
   Child content 222
...

但我想有这个:

...
Parent title 111
   Child content 111
Parent title 222
   Child content 222

我怎样才能实现它?

DITA 地图的引用在内容列表中是透明的,它不会向其添加额外的标题和级别。你想要的可以实现,比如:

     <topichead navtitle="Parent title 111">
      <topicref href="111.ditamap" format="ditamap">
       ...
      </topicref>
     </topichead>

问候拉杜

是的,另一种可能性是,在您的主 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>

最新更新