The default settings for TOC are pretty good. You need to fiddle with the settings only if this default is too far from what you want. But as a start, you should at least get the default TOC.
Creating a TOC is a two-step process: marking the text and inserting the TOC.
##Marking step
You must tell Writer which paragraphs will end up in the TOC. You do this with styles in the Heading n family, where n=1 for the first level (usually chapter), 2 for sub-chapter, up to level 10 (I never saw any paper nequiring such a deep numbering but this is better than artificially limiting to, say, 5 levels).
Apply one of these styles to the heading paragraphs in your text.
Unless you made a typo, there is no headline x built-in paragraph style. If they are custom styles, you need to specifically configure them so that they are recognised by the TOC engine. Considering your question, I think this is yet beyond your skill.
##Inserting TOC
Put the cursor where you want the TOC and Insert
>Table of Contents & Index
>TOC, Index or Bibliography
.
The dialog opens in the Type
tab and Table of Contents
should be preselected. Customise the Title if you want (it is preset at “Table of Contents”). Since the default settings make common sense, push OK
.
You can come back to this dialog by right-clicking in the existing TOC and Edit Index
.
The other tabs (you call them pages) in this dialog are meant for customising the TOC appearance:
-
Entries
describe how the heading paragraph are “converted” in the TOC
The Structure line is a template for the TOC entry. You can format it differently per level if you feel like it by selecting a level in the Level column. Clicking on the Help
button explains the meaning of the cryptic E#
and others. They are associated with a button under the Structure line.
The Entry Text
and Page No.
button are disables because you can insert only once the heading (E
) and the page number (#
) in a TOC entry.
-
Styles
allows you to change the “styling” of TOC entries
Entries
defines the contents of the entries and Styles
the appearance of entries through the use of a specific paragraph style.
-
Columns
sets the number of column for the TOC
It is quite unusual to typeset TOC in multi-column because the headings (entries) are relatively wide. It is more common to do it with indexes because the entry is frequently a word or short sequence of words followed by a page number.
-
Background
is where you change the background of the TOC
You may see a light gray background after you’ve inserted your TOC. This is not a “real” background (it does not print) but a reminder that the TOC was automatically created by Writer and is not directly editable.
Try first to get a default TOC. If you need to customise it and don’t succeed, come back here to ask for further help.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer) or comment the relevant answer.
EDIT 2020-05-31
I just realised a document was attached! Too much screenshots tend to clutter the view and mask the details. Add to that that the document was captioned “image description”. Then, apologies if the document has been there for days.
Your document is full of direct formatting, i.e. formatting hand-made outside styles. You probably did something on your TOC: changing margins, styles or something else, but you did not “regenerate” your TOC.
The attached document contains 2 TOCs: the first one has the expected formatting while the second one shows the same asymmetric formatting as in the screenshots. I right-clicked on it and Update index
. The TOC was reformatted correctly.
General remarks on your document:
-
Nearly all your document is paragraph-styled Default Style which means you formatted it manually (direct formatting). Be prepared for hard time when you come to proof-reading. You won’t control formatting from a single location and you can’t guarantee consistency across the book.
-
Some paragraphs are under Text Body style which is the normal style for the document discourse. They probably happened to be typed after some Heading n paragraphs because they cause an automatic switch to Text Body. But, again, they suffer direct formatting.
-
Vertical spacing is done with empty paragraphs instead of spacing included within style definition. If you use them to synchronise with page boundaries, any edit will ruin your alignment. Again, hard time when proofreading.
-
You chose to style your chapters with Heading 2 and subchapters with Heading 4. This is quite an unusual choice. The standard way is Heading 1 and Heading 2. If your choice was motivated by a disagreement with default formatting, remember you can always customise the built-in styles to fit your taste. This may also avoid some formatting “glitches” in the TOC.
-
Your chapters are manually numbered. What if you want to reorder them? You’ll have to manually hunt for the headings and change them all. The automated way uses Tools
>Chapter Numbering
to enable the feature and customise it to your need.
-
You copied your chapter heading into the header. But since there can be only one header per page style, you had to create one page style per chapter, only to be able to change the header title. This can be also automated using fields, but it would work better with a more conventional use of Heading n styles. A single page style for all chapters is enough then. And you can even improve the device by including the page break to the style in the Heading 1 style (or whatever you use for your chapter title.
-
When you copied the chapter heading for chapter 1 “Det overordnede mål”, you also copied its style Heading 2. When the TOC is built, the TOC collection engine notices this paragraph at start of chapter page 2 and adds it in the TOC. You then have a false duplication of chapters (one with the manual number, the other without) one page apart. Restyle the header with style Header and this will be fixed.
Golden rule:
Even if you have a short deadline, read the Writer guide and learn how to use styles, all styles (paragraph, character and page at least), from what I suspect your needs are based on the sample. You may estimate it a waste of time. This is not. What you spend reading is regained ten fold afterwards because you’ll be more effective and more efficient, needing only to concentrate on your task as an author.