Can index entries include page numbers in DITA, and how are they generated?

Index entries in DITA can include page numbers to indicate where the referenced content can be found. However, in DITA, page numbers are typically generated automatically rather than being manually specified. This automated generation of page numbers is especially useful in dynamic publishing environments where content may appear in various formats, such as print, PDF, or online help, each with its own pagination.

Automatic Page Number Generation

Automatic page number generation in DITA relies on the publishing tools or processors used to produce the final output. These tools, like DITA-OT (DITA Open Toolkit), can calculate and insert page numbers based on the structure and layout of the document during the publishing process. Page numbers are determined by factors such as the content’s position within chapters or sections and the chosen output format. As a result, content creators do not need to manually update page numbers in their DITA source files.


Here’s an example in DITA XML format illustrating the inclusion of automatic page number generation:

  <entry term="Introduction" loc="introduction.html#page=3" />
  <entry term="Installation" loc="installation.html#page=10" />
  <entry term="Configuration" loc="configuration.html#page=20" />

In this example, the index entries include “loc” attributes with page numbers, but these page numbers are typically generated automatically by the publishing process.