Adding a custom caption type doesn't generate a number

I am using LibreOffice 7.3.7.2, and I am producing a document which has some formulae in.

I wanted to have a caption for the formulae so I could reference them later on.

If I use “Figure”, everything works well and I have a Figure, an automatic number and can add text, but I wanted to reference the formulae, so I entered e.g. “Formula” where “Figure” is the dialog for adding a caption.

When I finish, my formula appears with e.g. "Formula : " but no number.

I am sure I have done something really silly, but cannot figure out what, so any help would be most appreciated.

Many thanks,

Attach a sample file

When you add a new category name, Writer automatically creates a Number range of the same name. The Number range is an automatic counter. Check its existence in Insert>Field>More Fields, Variables tab, Type Number range.

Many thanks for the suggestion @ajlittoz - I was completely unaware of that.

Sadly, the Number range was identical to e.g. Figure and Table!

Any other suggestions would be most appreciated!

@TTM Attach a sample file so that I can see what went wrong.

@ajlittoz - my thanks again.

I thought your suggestion excellent, so I thought I would reduce the problem to its minimum as my document is quite chunky now!

I added a caption to each, and there was no problem! So I went back to my original document, and tried to replicate the steps, but it doesn’t work!

I am even more perplexed than I was at the start!

Many thanks for your help.

@TTM If you can’t find out by yourself, send me your real file through private mail.