Heading 1 numbering restarts from 1 in the middle of document after having incremented to 3

I’m having multiple issues with heading numbering and styling. I’m working with a large document. I’ve deleted lots of content and only left a few headings to show the issues.

The main issue is as stated in the topic summary. The issues I’m having are:

  • Heading 1 (level 1) numbering restarts from 1 in the middle of document after having incremented to 3
  • Heading 2 (level 2) under a heading level 1 which is at number 2, gets numbered 1.1 rather than 2.1
  • Heading 2 text and number does not get the same styling as the Heading 2
  • Heading 2 text is styled properly but not the number

A reduced version of my file is uploaded below:
LibreOffice-Headings-Numbering-Issues.docx (229.0 KB)

Here’s the version of the LibreOffice I’m using:
Version: 6.4.7.2
Build ID: 1:6.4.7-0ubuntu0.20.04.4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3;
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Thanks for your responses already, please let me know if you need more info.

Please, basically you have to specify the operating system and the LibreOffice version (three digits, e.g. 7.3.2).
Furthermore, specify the file type in which you saved.
Edit your initial question, to do it.
Thanks.
All important information about your question should be present in the question box, otherwise edit and complete it.
Do not use comments for this.


You may want to upload a reduced and anonymized file here.


Here you can find the further Guidance for this page.

While you edit there is a toolbar at the top of the edit-area. 7th symbol from the left, with an arrow pointing up.

1 Like

Frequent cause for such a behaviour is the wrong assumption that chapter numbering is done by adding manually a number with toolbar button just like you would do for a numbered list. You then create a conflict between built-in chapter numbering and list numbering.

Regarding Heading 2 formatting inconsistency, you likely have manual formatting forced over the style.

To confirm these hypothesis, attach a sample file.

2 Likes

Thanks for looking at my issue. I’ve uploaded a reduced version of the file and added information about the LibreOffice version and the OS I’m running it on.

1 Like

@docwriter: That seems to be fact. Misleading formatting from the beginning.
Another point: Your example file is saved in DOCX format. That means: Converting in opening the file and in saving the file. Causes loss of information and/or formatting. See: [Tutorial] Differences between Microsoft and AOO/LO files
Tip: Reformat your entire text in styles (real chapter numbering), always save your file as odt file.

For producing and editing “chaptered” text use the very competent manual: http://openoffice-uni.org/
Cheers

Additum: Little How-To to change into chapter numbering…

2 Likes

Thanks a lot for looking into this and your findings. I’ll apply your findings and let you if I run into any issues.

Fundamental remark: LO Writer is not M$ Word. Saving .docx is the most reliable way to create problems. Unless you have really good unavoidable reasons, save .odt. The only acceptable reason is you receive the document from external sender which is really unable to read .odt. But be prepared for compatibility issues.

As an example of compatibility issue, you have zillions of ListLabel 99 paragraph styles. Your document seems to be damaged as there are dummy character styles (no attribute set) with same name as paragraph styles. Also many styles are styles usually defined in Draw, like A4 or Graphic and their subtrees. Their definition has nothing to do, though, with their counterpart in Draw.

Your problem

As suspected, you have a list numbering direct formatting overlaid on Header 1 paragraphs. To fix, apply the following procedure to each level 1 heading:

  • put the cursor in the level 1 heading
  • apply Text Body paragraph style or Ctl+0 (zero)
  • click on the NoList icon in the tool bar or Ctl+Shift+F12
  • reapply Heading 1 of Ctl+1

Miscellaneous remarks

  • your style collection looks to me as not well organised. Simplify it and structure it. Even complex document don’t need more than ~15 paragraph styles, including used Heading n, roughly ~10 character styles and less than 5 list styles. Number of page styles vary according to layout sophistication. I’d say a maximum of 3 for chapters plus one for cover, max 3 for TOC and a couple of extras for dedication, index or bibliography.
  • review your tables: they should not bleed into the margins. Note there is a huge difference of table concept between Writer and Word.
  • you have too much direct formatting: nearly every paragraph. This may however be a consequence of conversion between .docx and ODF. However, this is a source of problems as it prevents you from controlling formatting with styles.
  • don’t space vertically with empty paragraphs. Define vertical spaces in paragraph style configuration instead.
3 Likes