Creating a table of contents
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.

Headings example
((Insert figure.))

Table of contents example
Tips
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.
<< Previous section | Next section >>
This book is licensed under the terms of the Creative Commons Attribution License, version 3.0.









How do you make a ToC for a Book that hsa three parts. If you use heading level 1 for the three parts the foonote numbering starst in eeach part instead of each chapter. to insert the thre part headings manually will not work as the Toc is created again and again until the book is finished and every time the Toc gets recreated it will wipr the three entries.
Any insights?
Fundi,
You could use a different style for the titles of the parts, and not make that style part of the hierarchy of styles for the table of contents (in Tools > Outline Numbering). Instead, use the Additional Styles option for the ToC to add the “part title” style to those that appear in the ToC.
If you want the formatting of the part titles in the ToC to be different from the formatting of the chapter titles (Heading 1′s), on the Index/Table page of the Index/Table dialog, in the Create From section, deselect Outline and select Additional Styles. On the Additional Styles dialog, assign the part title style to level 1, the Heading 1 style to level 2, the Heading 2 style to level 3, and so on, as shown here.
The only complication with this solution (that I know of) is that the part titles won’t become hyperlinks like the other headings. An enhancement request has been made to solve that problem.
Thanks, very much a novice new at using any automation for making ToC’s, though I have made plenty manually. But is there a fast way to make a ToC in a document that is already done, that just has default selected as the style and the formatting done manually?. The heading to the chapters I want to link to in the ToC does have a different font size however. Thanks
Hello. Can you help me decide if a book I am editing even needs a ToC? It is a non-fiction memoir about the life of a Holocaust survivor. It is just 100 pages, single-spaced. There are three sections, and each section has about five relatively small chapters. There are also a lot of words in the book the author may want to put in a glossary. Do you think we need a ToC for such a small book? Wouldn’t she need one even if for just the sake of letting the reader know there is a glossary?
Also, the author has translated some of the non-english words as she goes along, but others she just did not feel like translating, as she felt it might break up the flow of the book, or that those words were self explanatory. She is not so keen on inserting a glossary, but I think it might be a good thing. What is your impression? Thank you so much in advance.
This is really a question for an editing blog, not a blog about how to use a word processor, but since I’m also an editor I’ll give my opinion (for what it’s worth). I like to have ToCs for most non-fiction books, because they help orient the reader. And I think glossaries are good. I often read books that use terms I’m not familiar with, and I really appreciate having a glossary instead of having to look the words up online.
Ok, thanks. After looking at this site, I could tell you are quite competent, and I felt that your input would be valuable. Thanks again. Happy Holidays.
How can you create a Toc only for a section of your total document?
the titels in the last 30 pages of my tekst dont have to appear in my TOC.
Hi…I’ve hyperlinked the level one heading using the E and the E# keys but after I’ve updated the TOC, I double click on the chapters and nothing happens. I may sound like a complete idiot hwere but I don’t care…I need to get this done to send a book I’ve written to smashword.com and I can’t get into their premium listings unless I’ve hyperlinked the toc…also I’m saving it to MS Word (.doc) format – is this screwing the deal? BTW…yours is the simplest of descriptions and instructions to understand…the dox are kinda cryptic somtimes. Thanx
ToddMtn: You’ve probably found the answer already, at least I hope so since I’m very late in replying. In OpenOffice.org, the default is to Control-click to activate a hyperlink. However, as you guess, saving to .doc is probably causing the problem. I’ve just done a quick test and the TOC hyperlinks in my .odt file did not save to .doc.
Bart, sorry for not replying sooner; I’ve been away without regular internet access. One way to create a TOC for part of a document is to use a different style for the headings that you don’t want listed. Make them look the same but not be given an outline level that will show in the TOC.