Skip to content

Document Outline

A document's outline is a series of "collections", each composed of elements from the document's content.

For example, you may wish to create a "figures" collection which contains a list of all figures used throughout the document.

Using a document outline allows you to:

  1. Reference specific elements within the document
  2. Display the document's overall structure, for example in a contents page

Creating an outline entry

Any block element can be added to the document's outline through three optional attributes:

  1. outline specifies the collection within the overall outline that the element should be added to
  2. id assigns a globally unique id to the given block element. This can be used in other parts of the document to retrieve data about this element
  3. level specifies the "level" of the outline entry. Must be a whole number greater than 0

For example,

xml
<frame outline="figures" id="my-figure">
    <img src="..." />
    <p>
        This is my figure!
    </p>
</frame>

creates a new outline entry in the "figures" collection with the id "my-figure". This entry's page number, position within the "figures" collection

Outline entry levels

Using the level attribute when creating outline entries turns the collection from a flat list into a hierarchical tree. This can be useful for creating contents pages.