Guide to create an index or Contents Table

Is there a simple step-by-step guide to creating an index or table of contents for a plain and unformatted .odt document?

‘Help’ does not help much:
**"To Insert a Table of Contents

  1. Click in your document where you want to create the table of contents.
  2. Choose Insert - Indexes and Tables - Indexes and Tables, and then click the Index/Table tab.
  3. Select “Table of Contents” in the Type box."**

To this stage it works fine then it says:

"4. Select any options that you want."
However there’s absolutely no information on what this actually means.

The Heading “Create Index/Table” offers : “for entire document” [that’s fine]. Then there’s “Evaluate up to level nn” but no explanation; but I don’t want anything evaluated so leave that alone.

The Heading “Create from” offers : “Outline”, “Additional Styles”, Index Marks". there’s absolutely no explanation of what that means but all I want is an index of what’s in my plain odt document so I [unsuccessfully] try to deselect all those & choose ‘OK’ and get a greyed-out thing called “Table of Contents” containing nothing.

“Outline” means “from outline numbering”: under Tools → Outline numbering you can set which paragraph styles (by default, Heading 1, Heading 2, etc.) uses which levels (level 1 for chapters, level 2 for sections and so on). So you just need to apply the corresponding paragraph styles to the paragraphs you use to indicate headings.

Notice that you can easily apply Heading 1 to Heading 5 paragraph styles by the keyboard shortcut Ctrl 1 to Ctrl 5 (Ctrl 0 applies “Body text”).

After that, refresh your TOC and all the headings should be taken into account.

“Additional styles” can be used to add to the TOC paragraph styles that do not have an outline level.

“Index marks” is for text manually labelled by the user.

As you can see the TOC content is tightly related to a correct use of styles so you cannot have a TOC on an unformatted document, you need to use styles.