Line feed in chapter numbering - how to remove from TOC? Or how to have multi line chapter numbering?

In LO Writer (7.0.2.2 on Ubuntu 20.10) I have a chapter numbering format which puts the chapter number on a line before the chapter text, achieved by setting the character after the number ‘Seperator: After’ to 000A or a line feed. Looks great.

Meanwhile, in the TOC, the entries show up on two lines, as the line feed is included in the TOC entry. I don’t want this, first because it doesn’t look right, second because it makes the TOC flow over another page which screws up the page numbers. If I manually fix the TOC the page numbers are still wrong, if I change the Heading format to fix the TOC then the document is wrong.

How does the problem cause a page count problem? Because a correctly formatted TOC fits on one page, but when most of the entries expand to two lines, it runs onto a second page, pushing all pages in the book backwards by 1 page.

I need to either have multi-line chapter heading formats without using 000A, or I need the TOC to ignore the 000A character.

How can I achieve either of these?

Further to answers below:

I don’t see how the position tab helps though, it only moves the number along the same line as the text, it does not allow the number and text to be positioned on separate lines like this:

1

Chapter

There is no ‘Numbering followed by’ field on the position tab and there is no drop down menu. Nor on the Numbering tab. See the screenshot. In what version of LO are you seeing those options?

Definitely LO which I have been using for 10 years:

Version: 7.0.2.2
Build ID: 00(Build:2)
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 1:7.0.2-0ubuntu1
Calc: threaded

That’s not how my dialog box looks, mine is this:

Bullets dialog, as requested:

How can a page overflow in the TOC screw up page numbers? The whole thing is designed to be dynamic and automatically account for varying-length TOC, unless you manually number the pages, of course.

My LO version is 7.0.3.1, not very far from 7.0.22 (are you sure it is “22” and not “2.2”?).

I’m quite surprised by the field labels, never saw such. Can you double-check it is really LibreOffice and not OpenOffice? What does Help>About LibreOffice precisely say?

I felt optimistic that you’re on 7.0.3.1 which isn’t yet in the Ubuntu repos, so I upgraded from the LO website to 7.0.3.1 and… the dialog is the same as before, I still don’t have the options you’re talking about. :frowning:

I assume your LO comes from the Ubuntu repository. The dialog appearance in my screenshot has been the same for many versions. The New Line is relatively new but the fields, their labels and order is the same. I hardly imagine Ubuntu packagers will change this dialog just for fun. Width and minimum space are so divergent relative to paragraph properties that Ican’t guess where this comes from.

Can you check if Format>Bullets & Numbering, Position tab shows the same dialog?

As I mentioned, I downloaded the latest from the LO site as 3.1 isn’t in the repos yet. The dialog is the same.
The Bullets - Position dialog is different to the chapter number dialog, I don’t seem to be able to add two images in one post to show you. However, it doesn’t have any ‘new line’ option if that’s what you’re wondering.

I just checked my Windows laptop which is on LO 6.4.4.2 and it has the New Line option you’ve mentioned - so who knows why this isn’t included in the DEB package? Thanks.

OK, problem over. You should perhaps complain on an Ubuntu site.

The screenshot for bullets & numbering didn’t show up. Can you fix that, that for curiosity?

Don’t forget to check the tick mark left of my answer.

I couldn’t seem to post two images, so I can’t add the other screen shot unfortunately.

Very strange, I’ve already posted questions or answers with many images.

I’ve uploaded it here if you’re still interested to see it: Linux LO dialog bullets - Image on Pasteboard

Rather surprising. After all, “Chapter numbering” is just another list, albeit with additional properties, and I always thought configuring was done with the same dialog/internal function.

This also leads me to suspect some possible advanced setting (in principle for developers use only) which could have been corrupted to select a variant form of the dialog. But how did this happen?

Since you’re under Linux, create another account. This way, you can be sure that a new account will create a brand new user profile. See if Tools>Chapter Numbering still doesn’t show the New Line option. There is a chance that the advanced settings are user-specific (and not system-wide).

What to be done next depends on the result of this test.

In Tools>Chapter Numbering, Numbering tab, separators are meant to customize the appearance of the number and are considered an intrinsic part of the number. Therefore, the number plus its separators are used everywhere the formatted number should appear, i.e. in headings and in the TOC.

What you want is not a specific number look, but a relative positioning between the number and the heading. This is set in the Position tab with field Numbering followed by. The drop-down menu has a New Line item.

Since it is know by Writer as being a positioning directive, it is not forwarded to the TOC machinery.

Nota: U+000A is not CARRIAGE RETUN, it is LINE FEED. Carriage return is U+000D.

EDIT 1

This is how the dialog looks like:

Position tab

EDIT 2

Until we can sort out the dialog discrepancy, you can manually “patch” your document.

  • remove the Line Feed from the separator; all your headings now have the number inline

  • after each chapter number, type Shift+Enter; this creates a line break, not a paragraph break

    The line break is converted into a space when the TOC is collected.

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.

Ah yes, you have reminded me that this is how I ‘fixed’ the problem previously. I much prefer to use automation because, in books, there’s always one manual tweak that slips through the proof reading.

Yep! But this was a workaround, just in case.

Possible workaround: Remove the chapter number entry E# from the ToC spec. With any luck, this should also remove the numbering separator.

If you need numbering in place, enter it by manually editing ToC after your doc is finished. Not ideal, but should be workable for a single page ToC.

Interesting idea, thanks

I just installed the Alpha of version 7.1.0.0 and the problem appears to be fixed, the correct options are in the dialog as for Windows. Let’s hope it stays that way.

Version: 7.1.0.0.alpha1
Build ID: 987671387712c4f9061d6216ff2f001a7bb9e57b
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: CL