Bug 130003 - Alphabetical Index: make it easier to index entries over multiple ranges of pages
Summary: Alphabetical Index: make it easier to index entries over multiple ranges of p...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2020-01-14 18:46 UTC by R. Green
Modified: 2021-01-20 22:37 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example dummy text with an index (21.94 KB, application/vnd.oasis.opendocument.text)
2020-01-16 15:18 UTC, Heiko Tietze
Details
Writer file with an index entry over a large page range (16.72 KB, application/vnd.oasis.opendocument.text)
2020-01-20 19:40 UTC, R. Green
Details

Note You need to log in before you can comment on or make changes to this bug.
Description R. Green 2020-01-14 18:46:12 UTC
THE PROBLEM

Currently, in order to create a page range for an entry term in an alphabetical index (e.g. Pitt, William 121-130), you have to highlight an entry term on EACH page of the range. This is tolerable for ranges of a few pages, but for longer ranges it is tedious and time-consuming; it also clutters up the text with index marks.

THE SOLUTION

Amend the procedure so that only the first and last pages of the entry term range needs to be indexed. The procedure might be as follows:

1. The "Insert Index Entry" dialogue should be open.
2. Highlight the entry term at the START of the desired page range. 
3. Tick "Start Range" (a new check-box in the "Insert Index Entry" dialogue). Update entry and amend it, if required, then INSERT.
4. Highlight the entry term at the END of the desired page range.
5. Tick "End Range" (a new check-box in the "Insert Index Entry" dialogue). Update entry and amend it, if required, then INSERT.
Comment 1 Heiko Tietze 2020-01-15 13:41:35 UTC
Regina, is that possible with current ODF?
Comment 2 Heiko Tietze 2020-01-16 15:18:34 UTC
Created attachment 157192 [details]
Example dummy text with an index

Reading the request again I wonder what exactly you do and what you want to achieve. In the example, I added the dummy text (dt+f3), changed the first He into John, copied everything a couple of times, and used the Insert > ToC > Index Entry dialog to tag all John per checking "Apply to all similar texts". The index shows now "John... 1ff" or "John 1f, 4,5" depending on the page height.

What I understand is that you want John on pages 10-20 of a larger document tpo be shown in an index. Or do you want ff (has been replaced recently by pp, btw.) to be replaced by 1-x?
Comment 3 R. Green 2020-01-17 20:21:12 UTC
To clarify:

All that is changing is the WAY that index terms are added. The options in "TOC … > Type" remain as before: i.e. to display the index in page numbers, page ranges, or f. (two consecutive pages) and ff (more than 2 consecutive pages).

At present to index a range like 10-20 you have to find an entry term for each page in the range! With the new method, you only need to index the first and last pages.
Comment 4 Heiko Tietze 2020-01-20 08:17:50 UTC
(In reply to R. Green from comment #3)
> All that is changing is the WAY that index terms are added.
> ...
> At present to index a range like 10-20 you have to find an entry term for
> each page in the range! With the new method, you only need to index the
> first and last pages.

Please elaborate on the use case. If "John Doe" is mentioned on p1 why not adding this to the alphabetical index? At least this is what I understand from "create a ToC for a range of pages".
Comment 5 R. Green 2020-01-20 19:40:36 UTC
Created attachment 157275 [details]
Writer file with an index entry over a large page range

I'll start again with another example.

1. Open the attached writer file.
2. Inspect the alphabetical index at the end, and notice the entry:

Doe, John .................. 1-10

This has been created by highlighting a target phrase on EVERY page from 1-10. Now imagine a new feature in which you could create the same alpha-index entry by highlighting a target phrase on page 1 and page 10 ONLY—no need to bother with intervening pages. This would obviously save time and reduce the number of index marks in the text.

BTW, this only applies if "Combine with -" is checked in the "Type." It wouldn't affect the display if "Combine identical entries with f./ff." were checked.
Comment 6 R. Green 2020-01-20 19:51:25 UTC
P.S. If "Combine identical entries with f./ff." were checked, the program would, instead, check the "Start range" number and the "End range" number and adjust the display accordingly. i.e.

Doe, John .......... 1-2 becomes Doe, John ............. 1f.
Doe, John .......... 1-3 becomes Doe, John ............. 1ff.
Doe, John .......... 1-5 becomes Doe, John ............. 1ff.

and so on.
Comment 7 QA Administrators 2020-01-21 03:33:32 UTC Comment hidden (obsolete)
Comment 8 Dieter 2020-01-21 07:47:34 UTC
I'm not sure, if I understand it correct, but I think your idea is not about displaying 1-10 of 1ff., but the way to create an index entry for the case, that a topic is across several pages, but the topic itself (here "John") doesn't appear on every page. In this case it would be nice to mark beginning and end of the topic, that is discussed in the text. Am I right?
Comment 9 Heiko Tietze 2020-01-21 13:51:50 UTC
(In reply to Dieter Praas from comment #8)
> mark beginning and end of the topic, that is discussed in the text.

But if so, why? What's wrong with "1-3,5" in my example, is there any standard that defines the index to show start and end instead the actual page, and wouldn't this contradict the idea of an AI where you want to find the exact page?
Comment 10 Dieter 2020-01-21 14:59:41 UTC
(In reply to Heiko Tietze from comment #9)
> But if so, why? What's wrong with "1-3,5" in my example, is there any
> standard that defines the index to show start and end instead the actual
> page, and wouldn't this contradict the idea of an AI where you want to find
> the exact page?

I think the difference is
1-3,5 (= parts of text, where the word John appears)
1-5 (= part of text about John)
Comment 11 R. Green 2020-01-21 20:36:22 UTC
(In reply to Dieter Praas from comment #8)
> I'm not sure, if I understand it correct, but I think your idea is not about
> displaying 1-10 of 1ff., but the way to create an index entry for the case,
> that a topic is across several pages, but the topic itself (here "John")
> doesn't appear on every page. In this case it would be nice to mark
> beginning and end of the topic, that is discussed in the text. Am I right?

I think you've got it, more or less. Take this example from the Chicago Manual of style (https://www.press.uchicago.edu/Misc/Chicago/CHIIndexingComplete.pdf):

"World War I 34-61"

Such a big range would be tedious to index every page, but no problem if you only had to index the first and last page of the range.
Comment 12 Thomas Lendo 2020-01-21 22:38:27 UTC
Instead of changing the way to create a ToC, it would be easier to only have a checkbox in the ToC dialog for that.
Comment 13 Heiko Tietze 2020-01-22 09:25:59 UTC
(In reply to R. Green from comment #11)
> Such a big range would be tedious to index every page...

That's convincing. 

Like Thomas I'd suggest to enhance the ToC creation dialog and have

[ ] Combine identical entries
  (o) Use abbreviation, eg. 10ff.
  ( ) Use dash, eg. 10-13, 15
  ( ) Show first and last page, eg. 10-15
  [x] Case sensitive
 
Currently the ff and - options are mutually depending, you can check one only if the other is off but also both can be off. Guess we can use the parent "Combine" for this state and go with radio buttons.

Remaining question is whether such an index is possible at all. If we run into trouble with a round-trip to OOXML or ODF load/save with external programs, it requires enhancement of the format first.
Comment 14 R. Green 2020-01-22 14:27:34 UTC
(In reply to Heiko Tietze from comment #13)
> Like Thomas I'd suggest to enhance the ToC creation dialog and have
> 
> [ ] Combine identical entries
>   (o) Use abbreviation, eg. 10ff.
>   ( ) Use dash, eg. 10-13, 15
>   ( ) Show first and last page, eg. 10-15
>   [x] Case sensitive

There's a mistake in the wording here. Option 4 ("Show first and last page") indicates that EACH page in the range 10-15 is relevant to the entry. However, according to option 3 ("Use dash"), only 10-13 and 15 are relevant—page 14 contains no reference at all. Both can't be right.
Comment 15 Heiko Tietze 2020-01-22 14:31:04 UTC
(In reply to R. Green from comment #14)
> Option 4 ... indicates that EACH page in the range 10-15 is relevant
> However, according to option 3... Both can't be right.

The three options are radio buttons ( ), or (o) for selected, and mutually exclusive while the symbol for a checkbox is [ ] and [x].
The first checkbox "Combine identical..." enabled all indented controls below where the user can choose the type of listing.
Comment 16 Cor Nouws 2020-01-22 20:02:57 UTC
Sorry that I missed the UX meeting (violin lessons really are more important ;) )

Just a simple idea:
- Select range in document
- Ctrl+H
- <word>
- select all
- Insert > TOC and Index > Index Entry
- <word>
- OK...

I think that does work ..
Comment 17 R. Green 2020-01-24 12:08:42 UTC
> (In reply to Heiko Tietze from comment #13)
>   (o) Use abbreviation, eg. 10ff.
>   ( ) Use dash, eg. 10-13, 15
>   ( ) Show first and last page, eg. 10-15

If my understanding is correct, the options work as follows:

* "Use abbreviation, eg. 10ff.": This option will work the same as now. e.g. 1,2,3,4,5, makes 1ff.

* "Use dash, eg. 10-13, 15": This option will also work the same as now. The user has to mark EVERY page in an entry range. e.g. 1,2,3,4,5, makes 1-5.

* "Show first and last page, eg. 10-15" The user only has to mark the FIRST and LAST page of a range to make the hyphen show. e.g. 1,5, makes 1-5.

The last option will surely require a significant change to the codebase and some additonal options in the "Insert Index Entry" dialog in order to work.
Comment 18 Heiko Tietze 2020-01-24 13:36:06 UTC
(In reply to R. Green from comment #17)
> The last option will surely require ... some additonal options in the 
> "Insert Index Entry" dialog in order to work.

Not required IMHO, since you may a) insert first and last at the right position or b) just mark every occurrence. Today we get "1ff", with the new option it would be "1-10"; given there is at least one entry at p1 and p10.

All this requires to be covered by the open document format.
Comment 19 R. Green 2020-01-29 12:24:54 UTC
How would the new option cope with the following index entry, for example?

"Pitt, William 19-27, 33, 45-50".

To be clear, the new option would allow the user to create this entry by marking only the pages 19, 27, 33, 45, and 50. But how would the program know where to put the hyphens? After all, there are other possibilities: e.g. 19, 27-33, 45, 50 and so on.
Comment 20 Heiko Tietze 2020-01-30 16:01:56 UTC
(In reply to R. Green from comment #19)

> "Pitt, William 19-27, 33, 45-50".

First and last would be 19-50. Using the current implementation it was 19ff, 33, 45ff, I guess. If we want to make it working it requires an option "<5> Group consecutive pages" to combine n pages. And you set n=50, or higher, to get 19-50. But that's just an idea how the interaction could be.
Comment 21 sdc.blanco 2021-01-20 22:37:23 UTC
(In reply to Heiko Tietze from comment #13)
> Currently the ff and - options are mutually depending, you can check one
> only if the other is off but also both can be off. Guess we can use the
> parent "Combine" for this state and go with radio buttons.
The current dialog box should be changed to:

Combine identical entries with:  ( ) f or ff. ( ) - 
   [} case sensitive

The present interface is clumsy to use.  This change would also reduce clutter.

(was going to report this as a bug, but found this ticket.  
Should I file a separate ticket for this simple "repair", given than this ticket is for a bigger enhancement?)