Table of Contents
The new option Insert > Table of Contents ... builds a table of contents automatically and inserts it at the text caret.
This operation works by finding all the headings in your document that use a Heading text style (Heading 1, Heading 2, etc.). It won’t find headings that you have formatted manually, for example by just making text bold - you must have a heading text style applied to the headings.
When you invoke this operation, the following dialog appears.
This lets you choose which headings should be included in the table. If you only want your top level headings (usually Heading 1) to appear in the table, set the level to 1. The table of contents at the top of this document, for example, was generated with headings up to level 2, so only Heading 1 and Heading 2 headings are included in it.
Show Page Numbers
Select this option if you want to include page numbers in your table. The page number style is chosen to match the style of page numbers you have in the same document, if there are any. Otherwise it uses the default number style. The table includes tab stops on each line so that the page number appears over near the right edge of the text column or area.
Indent according to outline level
With this option selected, the table of contents indents each heading according to the heading’s level, so you get nested headings. The table at the top of this document uses this option - you can see that all the Heading 2 headings are indented. Turn this option off if you want your table of contents to have a ‘flat’ structure, with no indentation.
TOC Text Styles
When your table of contents is generated, a new text style is created for each level of heading included in the table. TOC1 for Heading 1, TOC2 for Heading 2, etc. These styles make it easy for you to customise the appearance of your table.
By default each of these styles is based on the Normal text style, so the table text should look like the main text in your document. To change the style of any level within your table, just make the change you want to one of the headings in your table, then select the Update option in the text styles menu to update the TOC style for that level of heading. In the table of contents in this document, the top level headings (TOC1) were changed to use a larger font.
Updating a table of contents
As you update a document, adding and removing headings, you will soon need to update your table of contents. To do this place the text caret anywhere in the table, right-click and choose Table Of Contents > Update from the context menu. The table is updated, while preserving any changes you made to the TOC styles.
Changing properties or removing
The Table Of Contents context menu also includes a Remove option, for removing the table. It also has a Properties option, which brings up the same dialog you used to create the table. This allows you to change the properties of an existing table, for example to turn page numbers on or off.