Cannot Number a Chapter in a Figure/Table Caption, etc

LibreOffice: 7.4.7.2 40 (Build:2)
OS: Devuan GNU/Linux 5 (daedalus) Linux 6.11.5+bpo-amd64 x86_64

Everything seems to be going so well, right up until the end when it prat-falls into the muck.

Desire:

Create a Caption that shows (example): “Figure: 1.1”
1st digit: the Chapter
2nd digit: serial-number of image in that chapter

Standard stuff, so where am I going wrong?

Steps so far:

  1. Look up LO help
  2. Open menu:Tools | Chapter Numbering…
    LO Chapter Numbering
    (I wanted to upload a PNG of this dialog but cannot find the way to do that)
    ‘Chapter’ put in ‘Before’ + ‘:’ put in ‘After’ purely for ‘Level 1’
  3. Insert Image
    (there is an identical issue with ‘Insert Caption’)
  4. Setup Caption so that Preview looks correct
    (exactly as desire above)
  5. Press <OK>

What appears is “Figure: 1”
(only the ‘Figure’ field appears, no Chapter)

  1. Open menu:Insert | Field | More Fields… | Document tab | Chapter | Chapter number
  2. Press <Insert>
  3. An empty field appears
    (if Chapter number and name is chosen then only the Chapter name is inserted as a field)

As a workaround I’m using “Drawing” as a substitute for “Chapter” in the Captions, but that will surely affect the Contents listing.

What am I doing wrong?

I don’t know.


Picture.odt (36,1 KB)

LO-Version

Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

1 Like

Tools>Heading Numbering is a tool for configuring chapter numbering (as per its name). It has effect on paragraphs styled Heading n. Note that you can choose numbering None at any level (and it is the default). Consequently, if you have not enabled numbering, chapters can’t be numbered.

The depth of chapter number used in captions is set in the Insert>Caption after pressing button Options to retrieve the current chapter number.

Inserting a field for the chapter number can be a workaround (but with less “integration”) provided a chapter heading already exists. If you have no Heading 1 paragraph, you have no chapter yet and consequently no chapter number.

Attach a sample file for better diagnostic.

  • Note that I was using “Tools | Chapter Numbering…” & not " Tools >Heading Numbering". The latter is not available.
  • I chose Number: 1, 2, 3, … and did NOT choose None.

None of those comments apply.

I just attempted adding a chapter number (field) within the Heading 1 that is enabled for numbering, and got the identical result (an empty field). Everything works fine, showing correct preview etc., right up to the point that I press <Insert>. Then an empty field.

I am using docs derived from 1_Programming-In-Python3.odt as in the Python docs as referenced in an earlier question. The document is called “2_paragraph-fixes.odt” and will be added to the rest in GitHub when I’ve completed current changes.

Wording changed some time between 7.4 and 7.6 but it is the same. Is there a reason why you don’t update to 24.8? Your kernel is quite up-to-date (6.11.5 vs. 6.11.8 here).

The referenced file is huge and probably your current document is no longer the same formatting-wise (no “automation” or field insertion in the linked file). Can you attach a reduced sample with the issue? Eventually through a private message.

It is 2.2 MB. That is more than trivial, but not huge. It has 15 Chapters and, once again, that is hardly large.

I am happy to send you a copy via PM, though I have zero knowledge at this moment as to how.

PS
You remember those Heading x decorations which were originally in a Textbox & you suggested should be in a Frame? I changed them all to Frames. Now the one for " Multiple Inheritance" (a H3 in ch8) refuses to stay in it’s Heading and has switched to the Header of Table 8.4 instead. Deleting it & recreating does not work.

PPS

24.8 is available in Devuan via Backports. However, there are large changes in the Repository setup re: 7.4.7 which mean that it is NOT a drop-in replacement. I’m using AppImages for latest + early v7 instead with repository-7.4.7 as the default. I cannot find a compelling reason to switch to 24.8.