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:

  1. 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.
  2. Headings example

    Headings example

  3. Place the cursor where you want the table of contents to be inserted.
  4. Select Insert > Indexes and Tables > Indexes and Tables.
  5. ((Insert figure.))

  6. Change nothing in the Insert Index/Table dialog. Click OK. The result will look like the figure below.
Table of contents example

Table of contents example


Tip 1: If you cannot place your cursor in the table of contents, choose Tools > Options > 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 > > 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 > 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.

Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkedin
27 comments on “Creating a table of contents
  1. Fundi says:

    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?

  2. admin says:

    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.

  3. 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

  4. Naogirl says:

    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.

  5. admin says:

    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.

  6. Naogirl says:

    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.

  7. Bart Gyssels says:

    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.

  8. ToddMtn says:

    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 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

  9. Jean says:

    ToddMtn: You’ve probably found the answer already, at least I hope so since I’m very late in replying. In, 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.

  10. Jean says:

    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.

  11. JDNewUser says:

    Using Windows XP, the E & E# buttons appear as F & F#, which I found instructions for on another blog.

    When I successfully update the 2 level T.O.C in the openoffice doc, it removes the content headings (i.e. chapter and / section headings) on each level.

    How can I get the Hyperlinked chapter (or preferrably page numbered) links WITH the content headings appearing.

    It must be something I am doing wrong, as I’ve not see or heard of this happening to anyone else?

  12. Jean says:

    First, make sure your headings are set up correctly in Tools > Outline Numbering; see
    Then, be sure the LS, E#, E, # and LE buttons appear in the correct order on the Structure line on the Entries page of the Insert Index/Table dialog; see
    If that doesn’t work, I don’t know what’s wrong.

  13. Nathan Wells says:


    Do you know how to use locale numbers for the page numbers in a TOC? I have them working for page numbers (using native numbering), but I can’t figure out how to use native numbering for the page numbers in a TOC.


  14. Jean says:

    I’m not sure what you mean by “locale numbers” — is that what calls “chapter numbers”? The first part of a page number like 4-12?

  15. Caitlin says:

    I, like Daniel Hamilton, could use some help trying to make a Table of Contents for a document that is already written. Having some trouble here trying to get that to happen, as well as changing the font to what I need.

  16. Jean says:

    Caitlin, if you did not tag the headings as headings (using a style like Heading 1, Heading 2, etc) in the document, you will have to go through it and do that now. Just click in the heading and select the style from the Styles and Formatting window to apply it. Then you can follow the instructions for compiling the ToC.

    To change the font for parts of the ToC itself, right-click on a heading in the ToC and select Edit Paragraph Style. This will open the Paragraph Style dialog for that style. The style is usually “Contents 1” or “Contents 2” or something like that. Go to the Font tab and select the font and size you want. You can also use other tabs to change the color or add a border or whatever. Click OK to save.

  17. PJ Pulkkinen says:


    I have had some serious problems with OO.o 3, Table of contents.

    In other occations it appeas ok, but sometimes location of page number is different in every header level. Like this:

    Some header……..4
    Subtitle ……6
    Some header again..7
    Some title…..8
    Some title..9
    Some title..10

    When it should be

    Some header……..4
    Subtitle ……..6
    Some header again..7
    Some title…….8
    Some title…..9
    Some title….10

    And changing toc-styles doesn’t change anything, it doesn’t follow paragraph styles even it uses them in toc. This all might be also related to fact that I save in .doc format sometimes for certain reason.

    Something like this.

  18. PJ Pulkkinen says:


    I have had some serious problems with OO.o 3, Table of contents.

    In other occations it appears ok, but sometimes location of page number (on the right on every line) is different in every header level. And changing toc-styles doesn’t change anything, it doesn’t follow paragraph styles in normal way even it uses them in toc. This all might be also related to fact that I have to save in .doc format sometimes for certain reason.

    Something like this.

  19. David says:

    I have a problem getting my table of contents to display live links to all headers etc. I have spent two days now following the instructions in the help section and this is my only problem, it’s driving me mad slowly.
    Open Office has created the table of contents perfectly, it’s when I get to the ‘entries’ ‘structure and formatting’ section I’m stumped. I just cannot get it to give me the live ‘internet’ links that go to each heading.
    Has anyone else had this headache? If you have can you please tell me what to do.. I’m desperate…

    A brilliant program by the way, it’s all so much easier than Microsoft, except the table of contents..
    Regards, David….

  20. Jean says:

    David, do the instructions on this page (under “Hyperlinking an entry”) not work for you? (Be sure to click the “All” button to apply to all heading levels in the TOC.)

    If that doesn’t work, it’s a bit difficult to diagnose what the problem might be, without seeing the document.

  21. David says:

    Thanks a million, I shall take a look tomorrow now as wife says I’m dead if I don’t turn this ‘machine’ off.
    I will post comment here to let you know how I have gone on, I feel as if I will win now, thank you so much.
    Regards, David.

  22. David says:

    Hi Jean, you are a STAR, 2, two, whole days trying to understand that part of my new book, 3 minutes following your link….
    If I could find you I would buy you a Christmas Drink, or 3.

    Do you know it’s always the same isn’t it, 1 or 2 or 3 clicks, in the right place, and the jobs done, the rest of my book I have formatted quite easily, much better than MS Word, and it is a free to use office suite, I will never use MS Word again, there’s no need to.
    Thanks again Jean, it’s people like you that make this office suite usable.

    Happy Christmas, you take care, David.
    David J Wood, website: I hope I’m allowed to put that, sorry if I’m not.

    All of you reading this comment have a Happy Christmas, from Cheshire in England.

  23. Martin says:


    I’m upto speed with creating a TOC that displays all the headers I’ve put into my document – it displays something like this:

    1 Heading 1…………………………..1
    1.1 Heading 2………………………..2
    1.1.1 Heading 3……………………..3 Heading 4…………………..4
    2 Heading 1…………………………..5
    1.1 Heading 2………………………..6
    1.1.1 Heading 3……………………..7 Heading 4…………………..8


    What I want is something like this:

    1 Heading 1…………………………..1
    1.1 Heading 2…………………………2
    1.1.1 Heading 3……………………….3 Heading 4……………………..4

    2 Heading 1…………………………..5
    1.1 Heading 2…………………………6
    1.1.1 Heading 3……………………….7 Heading 4……………………..8

    Or even Better:

    1 Heading 1…………………………..1
    1.1 Heading 2…………………………..2
    1.1.1 Heading 3…………………………..3 Heading 4…………………………..4

    2 Heading 1…………………………..5
    1.1 Heading 2…………………………..6
    1.1.1 Heading 3…………………………..7 Heading 4…………………………..8

    The thing I’d like to understand is how I can change the layout/format of my TOC when it’s using the header settings I have predefined…

    Any help appreciated.

    Best Regards

    How do I make changes to the shape of the TOC

  24. Martin says:

    Grr…all the spaces I put in to format the above were removed…

    Basically I’d like to be able to change the layout/alignment/font etc for the TOC…


  25. Jordi says:

    I have changed the page numbers in my document, so page 5 has on the foot note 1, page 6 has 2, and so on. I did so by editing the field and setting a correction of -4, but that doesn’t show in my index, since what is on page 1 (my page 1) appears in the index as page 5, the “real” page number, and I want my index to use my numbering not the real one, since I don’t want to number the cover page, the index, and so on. What can I do??

    Thanks in advance!!

  26. Frafor says:

    I have a large document (179000 words). I use heading 1 and heading 2 for my chapters and subchapters. However, OpenOffice (latest 3.4.2) fails and the program stays there, forever, using 50% of my CPU, until I stop it. Then it recovers the file but it NEVER creates the index.

    I can see the index if I double click on the lower, left large area-button of the working screen.

    I only use two levels. It does the index SOMETIMES, and doesn’t do it some other times.

    this HAS to be a bug!

  27. Rose says:

    I am finished with my novel and want to submit it to Kindle. They have instructions on how to use hyperlinks instead of page numbers to format the Table of Contents for their publishing. How do I use hyperlinks instead of page numbers in Openoffice Writer in the ToC? Any assistance would be greatly appreciated, Blessings, Rose