My Table of Contents has an extra entry. Please do advice on how to improve it

I wrote my dissertation paper using writer, and attempted to insert a table of contents to the front of the document after I had finished writing it. There are no pages or characters between the table of contents and the first heading in my document, but a blank entry appears in the table every time I update the index. The file in question is larger than 2Gb, and so I have attached the file here, through my Google Drive, in good faith. In this document, the extra entry has been manually removed, but will reappear when the table is updated. Please do advice.

Note: I had posted a very similar topic here 5 days earlier, however it was badly written and not very informative. I hope this updated entry is better in both regards. I would edit the original topic, but the site does not present me an edit option for it, probably due to an edit window, one I was unaware of, having passed. My apologies.

EDIT: I am using Libre Office Community Edition, on Pop! OS 21.04 64 bit, GNOME Version 3.38.5.

I gave here a full answer. Be kind enough to edit your previous question to put a link to this one and close it. Having the same question by the same user in two different topics creates confusion with the risk of unnoticed contradictory answers. In addition, you won’t know which question to check.

Editing a question is very easy: click on the 3-dot icon below the text of your question to expand the list of tools. Click on the pencil tool. That’s it, you’re in edit mode.

To edit the question title (to add “[Closed]”), click on the big black pencil at end of title.

No surprise, you have a Heading 2 at the very beginning of your document. This is the first paragraph where you attached image1.png (the wide horizontal green bar). Since this is not a heading, you should assign another style.

Apparently you tried to structure your document with page styles: First Page for the cover (correct), Index for TOC (correct), First Page again for the Abstract (faulty) which automatically switches to Default Page Style when end of page is reached (so there is no need for manual page break).

You messed up the paragraph style collection by creating a normal and attaching Heading 1-6, Subtitle and Title to it. If you want to give a distinctive look to all your headings, customise Heading which is the common ancestor of all Heading n. Then change individually Heading n for what is different from the ancestor.

Your “normal” style is controlling your bulk discourse. This role is played by Text Body. This allows to decouple formatting of heading and discourse.

I noticed you want to indent the first line of text paragraphs. You do this with a tab character. This is clumsy and depend on many factors. The smart way is to set the first line indent in the paragraph style definition, Indents & Spacing tab. You even have a built-in style named First Line Indent. Just customise it to your taste.

When attributes should be shared by all styles, customise Default Paragraph Style which is the ancestor of all other styles. Default Paragraph Style is exclusively used to set common default attributes (font face, double spacing, …) valid all over your document. Don’t format any paragraph with it.

If you set double spacing in Default Paragraph Style, it is automatically forwarded to Text Body or First Line Indent, not speaking of the headings. If double spacing should only be applied to text, set it in Text Body. First Line Indent which is a descendant of Text Body will also inherit this attribute. Thus you set or reset double spacing from a single point.

Your chapters are required to start on a new page. You enforced this by manually adding a page break. It is much better to set the page break inside Heading 1 definition, Text Flow tab. You can also force break to Default Page Style to avoid a direct formatting directive (manual break) after your TOC (since there is change of page styles from Index to Default Page Style).

Last, since First Page formats only your cover (after fixing the faulty use mentioned above), modify this page [style] to add a header and move your green bar inside this header. It will be attached to a Header-styled paragraph (innocuous with regard to TOC) and you can control the position of the line by tuning the header height in the page style.

1 Like

I had imported this file from Google Docs originally, which might be the cause of the malformed text styles, and that green bar over every page.

I’ll try your fixes out, thank you!

I’m really unable to edit the original topic at all, which is why I felt forced to create this new topic. I’m sorry, but I can’t see or find any edit topic option at all, and the keyboard shortcut the website prescribes didn’t bring me to an edit page or dialogue either.


As you can see, neither the ellipsis menu nor the pencil show up under the original topic.

EDIT 2 Also, as re.: the first page style on Abstract, I have tried changing it, and it doesn’t update. it just reverts to First Page again immediately.

EDIT 3 Disregard EDIT 2, it worked this time with no different actions. Even though I’ve edited Default Paragraph style to match my document, the daugehter styles are not updating to match. Is there a way to force all styles to update to match the parent style?

These worked perfectly, thanks! It took a while to fix the mess I had inadvertently made of my Style hierarchy, but now the document styles work as intended. I hope. I might still have issues I’m not aware of.

EDIT 3 Disregard EDIT 2, it worked this time with no different actions. Even though I’ve edited Default Paragraph style to match my document, the daugehter styles are not updating to match. Is there a way to force all styles to update to match the parent style?

Whenever you change anything in a style tab, the settings are unlinked from the parent style. Even if you restore the values: this is a voluntary action from you and Writer will respect it.

To revert settings to “inherit from parent” state, you must press the Standard button (very bad name indeed). This will reset all values in this tab. Consequently, you must set again the values which really need to be overridden.

1 Like

I discovered this on my own, too. Thank you!