Table of contents

List your headings with the pages they are on, and update the list when they move.

With nothing selected, Properties › Table of contents › Add a table of contents. Give it a title (or leave the title empty), pick the paragraph styles to list and their level (Heading 1 and Heading 2 to start), and choose whether dots lead to the page numbers.

Put it on this page (it uses an empty text frame there, or a new frame in the margins) or on a new page before this one.

Each heading shows with the number of the page it lands on, as the page numbers in your sections show it. Level 2 and 3 are indented. Headings that don’t fit in their frames yet are left out.

When headings change or move, select the table of contents and press Update, or press Update with nothing selected to refresh every one. Settings changes what it lists. Update makes the list again, so words typed into it are replaced.

Its look comes from the Contents title and Contents 1 to 3 paragraph styles, added with it. Change them in the Styles like any other style.