OpenOffice Tutorials

How to add a Table of Contents in OpenOffice Writer

How to create, modify, and update a Table of Contents in Writer

A table of contents, usually headed as ‘Contents’ in a document, is a list at the start of a document or book that clearly details the parts of the document and the order in which they appear. A table of contents usually contains headings detailing each chapter or part of the document and can also include subheadings too, detailing the sections within that part of the document or a description of that particular part. A table of contents is usually reserved for longer documents so that the reader can find the sections he needs easily. Documents of 10 pages or less rarely need a table of contents, but may have a shorter listing of the contents at the beginning of the document.

OpenOffice Writer makes creating a table of contents easy. Once you have initially created your table of contents you can carry on writing your document and the table of contents is clever enough to recognise the individual parts of your document and update the table of contents accordingly. This requires some special attention to formatting, but this is very simple.

This tutorial will show you how to create a table of contents in a document that already contains headings using the default ‘Heading’ styles that come with OpenOffice. Using these styles is important as that is what Writer uses to update the table of contents automatically.

Creating a Table of Contents in OpenOffice Writer

OpenOffice Writer allows you to create an automated table of contents using headings and subheadings within your document. In order for a table of contents to work properly you need to create headings that are consistent. For example, for document chapters you would use the ‘Heading 1’ style, and for subheadings you would use the ‘Heading 2’ and ‘Heading 3’ styles.

Once you have created a document and created headings as mentioned above, you are ready to add a table of contents. You can of course add your table of contents first and then write your document afterwards. The table of contents can be updated as you go and this will be explained a bit later in this tutorial. For the purposes of this tutorial we have created a simple Writer document that contains a series of headings and subheadings and we will insert a table of contents into the document.

Step 1 Prepare to insert your Table of Contents

Open your document. To create a table of contents, position your cursor where you want the table of contents to appear. Typically this will be on the first page of your document or before your first chapter or section begins. Select Insert from the main toolbar and then Indexes and Tables and then Indexes and Tables again from the list. The Insert Index/Table dialog box will appear, as shown below.

Index and table options dialog

Step 2 Review the options for your table

There are several tabs on the Index/Table options dialog, but for this exercise we are just going to create a basic table of contents. You may like to change the title of your table of contents to something else, for example ‘Contents’. To do this, enter the title in the Title field. Ensure that Table of Contents is selected under Type and click OK.

Your table of contents will now be inserted at the beginning of your main document, as shown below. It may require a little formatting and editing in order to make it look nice on the page.

Create and insert table of contents

How to modify a Table of Contents in OpenOffice Writer

When a table of contents is created it is in its most basic form so you may wish to edit the font in order to make it more attractive on the page.

You will need to select each individual part of the table of contents one by one to change the font properties. First highlight Contents or whatever title you gave your table of contents. Right-click on the table of contents and select Edit Paragraph Style. Click on the Font tab and select the font you wish to use. Click OK to accept.

Edit font using Paragraph Style

You will now need to do the same for the other parts of your table of contents, if you wish to change the font that is. You can choose other settings such as alignment, border formatting, and whether you want your table of contents to indent the subheadings.

The table of contents will appear to have a color fill, but this is simply to identify it as a table of contents object. When printed the ‘fill’ will be transparent. However, it is possible to add a color background to your table of contents if you wish and this can also be achieved using the Paragraph Style options.

How to update a Table of Contents in OpenOffice Writer

Once you have created your table of contents you can carry on adding more content to your document. As long as you use the same headings and subheadings styles that were used throughout the document your table of contents will be able to update automatically. A table of contents is great for when you need to make lots of changes to a document that might affect the page numbering or chapter layout. Without an automated table of contents you would have to manually update your contents each time you created new pages and chapters.

To automatically update your table of contents, right-click on it and select Update Index/Table. Writer will now analyze the document for changes and these will be updated in your table of contents. If pages have been added or moved the page numbering will change accordingly and if new headings have been added these will be updated. If your table of contents does not update check to see if your heading has been entered using the correct heading style as explained at the beginning of this document.

Update table of contents automatically