How to reset wrong numbered headers

I have a header of level 4 whose numbering is following the number of the previous header of level 4 from another header of level 3.

On the picture you can see that the title with the number «I.2.3.3» should be numbered as «II.1.2.1», because it came after the «II.1.2» header of level 3.

I already tried to change the style of the header into «Normal text» and back to «Header 4», but it does not solved the issue (tips from Chapter numbering not working on one chapter - #2 by SKelem).

The tips from https://superuser.com/questions/1288196/inconsistent-heading-numbering-in-libreoffice-writer is not applicable: I don’t have a Continue previous numbering options, but a «consecutive numbering» one, which does nothing good: the number become: «0.10.18.21»

More background information:

  1. the document were once an ooxml document;
  2. I already solved the numbering issue of some headers (maybe this one too, I don’t remenber) with the tips of changing the header into a simple text before reverting back into an header.
  3. In the TOC, all headers of level 1 are displayed with Contents 2 style. This gap appears in the next level:
    1. header of level 2 are displayed with Contents 3 style
    2. header of level 3 are displayed with Contents 4 style
    3. header of level 4 are displayed with Contents 3 style
      But sometime there are headers of level 2 which are displayed with Contents 2 style. In fact, under those header whose style in the TOC is correct, we can find the header of the level 4 «I.2.3.2».

I guess this document was started in Word and might be contaminated with formatting from that.

Note that there is big difference between headers and headings, I think you meant to write heading everywhere you wrote header.

If the document was started in Word then the heading numbering might have been a list. If Heading numbering is then applied over the list strange things could happen. You need to remove any list numbering

Thanks for the quick answer.

This document was created as a LibreOffice document. Then it was converted into an OOXML with OnlyOffice. And then converted back into a LibreOffice odt.

I tried to use only the Heading Numbering.

How can I remove any list numbering? If I removed the list from the heading (format > lists > no list), it removes the numbering of the current heading. I need to reinject a numbering afterward (using NormalText, then Heading style changes). I did that all the heading of level 4, but it did not solve my issue.

What would be the next step? Should I do that on all headings?

Apparently, you have 2 issues:

  • you messed up the outline level in your Heading n styles, probably by fiddling in Tools>Heading Numbering (as shown by the inconsistent styling of the TOC)
  • you added a list numbering over your headings (or some of them) instead of relying on Tools>Heading Numbering

It is quite difficult to suggest a fix without a clear understanding of your case. Attach a reduced version of your document, making sure the problem persists. If you consider your text as confidential, replace it by nonsense.

So that is where the Microsoft contamination came in; OOXML is developed by Microsoft and is not the same as Open Office XML/Open Document Format (ODF). The formats are not losslessly interchangeable. Word (OOMXL) does not support Heading Numbering, it uses outline and list for headings, see Number your headings - Microsoft Support

All your headings will be numbered as list.

Always work and save in ODF format. If you need to share with someone using Microsoft Word, click Save a Copy and select .docx but continue working in .odt. If you need to collaborate closely with someone, then you should both use the same software and probably same version of that software.

If you right click on the offending paragraph and select List is the entry Restart numbering highlighted? If so click it to remove the restart.


HeadingNumbering.docx (7.2 KB)

The alternative is to paste the entire document as unformatted text into a new blank document, select all and apply Body Text paragraph style, Then go through and apply heading styles as required.