2012-08-05 16 views
0

這與我之前提出的一個問題類似,只有一個變化。我想知道如何將多個話題合併成一個(使用@chunk),然後有一個可以在HTML輸出被導航到另一個子主題:如何結合DITA主題並在HTML輸出中嵌套主題?

真實的例子:http://docs.autodesk.com/3DSMAX/15/ENU/3ds-Max-Help/files/GUID-484B095B-1229-4CB9-BC53-952AC40F67C2.htm

  • 在文檔頂部,您會注意到多個主題已合併爲一個主題。這些主題包括concepttask類型。
  • 朝文檔底部看,您會看到可以導航到子主題。

儘管做了很多努力,我無法讓嵌套的主題保持獨立。它們要麼與topic1 + topic2 + topic3合併,要麼完全從TOC中消失。

鑑於有各式各類的7個個人的話題,我想編寫一個地圖,將產生以下HTML輸出:

  • TOPIC1 +標題2 + topic3
    • topic4
    • topic5
      • topic6
  • 主題7

回答

0

好的,經過大量的修補的我已經發現,下面產生所需的輸出:

<!-- chapter.ditamap --> 
<topicref href="objects/overview.dita" type="concept" chunk="to-content"> 
    <!-- topics to combine with parent --> 
    <topicref href="objects/visualising-objects.dita" type="concept"/> 

    <!-- changing-the-object-size.dita = nested topic --> 
    <topicref href="changing-the-object-size.dita" type="task" chunk="to-content"/> 
</topicref> 

或彼此稍微清潔器標記(IMO):

<!-- chapter.ditamap --> 
<topicref href="objects/overview.dita" type="concept" chunk="to-content"> 
    <!-- topics to combine with parent --> 
    <topicref href="objects/visualising-objects.dita" type="concept"/> 

    <!-- changing-the-object-size.dita = nested topic --> 
    <topicgroup> 
     <topicref href="changing-the-object-size.dita" type="task" chunk="to-content"/> 
    </topicgroup> 
</topicref> 

這會生成2個HTML文件,一個用於「Overview + Visualizing Objects」,另一個用於嵌套在「Overview + Visualizing Objects」中的「更改對象大小」。

可惜我不能合併的話題放到自己獨立的地圖:

<!-- chapter.ditamap --> 
<!-- objects.ditamap = combined topic --> 
<topicref href="objects.ditamap" type="dita"> 
    <!-- changing-the-object-size.dita = nested topic --> 
    <topicref href="changing-the-object-size.dita" type="task"/> 
</topicref> 

(任何想法傢伙?)

但是,至少我已經找到了解決方案!