Unable to continue numbering

I have been working on a paper for the last few years that is at 210 pages now. It uses a paragraph style called Ex. (as in ‘example’), which is set to use the numbering style Numbering 123. It has worked flawlessly this whole time. The numbers automatically count up sequentially, and at the beginning of each new chapter I manually tell the numbering to restart.

I recently upgraded from 6.2.0 to 6.3.4, and suddenly for the first time I had a case where the numbering restarted at (1) without my approval. I was able to manually tell it to continue previous numbering, but it caused a disturbing chain reaction where I had to tell each following numbered example to continue previous numbering too.

Well now it has gotten worse. Whenever I apply the Ex. style to a page it always restarts at (1) and there is no way to make it continue the numbering. Under the right-click bullets and numbering menu there is simply no such option. Instead, if you select “Restart Numbering” and then re-open that right-click menu, it will show the icon next to Restart Numbering highlighted blue. And if you click it again the highlight will turn off. I don’t know what that is all about. Either way, it makes no difference. If you go to the main menu Format > Lists, then “Continue previous numbering” is greyed out.

I reverted to 6.2.0 and the problem persists!!! I tried copying the paragraph style to a blank document and the problem persists! But if I create a new paragraph style that also uses Numbering 123, it works fine. What has happened? How do I fix it?

Update:
If I change the misbehaving paragraph to use List 1 style, strangely the numbering then does continue rather than restart at (1). I thought the normal behaviour is to NOT continue numbering between different list styles. There is still no option to continue or restart numbering for the paragraph, it just continues if it is List 1 and restarts if it is THE SAME numbering style as the previous examples (Numbering 123). If I try changing the Ex. style to use List 1, Writer crashes.

Update 2:
I’m not sure but it seems that maybe the inability to continue line numbering only applied to the last examples in my paper. At least now, when I add an Ex. paragraph earlier in the paper, it shows up as (1) still, but I am able to tell it to continue line numbering. I found out that last heading line was preventing the “continue previous numbering” option from appearing for paragraphs that came after it. If I changed the heading to something else like Text Body, then I could set the following Ex. paragraphs to continue previous numbering. Then I set the heading back to the Heading 3 style and “continue previous numbering” still works. Of course none of this makes sense. I still have the problem that new examples always restart numbering by default, which never used to happen.

I have examined the document with special characters turned on, and by looking at the underlying XML of the document, and nothing seems out of the ordinary in either case.

Upon further investigation, if I go back five versions (50 examples, 1 month) on my paper, it works normally there, but the problem just started happening today… The other 4 older versions have the problem. This is bizarre.

Restart/Continue Numbering flag cannot be stored in a style definition. It can only be applied manually. By chance, did you copy and paste a block of text containing a restarted example (the flag is also copied)?

No. As I described, “Whenever I apply the Ex. style to a page it always restarts at (1) and there is no way to make it continue the numbering.”

A comment on Update (1):

I thought the normal behaviour is to NOT continue numbering between different list styles.

A list item is formatted by a paragraph style associated with a so-called list style (in fact a sequence number definition). Several paragraph styles may be associated with the same list style, in which case they belong to the same sequence even though they look different because of different paragraph styles.

Exactly. So it is weird when the numbering continues BECAUSE the list style changes.

UPDATE: I think the quick solution is to just apply a different style to the buggy paragraph, then turn of numbering for that paragraph, then re-apply the desired style (which uses numbering). If you have problems all over you document then you can do the steps below.

Furthermore, the cause of the problem seems to be that I regularly have different paragraph styles between each numbered Ex. paragraph, and these other paragraphs were somehow getting invisible numbering applied to them (numbering was turned on but there wasn’t actually a number showing at the beginning of the line). I use a macro to create these examples, and I guess it was causing this weird invisible numbering and throwing things off. I can’t actually replicate the buggy behaviour by manually inserting a numbered paragraph and deleting the numbering. I do wonder though why Writer allows you to delete the number but the paragraph is still considered numbered. Seems like that is asking for trouble.

ORIGINAL POST:

I managed to fix the problem.

  1. Convert all the numbered examples in the document from Ex. to an unused style, with Search and Replace.
  2. Some random examples still had numbering on them, including the last example I had tried to insert, so with all the examples selected I just right-clicked on one and went to Bullets and Numbering > Numbering Off. Ctrl+Shift+F12 apparently.
  3. I then reapplied the Ex. style to all the examples. I then had to go to the beginning of each chapter and restart numbering for the first example of each chapter. There was one chapter, in the middle, where the first two examples seemed to be in their own world and it took some wrestling to get them back in line with the rest of the document.

Somehow that solved the problem. Now when I insert new examples they continue numbering like they are supposed to!

That had me scared and I am still a bit worried. One thing about MS Word that I hate, from experience, is constant wrestling with buggy numbered paragraphs that change when you aren’t looking and have bizarre glitches that ripple from one numbered set to another. I have been glad to never have to deal with that in LibreOffice, but now I am worried that it may keep cropping up in this document.

Formatting lists is probably the most daunting task in Writer and it is easy to get it wrong (I’m talking with a long experience). It is of utmost importance to be consistent: either you number with toolbar buttons (allowing to add numbers to any paragraph style), or exclusively with specifically crafted paragraph styles.

From your fixing procedure, I fear you had (unintentionally) a mixed strategy. This is very difficult to detect.

I have only been using paragraph styles, and everything has been going fine on the document for the past 2 years. (Almost 600 numbered examples.) I think some rare bug must have occurred.

Comment on your UPDATE: macros allow you to fiddle directly with the internal representation of the document. If you don’t understand thoroughly the ODF structure, you can easily mess up the XML in very subtle ways and put it in off-specification state though still usable (apparently).

I’m experiencing the same annoying bug, which has yet to be fixed. My solution is simply to remove the bullet points in text separating my new title from the preceding one. The title numbering then proceeds normally, after which I restore the bullet points. It’s a bore though!

@oliverjames1: please describe what you do with more details. Remember you must never mix chapter numbering with bullet. They are both some form of numbering and a paragraph can have only one. Trying to add a bullet to an already numbered heading is doomed to fail. However this can be done by configuring Tools>Chapter Numbering. If this is what you need, explain.

The issue under discussion seem to relate to text with numbered headings, that also contains bullet points.
Have used bullet points one cannot insert a numbered heading with sequential numbering. To do that I temporarily remove the bullet points from the text so as to have the correct heading number.
Another solution is to remake the heading styles but that requires more work.

To have both bullet and chapter numbering, insert the bullet as the Before Separator (or After if you want the bullet between number and heading) in the desired level configuration in Tools>Chapter Numbering. No need to modify the Heading n styles.

But for your own sanity and Writer reliability, never never NEVER add a bullet with the toolbar button to an already numbered paragraph. Bullets and numbers conflicts because they are based on the same internal implementation. In addition, you probably mix paragraph style and direct formatting which adds another degree of conflict. And finally, if you also saved as .doc(x) instead of native .odt, you’re guaranteed to end up in a complete mess because M$ Word and LO Writer completely diverge about the feature.