On device--:--
Log in

How to make an automatic table of contents with page numbers

A table of contents typed by hand with dots and spaces falls apart after the first edit. An automatic one is built from the headings and knows the page numbers itself. Here is how to make it in four steps.

How an automatic table of contents works

The editor does not look for large or bold lines in the text. It takes only the paragraphs that have a heading style: Heading 1 for sections, Heading 2 for subsections, Heading 3 for points. So it all starts with styles.

Text editor: How to make an automatic table of contents with page numbers

Step 1. Give the headings their styles

Put the cursor in a section title and choose Heading 1 in the style list on the toolbar. The keys Ctrl+Alt+1, Ctrl+Alt+2 and Ctrl+Alt+3 do the same. Give subsections Heading 2.

It is easy to check yourself: every heading shows up at once in the Outline panel on the left. What is not there will not be in the contents either.

The style list on the toolbar showing Heading 1, with the document outline on the left
The style list on the toolbar and the document outline on the left.

The tool for this: Text editor

Step 2. Insert the table of contents

Put the cursor where the contents should be, usually on a page of its own after the title page. Open Insert and choose Table of contents.

The Insert menu with the Table of contents item highlighted
Insert → Table of contents.
The finished table of contents on its own page: section titles and page numbers
The contents are built: section titles, indented subsections and page numbers.

Step 3. Number the sections

If the sections need numbers, do not type them by hand. In the Format menu turn on Number the headings (1, 1.1, 1.1.1). The numbers appear in the headings and in the contents, and are recounted on their own when sections are moved.

The Format menu with the Number the headings (1, 1.1, 1.1.1) item highlighted
Format → Number the headings.
The table of contents with sections numbered 1, 2, 3, 3.1, 3.2 and page numbers
The same contents with numbered sections.

Step 4. Update the contents after edits

The contents update themselves when you change the headings. If the page numbers seem out of date after large edits, choose Insert → Update table of contents.

In a downloaded Word file and in a PDF the contents are saved with the document, so update them before you download the file.

The Insert menu with the Update table of contents item highlighted
Insert → Update table of contents.

Tip. Page numbers in the contents are shown in page view (View → Pages), which works in Chrome and Edge.

Questions and answers

Why is a section missing from the contents?

Its title has no heading style. Put the cursor in the line and choose Heading 1, Heading 2 or Heading 3.

How do I keep the title page out of the contents?

Set the title of the work on the title page as normal text in a large size, not as a heading style. Then it gets into neither the outline nor the contents.

Are there lists of figures and tables?

Yes. Add captions to the figures and tables, then choose List of figures or List of tables in the Insert menu.

Read next

TextTildekit text editor: a full reviewTextHow to move text from Word to a website without junk codeTextHow to format an essay or a course paper online