How do I make a TOC after assigning Chapter Numbering?

In Libre Office 7.5 on a Mac (Sonoma)

How do I get a TOC to show chapter numbers when the chapter numbers have already been inserted by designating a Heading 1 paragraph style in Tools > Chapter Numbering set to 1,2,3, etc. before a TOC.

At the moment the TOC is coming up blank unless I reset Tools > Chapter Numbering to ‘None’ in the relevant boxes, thereby turning it off, then re-type the Chapter numbers manually in the document as a Heading 1, then turn Tools > Chapter numbering back on by configuring as before. If I do that the TOC works OK i.e. it shows:

Chapter 1…page 1

Chaper 2…page 9 etc.

Thing is I’ve got 57 chapters! Am I missing something in the TOC set up window?

Hope that makes sense. If someone has a straight forward step guide they could share that would be great! Thanks.

Maybe Tools > Update > Update All to update the TOC?

Thanks for the suggestion. I update via Tools and by right clicking the TOC and clicking update but no luck yet. It’s weird, if I manually type in the chapter numbers in the document as a Heading 1 the TOC works fine but as soon as I turn on Chapter Numbering the TOC goes blank.

Attach the file if it is not confidential or reduce it to a 2-page sample still exhibiting the issue.

Hi,

Please find file attached. The problem happens each time I try to set up a document so at least it’s consistent!

Thanks for taking a look. If it’s useful, my MO is below.

Thanks!
TOC with Chapter Numbering Test.odt (11.0 KB)

MO:
I open up 3 or 4 blank pages, set the first one as Format > Title Page +1, with a TOC on the second page (changes to an Index Page Style) and page numbering starting on page 3 in Default Page Style as Chapter 1, page 1. So far so good.

Then, as you’ll see:
Tools > Chapter Numbering is set to 1,2,3 …, Heading 1 paragraph style, with the word Chapter(+ space) set as a Before separator. So that’s all good because I can just click on Heading 1 in Sidebar > Properties > Style and not have to type anything, the chapter number just appears, and importantly, will auto update if i change chapters retrospectively.

Then, when I insert a TOC I get zilch unless I turn Chapter Numbering off and input Heading 1 manually, sadly losing the chapter numbering auto update though.

Apparently there must be something more in Heading 1 than the text generated by Chapter Numbering. Try typing a space after each generated Chapter Number. Then, right click in your table of contents and select Update Index. Your entries should appear.

Bingo! Thanks TXDon. Adding the space and then updating did the trick.

If anyone else can benefit from this thread, I tried making sure there was no space in the ‘After’ Separator in Chapter Numbering but there doesn’t seem to have been. If I add a new chapter retrospectively I still have to add the extra space, but I can live with that.

You meet a specific (undocumented?) peculiarity of list items. Heading Numbering is just another numbered list and all list rules apply.

Due to the bad habits into which M$ Word conditioned us, i.e. excessive use of direct formatting, developers have implemented various “compensations” against bad Word document control.

One of them is vertical spacing with empty paragraphs. I remind you that vertical separation between paragraphs should be a property of paragraph styles and a well-behaved document contains absolutely no (semantically) empty paragraphs (contrary to your sample file, but I suppose it is a quick’n’dirty sample to illustrate the problem).

When you’re in the middle of a list and you want to space the items, newbies enter an empty paragraph. Being in the middle of a list, a number should be inserted but Writer recognises an empty paragraph and suppresses numbering to comply with Word idiosyncrasies.

The case of heading numbering is a bit different because many paragraph styles are associated with the (internal) list. The number is not suppressed in text, but heading text is null. To avoid entering (numerous) empty entries into the TOC, the entry is suppressed but numbering not (this is where you see that trying to cope with Word-user habits is inconsistent).

So, as @TXDon suggested and you have discovered, ensure your heading is not empty, be it a mere space.