Bug 143536 - Index (alphabetical): tab fill and other characters should be omitted if index entry has no associated page numbers
Summary: Index (alphabetical): tab fill and other characters should be omitted if inde...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2021-07-25 13:07 UTC by R. Green
Modified: 2023-11-08 15:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of part of an alphabetical index (16.99 KB, image/png)
2021-07-25 13:07 UTC, R. Green
Details
Writer file with Index showing tab fill characters (49.60 KB, application/vnd.oasis.opendocument.text)
2021-08-10 10:00 UTC, R. Green
Details
Image showing spurious comma at end of blank index entry (4.90 KB, image/png)
2023-11-08 15:36 UTC, R. Green
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R. Green 2021-07-25 13:07:30 UTC
Created attachment 173836 [details]
Screenshot of part of an alphabetical index

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

The attached screenshot shows part of the alphabetical index of a book.

Note that "Socialism" is the Level 1 entry. In this case it has NO numbered entries: these are not required as the latter are associated with the sublevels instead (a fairly common occurrence in book indexes).

However, there is a problem if the user specifies a character fill (such as full stops / periods) in the TAB area before the page number. The user only needs the fill characters to be displayed if there are page numbers following; if there are NO page numbers following (as in the attached example, "Socialism") then the fill character area should be left blank.

SUGGESTION: If an alphabetical index entry has no page numbers associated with it, any TAB fill characters should be ommitted.
Comment 1 Dieter 2021-08-10 06:38:30 UTC
I can't confirm the problem with

Version: 7.2.0.1 (x64) / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

In the index dialog, you can delete the tab or only the filling characters. Please specify the problem and add a sample document.
=> NEEDINFO
Comment 2 R. Green 2021-08-10 10:00:21 UTC
Created attachment 174176 [details]
Writer file with Index showing tab fill characters

See the attached Writer file ("index_fill_characters"). Look at the (partial) alphabetical index at the end.

Notice that top-level entries, without subentries, like "Baxter (clergyman)", "Cambridge", and "Rupert, Prince" contain tab fill characters followed by page number(s). In these cases the use of tab fill characters may be desirable.

However the entry "Charles, King" is different. It consists of a top-level entry with no associated page numbers, the latter, instead, being allocated to the secondary entries below. In this case the tab fill characters after "Charles, King" serve no purpose except to obscure the structure of the index somewhat.

(Of course, in many cases this top level entry would not be empty and then tab fill characters may, or may not, be desirable.)

In any case, it's a good  idea to give the user the option to hide the fill characters if there is no page number following the entry.
Comment 3 Dieter 2021-08-10 10:51:04 UTC
Thank you for the sample document. I confirm it with

Version: 7.2.0.1 (x64) / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

So steps to reproduce might be:

1. Open attacment 174176
2. Mark a word.
3. Insert => TOC and Index => Inex Entry
4. Insert a word as 1st Key, that is not in the document => Press "Insert" and close
5. Update Alphabetical index

I think we don't need an option, but (as you suggested) a solution with no tab, if there is no page number.

cc: Design-Team for input and decision about the best solution.
Comment 4 Heiko Tietze 2021-08-11 08:31:26 UTC
You can omit the page number in indices but keep the tabs (Entries: E#-E-T). But this entry still would have a page number and I agree, if this association is not given we better hide the filling. No option needed.
Comment 5 R. Green 2023-11-08 13:24:54 UTC
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 2; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded

This bug is effectively a blocker for this type of index. To see the difference it makes go to the Sibelius manual:

https://www.sibelius.com/helpcenter/updates/Sibelius%20First%20User%20Guide.pdf

Look at the index at the back and note that there are no fill characters where the index entry is blank.
Comment 6 R. Green 2023-11-08 15:36:34 UTC
Created attachment 190729 [details]
Image showing spurious comma at end of blank index entry

This fix should also ensure that other characters, apart from the tab fill, are also removed when there is no associated page number – such as the commas that go between page numbers.

This is to stop the occurence of a comma, for example, appearing at the end of an entry with no page number – see the attached image.