Edit online

Table of Contents on a Page (Mini TOC)

To add a mini table of contents for each chapter, you need to:

  • Use DITA bookmaps instead of regular maps.
  • Set the args.chapter.layout transformation parameter to either of the following values: MINITOC or MINITOC-BOTTOM-LINKS.
Note:
If the chapter does not have child topics, it will not have a mini TOC in the PDF output.

Layout for MINITOC

This table of contents is positioned between the chapter title and the chapter child topics. It consists of a list of links pointing to the child topics, positioned in the left side of the page, and a description in the right side. This content is collected from the topic file referenced by the chapter <topicref> in the map.

Layout for MINITOC-BOTTOM-LINKS

This table of contents is positioned between the chapter title and the chapter child topics. It consists of a chapter description and list of links pointing to the child topics, under the description. This description is collected from the topic file referenced by the chapter <topicref> in the map.

The above chapter example has the following DITA map fragment:

  <chapter href="topics/chapter-introduction.dita">
    <topicref href="topics/introduction-about.dita" />
    <topicref href="topics/introduction-description.dita" />
  </chapter>

The chapter-introduction.dita file provides the description content that is in the right side of the page. The children <topicref> elements generate the mini TOC links.