I came across that bug apparently inherited from the OpenOffice codebase which is described in this forum.
Here is when this issue appears :
- You have a Master document and attach multiple sub-documents to it
- One of the sub-documents contains a numbered list incorrectly terminated. Let’s say for the sake of giving an example that the number of the last item of this list is 5
- The next numbered list that will be rendered in the Master document from a subsequent sub-document will start at 6 instead of starting at 1
This is a tricky one. The problem comes from this list incorrectly terminated business. Apparently, when a numbered list is created, it is followed by a line break which also adds the end-of-list mark behind the scenes. There are two issues :
- If this line break is removed, the end-of-list mark (not visible by the user) is also removed.
- The second problem is that manually adding a line break after a numbered list, after the line break automatically added when the numbered list was created has been deleted does not add back the hidden end-of-list mark.The only solution is to create a new numbered list (and to be careful not to delete the line break this time).
As you can imagine, this is pure voodoo for users and even when the problem is identified, this is a real pain to deal with. While the way numbered lists are terminated can be investigated, I think the real issue may be with the rendering engine of master documents. I mean, in my case the two numbered lists were separated by dozens of pages. There may be a counter variable that is not correctly reset (or it may be possible to manually reset it as a temporary hack as soon as content other than a list item is being met - which would signal the end of the list in the absence of the end of list mark). The problem only appears with multiple sub-documents rendered in a master document. As far as I can tell, numbered list in the same document are always correctly rendered outside of the context of a master document.
I am not familiar with the codebase of LibreOffice to send a patch. This is an annoying issue, hopefully it can be fixed soon. In the meantime, I found myself changing some numbered lists to bullet lists. This is the kind of bug that saddens me when I imagine how confused and frustrated a non-technical user must be in front of that.