Figures and tables numbering by chapter

I have followed the steps

  • insert > Field> more fields > Variables > Type: Number range
  • Select : Figure (or Table)
  • Number: Arabic
  • Numbering by Chapter, Level 1
  • insert
  • close

but both figure captions and table numbers remain void of Chapter number , say Figure 1 instead of Figure 1.1 for Chapter 1, same for table number

The same procedure works immediately for equation numbers.

What’s wrong?

Thanks

OS Windows 10 x64

LO 7.0.5.2 (x64)

Chapter with Heading 1

Next morning (now 23:00 CET) I will attach a sample file

(reformatted by ajlittoz for better readability)TestLO_25Mar21_EC.odt

Have you enabled chapter numbering in Tools>Chapter Numbering? Do you style your chapter headings with Heading 1? Probably yes if it works for equation number.

Edit your question to mention OS name and LO version. Attach a sample file with the paperclip tool (you can’t attach to a comment).

You made a mistake numbering your figures. Instead of using Insert>Caption or equivalently field insertion, you used the toolbar button for numbered lists to create a specific formatting (Figure prefix). A list counter cannot be made chapter-relative because it is already a full 10-level hierarchy.

Fix is easy: either select the frame/picture and Insert>Caption (which will put the caption inside the frame) or replace your list item number (after deleting it) with Insert>Field>More Fields … choosing the correct number range.

Additional remarks:

  • You have empty Heading 1 paragraphs. They can badly interfere with chapter numbering and cause other unexpected problems with references. If their presence is due to document downsizing for the sample, ignore my remark. If they were added for page break, the page break is much better specified directly in Heading 1 Text Flow tab.

  • Has your document ever be touched by Word? The first cross-reference to “Figure 1” has a very strange encoding reminiscent of what Word does (badly)? Was it originally a *.doc(x) one?

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

(My experiences were cleared and the examples made with LibO V7.1.1.2 -from PortableApps package https://downloadarchive.documentfoundation.org/libreoffice/old/7.1.1.2/portable/LibreOfficePortable_7.1.1_MultilingualAll.paf.exe- under continuously updated Win 10.)

I cannot coerce my understanding and experience into consistency with the first answer by @ajlittoz. For me the correctness or unjustified absence of level numbering does not depend on whether the relevant TextField was created by Insert Caption or by manually inserting a TextField of the proper type. The relevant difference is whether or not the numbering for the related Headings was set in advance of the TextField (NumberRange) insertion.
Theres a bug. And from my point of view the best way to fix it would be an additional setting for paragraph styles related to the existing outline level with a numbring style. The respective options/choices must be grayed out if not applicable then. To set a numbering for one instance by direct formatting with the effect of an automatic update to a hidden property of the style isn’t a well structured solution. It conflicts with the styles concept.
See attachments in the given order.

ask300453exampleFail.odt
ask300453exampleFail2.odt
ask300453exampleSuccessl.odt

If anybody wants to report a related bug they may use everything I supply here. I won’t do it myself because Writer isn’t a field where I feel competent.

For me, there is no bug in your document. They behave as I expect (as least under my mental model for Writer). Sometimes, numbering is not reflected after changes but this is settled by Tools>Update>Update All.

In Fail, there is no chapter numbering, nothing is captured and figures get numbered sequentially because the number range never sees chapter break. This is good because it avoids any ambiguity if the number was reset to one when chapter changes.

In Fail2, after Update All, the figure numbers are prefixed by the designated level.

Same in Success.

The documentation is not clear enough: the number range is not affected by the prefix. Therefore, the number range is not reset where there is a break at the designated level. Perhaps we could call it a bug.

Also, the prefix is not a cumulative prefix from level 1. It is a single number captured from the designated level or former level if it does not exist. This creates confusion for the reader. …

… This may be a design flaw.

Finally, any modification on Chapter Numbering seems to require an Update All so that the number range fields are updated. This last point of procedure is minor for me.

Yes. The last point was the one I judged to be a bug. You are much more experienced than I am: Nonetheless I would stick to that opinion, in specific concerning the fact that an update of all “old” fields is triggered without notice if a new (copied e.g.) field of the same NumberRange gets inserted. What justification should there be for not updating as soon as the chapter numbering is created - or changed (to a different numbering style). For an experienced user like yourself that’s minor. For a less experienced one like myself or the questioner, it’s not exactly.
In any case: The correctness of TextField instances of the dicussed kind does not depend on the way they were created/inserted. (The questioner reported it was done by Insert>Field>>>Number Range.)
And: The concept of styles itself is somehow discredited by the actual behavior. Or can you tell me a way to get differently numbered (say) Heading2 elsewhere in the document? Is there a “scope” for the setting?

Sorry. Much too late I studied the example the questioer uploaded a few hours ago… (In fact I had my post in mind since yesterday.)
Now I found that the field related to Figure 1 is not at all a NumberRange but a Field of a type I never used, referring to a paragraph numbering introducing the string “Figure” as a part of the number. The questioner hadn’t reported correctly insofar.
On my behalf: Too little experience with Writer. (A very strange idea from my point of view.) I should have kept still.
(I may have learned a bit again, however.)

The questioner erroneously used list numbering for his figures. List numbering is never related to chapter numbering. The counter lives in a different namespace (those of List styles). By using the toolbar button, he created an anonymous instance of such a style. He formatted the appearance of the counter by adding a "Figure " prefix, which created an ambiguity with the Figure number range.

Then he used a cross-reference as can be to any numbered paragraph.

As soon as I have time (perhaps later this afternoon or to morrow), I’ll create a bug report because I think there is really a bug with “numbered by chapter”. As it is presently implemented, we can end up with incomprehensible numbering and apparent holes. A casual reader, not knowing the subtleties of Writer, will be disconcerted by the sequence. And a reader should not be required to know Writer subtleties. A document must be compliant with common presentation rules.

Back here. There is absolutely no bug in caption numbering. Something must be broken in questioner’s file.

I started from a blank document and everything is as per specification. I have even automatic update when I change the chapter numbering parameters. See FrameCaptions.odt

However, you must be consistent and rigorous in your Chapter Numbering scheme. Under unusual numbering scheme, you can get visual number duplicates. I write “visual” because the number is made of two parts: chapter number + caption number. Depending on how you number, the combination may look the same as another one. To be manipulated with caution.

Correction: auto-update happens in the first edit. When you reopen the file, you must Tools>Update>Update All to update caption numbering.