How to remove 'Extra' entries from Table(s) of Contents?

A text heading for a series of paragraphs has a custom paragraph style (Text_Cmnd-…) but shows up in the table of contents as “Contents 3”. Where did that come from? How do I remove it?

I should have noted … LibreOffice, 3.5.7.2

Could you possibly upload the file ? (Be careful about the content, this is a public site!!!)

The paragraph styles Contents N are those automatically employed by Writer for defining a ToC. If you wish to alter how your ToC displays, then these are the styles to use in doing so. Alternatively you can use and assign your own custom paragraph styles via the Styles tab when inserting / editing your ToC.

Yes, the table of contents is “made up” of Contents N paragraph style. From my point of view, the problem is that I’m using a paragraph style which is not Contents N for these headings because I don’t want them in the table of contest. Something appears to be “converting” them to Contents N in/for the table of contents.

I’ve just observed something odd … I’m documenting some command, each command has the command name, a short description, command format, … The TOC for the earlier commands include (incorrectly) the short description (in total), 'Format", and a few other elements. The later commands show up correctly … just the command name. I did tweak my paragraph styles later in the document (after the point where they are ‘fixed’) but tweaking the first command to match the last hasn’t fixed it.

It does sound like the styles used for the paragraphs in the main body of the document are using different styles at different locations. Obviously each main heading (e.g., the name of the command) needs to be set to a paragraph style that is marked as being included in the ToC (on the Styles tab as mentioned). These styles are not “converted” to Contents N styles, but rather the Contents N styles are merely used by default (but this too can be changed).

The styles have the same name although they evolved slightly as I worked (this is my first major LO project). I’m guessing part of the style got embedded in the document so that, even though I updated the style (i.e. removed the link to Contents n), the embedded part did not get updated, after all, they are part of the document now, not the style.

I don’t know what the problem is with the original document but … if I delete the ‘offending’ headers (have to include the paragraph end marker as well as the text) in the document and re-enter them, then the table of contents is fixed. A painful workaround but not as painful as some I’ve seen. I have tried selecting the text (with or without the paragraph end), editing the paragraph style and then “Apply” … that didn’t work.

thanks for your thoughts and suggestions oweng …