Does your book need a table of contents (ToC)? Novels don’t usually have them, but non-fiction books and collections of short stories or poetry usually do. Writer (like other word processors) provides a convenient way to compile an automated table of contents from the headings in your book.
Before you start, make sure that the headings are styled consistently. For example, you can use the Heading 1 style for chapter titles and the Heading 2 and Heading 3 styles for chapter subheadings. (You can use any styles you wish, including custom styles, for the different levels in the table of contents as well. This document uses the default styles for simplicity).
This chapter shows you how to:
- Create a table of contents quickly, using the defaults.
- Define a hierarchy of headings.
- Customize a table of contents.
Creating a table of contents quickly
Although a table of contents (ToC) can be customized extensively in Writer, the settings provided by Writer are usually fine, at least until you get to the final stages of book design and layout.
Creating a quick table of contents is simple:
- When you create your book, use the following paragraph styles for different heading levels (such as chapter and section headings): Heading 1, Heading 2, and Heading 3. These are what will appear in the table of contents. Your headings could look like the figure below if you used the default styles.
- Place the cursor where you want the table of contents to be inserted.
- Select Insert > Indexes and Tables > Indexes and Tables.
- Change nothing in the Insert Index/Table dialog. Click OK. The result will look like the figure below.
Tip 1: If you cannot place your cursor in the table of contents, choose Tools > Options > OpenOffice.org Writer > Formatting Aids, and then select Enable in the Cursor in protected areas section.
Tip 2: If some of your headings don’t show up in the generated ToC, check that the headings have been tagged correctly. If a whole level of headings doesn’t show up, see Defining a hierarchy of headings to fix this problem.
Tip 3: You can customize an existing table of contents at any time. Right-click anywhere in it and select Edit Index/Table from the pop-up menu. Continue as described in Customizing a table of contents.
Tip 4: The ToC appears with a grey background. This background is not printed or appear in a PDF. To turn off this grey background, go to Tools > Options > OpenOffice.org > Appearance, scroll down to the Text Document section and unmark the checkbox for Index and table shadings. This change may leave a grey background showing behind the dots between the headings and the page numbers; this indicates that the dots are part of a Tab. To turn that shading off, go to Tools > Options > OpenOffice.org Writer > Formatting Aids and unmark the checkbox for Tabs.
This book is licensed under the terms of the Creative Commons Attribution License, version 3.0.