Creating a table of contents with chapter and sub-chapter numbering

I did indeed try to figure this out on my own, until my brain exploded. I just can’t get it to work.

The goal



1. A title
   1.1 A sub-chapter
   1.2 Another sub-chapter
2. Another main chapter

What did i manage to do?


1. A title
2.    A sub-chapter
3.    Another sub-chapter
4. Another main chapter

I tried everything i could possibly think of, editing the structure of the TOC entries, editing the styles, assigning indents, and so forth. The numbering just doesn’t work out and the indents also don’t.

Finally, i don’t understand how an Index Entry works. I add it, but all i get is a gray field that i cannot write anything into. I can name the chapter, and it appears in the Table of Contents, but how do i even make the application aware of what index entries represent sub-chapters and which don’t? How do i get it to automatically print the name of the chapter to where the index entry is? Because right now, i have to write them by hand, and that makes little sense – as i am sure it’s not how it’s intended to be.

Rest assured i went through the help files, i also researched online. To no avail.

Can someone please enlighten me?

Thank you!

ToC isn’t intended to be writable (although you may make it so). Its purpose is to get the outline information from your chapters’ headers.

You need to use multiple levels of headings to achieve what you need. Use Heading 2 for your sub-chapters. And use Outline Numbering feature to establish proper multi-level numbering. Only then will you have proper ToC.

EDIT: here is the example file and steps:

  1. Create new Writer document.
  2. Tools->Outline Numbering...Numbering tab->check that each level is assigned its respective Heading N paragraph style;Level 1-10Number:1,2,3,...; Show sublevels: 10.
  3. InsertTable of Contents and IndexTable of Contents, Index or Bibliography...
  4. Type tab: TypeTable of Contents; adjust Title
  5. Entries tab: Level 2->put cursor to the left of LS->click Tab Stop button->adjust Tab stop position (e.g., 15 mm) → close dialog using OK
  6. Below the inserted ToC, add paragraphs “A title”, “A sub-chapter”, “Another sub-chapter”, and “Another main chapter”, with paragraph styles Heading 1, Heading 2, Heading 2, Heading 1.
  7. Right-click on ToC, and select Update Index.

You will have 2nd level indented by 20 mm, because of Tab in 2nd level set above, and Contents 2 paragraph style having its own indent. You may adjust both, or remove one of them or both. You may remove numbering in ToC’s Entries.

I can’t understand what’s wrong with this that doesn’t fit you, or makes it so extremely difficult to accomplish.

Thank you for trying to help, i appreciate the effort – but this description didn’t get me very far. Indeed, this is the most unintuitively designed part of any piece of software i know. What i aim to achieve is the total very standard for indexed documents, and it is so extremely difficult to accomplish.

I’m with you on that. Outline numbering in libreoffice writer does not work.
Outline Numbering - LibreOffice Help, I see this:

Contents  [hide]   
1	Numbering  
2	Position  
2.1	Format  
2.1.1	Untitled 1 - 9  
2.1.2	Save As  
2.1.3	Save As  

Exactly what I want. But how to get that is not clear. The instructions are so full of diversions and assumptions that it becomes a project all in itself. This should not be! Most frustrating experience

Perhaps [Example] Document structure and numbering (View topic) • Apache OpenOffice Community Forum and the links therein may help you somewhat. 3.3 User Guides (PDF) - Apache OpenOffice Wiki has a link to creating Indexes etc.