Creating a Table of Contents in DITA

In DITA, the order and hierarchy of a document's table of contents is based directly on the DITA map that defines the document. In many media, the creation of a table of contents, based on the map, is automatic. For example, you do not have to do anything special to create a table of contents in WebHelp output.

In other media, you need to tell DITA where the table of contents should occur. For example, in a book you need to tell DITA where to place the table of contents in the structure of the book, and whether to generate other common content lists, such as a list of figures or tables. You do this by using a bookmap to define your book, and adding the appropriate elements to the frontmatter.

To configure a table of contents and other book lists:

  1. Open your bookmap in the DITA Maps Manager.
  2. Right-click on the book map icon and select Append child > Frontmatter.... The Insert Reference dialog box appears.
  3. Click Insert and Close to insert the frontmatter element.
  4. Right click on the frontmatter element and create a booklists element using Append child > Book Lists....
  5. Use the same steps to create a toc element and to add any additional booklists elements you want, such as tablelist.