Bug 114773 - TOC: Remove additional space after chapter number in ToC
Summary: TOC: Remove additional space after chapter number in ToC
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
: 115060 145473 (view as bug list)
Depends on:
Blocks: TableofContents-Indexes Chapter-Numbering
  Show dependency treegraph
Reported: 2017-12-30 20:44 UTC by Thomas Lendo
Modified: 2021-12-23 15:11 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2017-12-30 20:44:29 UTC
See attachment 132787 [details].

In 5.3.1 an additional space after the chapter number in a Table of Content was introduced. You can test it with attachment 132787 [details] of bug 44282.

Illustration and table indexes are not affected.
5.3.0 wasn't affected. 5.3.2 and later versions are also affected.

Steps to reproduce:
1. Open the mentioned Writer file.
2. Update the table of indexes.

Actual result:
2.1 Heading level 2 ................. 2 -1

Expected result:
2.1 Heading level 2 ................. 2-1
Comment 1 Dieter 2017-12-31 12:01:43 UTC
I confirm it with

Version: (x64)
Build ID: d2bec56d7865f05a1003dc88449f2b0fdd85309a
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (de_DE); Calc: CL

The difference between TOC and illustration and table index is, that the entry is different:
TOC: Chapter No.
Table index: Chapter Info
Comment 2 Cor Nouws 2018-01-03 16:54:56 UTC Comment hidden (obsolete)
Comment 3 Thomas Lendo 2018-01-03 21:21:02 UTC Comment hidden (obsolete)
Comment 4 Thomas Lendo 2018-01-18 20:03:14 UTC
*** Bug 115060 has been marked as a duplicate of this bug. ***
Comment 5 raal 2018-01-22 11:46:50 UTC
bbisect 5f1ebf0563dfa376c8ff949fce15616c8a29f41f is the first bad commit
commit 5f1ebf0563dfa376c8ff949fce15616c8a29f41f
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Feb 15 17:20:50 2017 -0800

    source sha:dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd

    source sha:dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd
author	Xisco Fauli <anistenis@gmail.com>	2017-02-15 11:06:00 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-02-15 11:33:56 +0000
commit dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd (patch)
tree 10fb4e9a4d6bb474f4dd0144354df612d33ba38c
parent 54c0b9977a6421ecb7383fa48636075c6ca9967e (diff)
tdf#104315: Revert "tdf#44282 fix missing space...
... for numbered lists in TOC"

This commit is causing lot of regressions in TOC.
Besides, as the comment says, it's an ugly hack,
so I'd prefer to revert it and find a better solution
Comment 6 Xisco Faulí 2018-01-22 12:13:06 UTC
The bisection in comment 5 is not correct, as the commit mentioned only reverts a previous commit.

Regression introduced by:

author	Abhilash Singh <abhilash300singh@gmail.com>	2016-07-22 11:48:45 +0530
committer	jan iversen <jani@documentfoundation.org>	2016-08-16 06:26:04 +0000
commit ce95e39f8e952159844e9dc04a1df402bb103634 (patch)
tree dc419e5a1cb976ceab9867bd0b20612c8f8cf199
parent 989e8bc0d792f0dc5778746fac45de129a22d7ac (diff)
tdf#44282 fix missing space for numbered lists in TOC

Bisected with: Abhilash Singh

Adding Cc: to bibisect-linux-64-5.3
Comment 7 Yvan Rose 2018-02-17 15:03:24 UTC Comment hidden (no-value)
Comment 8 Yvan Rose 2018-04-09 13:58:40 UTC Comment hidden (no-value)
Comment 9 Timur 2018-07-31 09:17:46 UTC
Additional space is ugly. 
I think proper solution is tab stop in Bug 32360.

Actual result (space is tied to chapter number):
2.1(space)Heading level 2 ................. 2(space)-1
Expected result (tab is entry in ToC structure):
2.1(tab)Heading level 2 ................. 2-1
Comment 10 Yvan Rose 2018-09-04 22:52:17 UTC Comment hidden (obsolete)
Comment 11 Cor Nouws 2018-09-07 15:55:49 UTC Comment hidden (obsolete)
Comment 12 Yvan Rose 2018-09-07 16:22:10 UTC
(In reply to Cor Nouws from comment #11)
> @thomas: as far as I see, the space only is added after the second chapter
> number in the line, and only added once, not repeatedly?
> So update summary of this issue?

The extra space always appears between the automatic number generated by Writer (as set by list or outline/chapter numbering) and the author-entered contents that follows. So if you have the punctuation input automatically by Writer, the extra space appears after that punctuation (e.g. "2.  blahblah" > note that there are two spaces before blahblah); if you have the punctuation entered by the document's author, then the extra space appears before that punctuation (e.g. "2 . blahblah").

Does this clarify the issue?
Comment 13 Thomas Lendo 2018-09-07 17:37:28 UTC
(In reply to Cor Nouws from comment #11)
> @thomas: as far as I see, the space only is added after the second chapter
> number in the line, and only added once, not repeatedly?
> So update summary of this issue?
For, I see this extra space in every TOC line, not only once and not only after the second chapter. Therefore the summary is still valid.
Comment 14 Yvan Rose 2019-01-13 14:12:12 UTC Comment hidden (no-value)
Comment 15 Yvan Rose 2019-04-04 12:08:16 UTC
I just did some check with LO The same problem is there.
Comment 16 Julius Becker 2019-04-27 14:38:09 UTC
In LO, this "bug" persists.

I do understand why the space after chapter number (E#) is default, but it should be possible to remove it. My document has three parts and every part has it's own paging. Due to the default space, it looks (A -1, A -2, ..., B -1, B -2, ..., C -1, C -2) not the way I want it to look (A-1, A-2, ..., B-1, B-2, ..., C-1, C-2).
Comment 17 Cor Nouws 2019-04-27 18:57:15 UTC Comment hidden (obsolete)
Comment 18 Cor Nouws 2019-04-27 19:24:43 UTC
Patch introducing the problem is this one

Note: before that patch, there was no space between the chapter number and the chapter text. Which is annoying and much more prevalent than the example of this bug. It was a problem in OOo already (and is in AOO)
See bug 44282

File with the code is here
Comment 19 Yvan Rose 2019-04-27 22:24:34 UTC Comment hidden (no-value)
Comment 20 Yvan Rose 2019-09-28 11:44:03 UTC Comment hidden (no-value)
Comment 21 Yvan Rose 2020-07-28 17:30:56 UTC Comment hidden (no-value)
Comment 22 phv 2021-12-23 14:38:33 UTC
*** Bug 145473 has been marked as a duplicate of this bug. ***
Comment 23 phv 2021-12-23 15:11:54 UTC
I therefore summarize the comments which converge in the same direction:
- The systematic addition of a space before the chapter number (E#) in the table of content (TOC) is criticized because this character disrupts entries list.
- It's a regression from a patch whose developer has not considered all potential downsides (#44282).
- Solutions exist such as consistently adding a tab (#32360) or a space that can be removed, before the chapter number and for all levels, in the Structure and Formatting tab.

It would be interesting to have the opinion of the team in charge of user interface on this matter.

Thank you!