Bug 134781 - Harmonize entries structure for index of tables and figures
Summary: Harmonize entries structure for index of tables and figures
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.4.2 release
Hardware: All All
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2020-07-13 12:23 UTC by ajlittoz
Modified: 2023-02-24 00:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ajlittoz 2020-07-13 12:23:54 UTC
It is possible to create a table/index of table, drawing, figures, … captions with Insert>TOC & Index>Toc, Index or Bibliography. When you are in the Type tab, you can choose a "Type:" from the drop-down menu.

"Table of Figures" will let you choose any defined "number range" (meaning you can add user-categories if not satisfied with the default factory list).

This creates a table similar to a TOC where entries are listed in document order. Entries can be fully customised, including adding back-hyperlinks with LS and LE markers.

But "Index of Tables" does seemingly the same think. Apart from the default heading, the result is strictly identical: the entries are in document order while the label would suggest that entries are listed in alphabetical order of their caption like in the case of "Alphabetical Index". The only difference is LS and LE markers cannot be used.

Either this is redundant and the "Index …" variant should be removed or this is a bug, the alphabetic order in the Index variant not being implemented.

Possible related bugs: bug 39904 bug 37608 and bug 71385

AskLO references:

https://ask.libreoffice.org/en/question/17622/hyperlinked-alphabetic-index/
https://ask.libreoffice.org/en/question/254919/table-of-contents-with-alphabetical-hyperlinks-in-lo-6073-writer/
Comment 1 Heiko Tietze 2020-07-14 13:10:20 UTC
You can customize the ToC. Delete items via FN+Back (on macOS) or likely just delete on Windows/Linux. Or add more entries with the buttons below. Click Hyperlink for the LS/LE entries. See also file:///Applications/LibreOffice.app/Contents/Resources/help/en-US/text/swriter/01/04120225.html?&DbPAR=WRITER&System=MAC

=> WFM, please reopen if you think it's not.
Comment 2 ajlittoz 2020-07-14 17:24:39 UTC
@Heiko Tietze: I think there is a misunderstanding about this bug report.

It is not a matter of customising the ToC or not (I know how to do that and it works like a charm).

The Type tab of the ToC dialog offers two overlapping ways of constructing a table of figures (or other objects captioned with a number range), namely:
- type "Table of Figures"
- type "Index of Tables"

Though the result is strictly the same (as long as you don't request hyperlinks), it is confusing to access the (nearly) same functionality through two menu items of the same menu.

It may be that "Table of Figures" resulted from the addition of hyperlinks which where not allowed in this type of table in previous (how old?) versions.

To add to the confusion,

- "Table of Figures" implies that entries are ordered in document order (like a ToC),
- while "Index of Tables" implicitly suggests according to word "Index" that entries are ordered alphabetically, which they are not.

"Index of Tables" offers the same customisation possibilities as "Alphabetical Index", i.e. hyperlinks are absent. This makes sense with an alphabetical index because identical keys are merged and you cannot assign a unique return hyperlink to several destinations.

IMHO, either "Index of Tables" should be deleted because it (poorly) duplicates "Table of  Figures", or it should be modified so that entries are ordered alphabetically (and perhaps merged on identical captions -- without numbering of course) like in "Alphabetical Index".
Comment 3 ajlittoz 2020-07-14 17:25:44 UTC
Setting to reopen to get feedback on my reply
Comment 4 Telesto 2020-07-14 18:11:20 UTC
(In reply to ajlittoz from comment #3)
> Setting to reopen to get feedback on my reply

Lets set it to UNCONFIRMED. REOPENED is bit of thing around here
Comment 5 Heiko Tietze 2020-07-15 09:11:16 UTC
(In reply to ajlittoz from comment #2)
> The Type tab of the ToC dialog offers two overlapping ways...

ToF creates a table of figures and ToT for tables, not overlapping.
Is your request to make the configuration of entries the same?
Comment 6 ajlittoz 2020-07-16 08:09:18 UTC
(In reply to Heiko Tietze from comment #5)
> ToF creates a table of figures and ToT for tables, not overlapping.
> Is your request to make the configuration of entries the same?
Not at all, it is UI clarification one.

When you select Table of Figures, it presets "Table of Figures" in the Title field and pre-selects "Figure" in the Category menu. With Index of Tables, Title is set as "Index of Tables" and Category to "Table".

A secondary difference appears in the Entries tab: ToF offers the LS and LE markers while IoT does not.

Apart from the preselection, the options in the dialog are rigorously the same and the result is the same. Accessing the same output through two different menu items is disturbing.

If you select another Type from the menu, the options shown in the dialog are really different.

I suspect the existence of two menu items in Type comes from a time when there were perhaps no Category choice and the user could only have Figures and Tables. Nowadays, you can have as many categories you like and the Category menu is the tool to choose one (a number range).

There is no point keeping two accesses for building the list unless they produce different "lists". If the reason is to provide a default Title, the same can be achieved by modifying Title when a different Category is chosen (beware however if user has already manually changed Title and also in languages where singular/plural forms are not "simple").

If there is an intent behind the use of Table/Index as might be suggested by the disabling of LS/LE when word "Index" is used (unless it was done only to avoid "Table of Tables"), it should be visible in the output, i.e. document order as in ToC or alphabetical order as in Alphabetical Index.

Maybe my point is difficult to understand because Type menu item like "Table of Figures" is really simple and direct, making think that everything is already set and you only need to press OK. Perhaps, something like "Tables of Figures, Illustrations, …" taking the first two Categories and adding an ellipsis could help to make clear this menu setting is only a step in creating the table.

And most important if the "Index of Tables" (in its present form) is deleted, it would avoid "surprises" when user sees that the return hyperlink to the table is missing, needing to regenerate the list of tables with so-called "Table of Figures".

My preference is to have a "Table of Figures, Illustrations, …" AND an "Index of Tables, Illustrations, …" (note that the menu item differs only in Table/Index to emphasise the difference in sort order) but presently the Index order is not implemented.

Consequently, I deem more consistent to ask for deletion of "Index of Tables" as it creates ambiguity and confusion.
Comment 7 Heiko Tietze 2020-07-16 09:26:07 UTC
(In reply to ajlittoz from comment #6)
> When you select Table of Figures, it presets "Table of Figures" in the Title
> field and pre-selects "Figure" in the Category menu. With Index of Tables,
> Title is set as "Index of Tables" and Category to "Table".

What's wrong with that? Do you expect tables to be listed under figures, or the like?

> A secondary difference appears in the Entries tab: ToF offers the LS and LE
> markers while IoT does not.

What's wrong with that? Do you expect the same configuration?

> Apart from the preselection, the options in the dialog are rigorously the
> same and the result is the same. Accessing the same output through two
> different menu items is disturbing.

The use case is to create _different_ ToC for tables and figures. Works perfectly for me. If you want both in one ToC select user-defined and check below what to include.

> My preference is to have a "Table of Figures, Illustrations, …" AND an
> "Index of Tables, Illustrations, …"...

Disagree with tables and figures in one index. But please excuse my non-native speaker ignorance: What is the difference between figures and illustrations?
Comment 8 ajlittoz 2020-07-16 10:29:10 UTC
(In reply to Heiko Tietze from comment #7)
> (In reply to ajlittoz from comment #6)
> > When you select Table of Figures, it presets "Table of Figures" in the Title
> > field and pre-selects "Figure" in the Category menu. With Index of Tables,
> > Title is set as "Index of Tables" and Category to "Table".
> 
> What's wrong with that? Do you expect tables to be listed under figures, or
> the like?
Not at all. My point was only to say that selecting a Type presets options states in other UI widgets. ToF and IoT give different settings. I don't request tables to be listed under figures. If you want to do that (if any), select Type ToF and set Category to Table. Criss-cross but some may have a taste for it.
> 
> > A secondary difference appears in the Entries tab: ToF offers the LS and LE
> > markers while IoT does not.
> 
> What's wrong with that? Do you expect the same configuration?
Yes, and this is where it is wrong. Since the output is the same, the settings should be the same. I suppose table building ends up in the same piece of code. Then it should be triggered by only one entry point.
> 
> > Apart from the preselection, the options in the dialog are rigorously the
> > same and the result is the same. Accessing the same output through two
> > different menu items is disturbing.
> 
> The use case is to create _different_ ToC for tables and figures. Works
> perfectly for me. If you want both in one ToC select user-defined and check
> below what to include.
I never asked for merging tables and figures in the same list. This is meaningless and probably results in a mess.
> 
> > My preference is to have a "Table of Figures, Illustrations, …" AND an
> > "Index of Tables, Illustrations, …"...
> 
> Disagree with tables and figures in one index. But please excuse my
> non-native speaker ignorance: What is the difference between figures and
> illustrations?
I am also not a native-speaker, this may be the cause of the difficulty to precisely address the point.

"Figure" and "Illustration" are the first two categories in the Category drop-down menu. The others are Table, Text, Drawing. Maybe Figure is listed first because it is preselected. "built-in" order seems to be Illustration, Table, Text, Drawing, Figure. These are the name of the built-in number ranges used to caption inserted "objects".

There is no inherent semantic difference between figure, illustration or picture. The used word depends on the document. It is a user choice for the list name under which the captions are collected.

Once again I don't want tables and figures in one index.

The wording in the Type drop down menu is misleading: "Table of Figures" and "Index of Tables" allow you to do the SAME thing, provided the set correctly the other options, under two different menu items. And as I already argumented, using word "Table" in the first and "Index" in the second suggests the output is different. Namely, if you select "Table", you get a list in document order (present result). If you select "Index of Tables", you expect the list in alphabetical order of captions, which is not the case. You simply get the same list as if you had selected "Table of Figures" with the needed adjustments in "Category" menu.

This is a UI issue. There is no bug (apart from the suppression of LS/LE in Index of Tables Entries tab).

Then, either "Index of Tables" is removed with no impact for users apart from adjusting the Category menu choice when creating a table. Anyway, users most of the time enter a more specific text in Title to fit their document. So they almost always do customise the settings in this control dialog.

Or the code for producing "Index of Tables" is patched to deliver a table in alphabetical order (and this becomes consistent with wording "Index of …" and the lack of LS/LE in Entries). This means that building the "index" uses the same code as Alphabetical Index, instead of the code for producing a ToC.
Comment 9 Mike Kaganski 2020-07-16 12:46:35 UTC
TLDR; the two entries in their first and default mode (Captions) are identical, except for a pre-selection from *numbering range* list. It actually asks for a change.

These two two entries in the "Type" selector, namely "Table of Figures" and "Index of Tables", allow two modes of operation (selected using "Create From"): "Captions" and "Object names". These two modes are quite different. In the second mode ("Object names"), the tool actually looks for objects of related category in the document. This mode justifies the distinction between these two entries in the list.

But the first operation mode (Captions) seems to make no sense when incorporated as a mode in these two entries, and instead looks natural to be separated into own new entry, like "Table of numbering category" (or somesuch), which would simply allow the user to choose any of existing numbering ranges (also Illustrations or Drawings pre-existing, or just anything that user may create using Insert->Field->More Fields->Variables->Number range, and which already appears there in the ToX dialog's Category list).

So currently, if I want to create "Table of Illustrations" or Table of Drawings or Table of Lists (if I decide to make such a number range) ..., I have to open the dialog, and start from either one of these two elements (Table of Figures or Index of Tables, doesn't matter), use the "Captions" mode, and then modify the Category and all. It's not that obvious, and looks like a hack. An own mode, dedicated to list the number range elements seems a good option, at the same time simplifying the UI for the two modes in question.

A question whether some/all modes should provide an option to make alphabetical lists with grouping is a separate IMO, and should not be considered along with this one in the same issue.

Also a question about having hyperlinks for table lists by default is a separate, with no clear reason not to have them.
Comment 10 Mike Kaganski 2020-07-16 13:02:39 UTC
(In reply to Mike Kaganski from comment #9)
> But the first operation mode (Captions) ... looks natural to be
> separated into own new entry, like "Table of numbering category" (or
> somesuch), which would simply allow the user to choose any of existing
> numbering ranges (also Illustrations or Drawings pre-existing, or just
> anything that user may create using Insert->Field->More
> Fields->Variables->Number range, and which already appears there in the ToX
> dialog's Category list).

Or maybe instead moved into the existing "User-defined" type, as additional checkbox "[x] Category (number range):" plus the Category and Display list boxes.
Comment 11 Mike Kaganski 2020-07-16 13:19:03 UTC
(In reply to Mike Kaganski from comment #9)
> In the second mode ("Object names"), the tool actually looks for objects of
> related category in the document. This mode justifies the distinction
> between these two entries in the list.

And maybe I'd even removed these two entries completely, and moved their second "Object names" modes into existing "Index of Objects", to the list that has all these "LibreOffice Math/Clac/..." and other OLE things. That they are OLE things is just an implementation detail; from user PoV, a Math Formula in the text document is something of the same level as a table or an image.
Comment 12 ajlittoz 2020-07-16 18:59:16 UTC
(In reply to Mike Kaganski from comment #9)
> An own mode, dedicated to list the number range elements seems
> a good option, at the same time simplifying the UI for the two modes in
> question.
> 
> A question whether some/all modes should provide an option to make
> alphabetical lists with grouping is a separate IMO, and should not be
> considered along with this one in the same issue.
> 
> Also a question about having hyperlinks for table lists by default is a
> separate, with no clear reason not to have them.

Excellent conclusion, three separate issues.

The second one may wait because it does not exist today and nobody will feel frustrated as they did without till now.

The third one is a mystery but the workaround if to use "Table of Figures" for hyperlinks and "Index of Tables" if they are not needed. Anyway, you can also modify the Structure line (removing LS/LE in "Table …" or adding them in "Index …" because the button is present.
Comment 13 ajlittoz 2020-07-16 19:10:58 UTC
(In reply to Mike Kaganski from comment #10)
> Or maybe instead moved into the existing "User-defined" type, as additional
> checkbox "[x] Category (number range):" plus the Category and Display list
> boxes.

I've seldom used "User-Defined". Apart from "Styles" and "Index marks" options, it looks like the other possibilities are related to what we can see in the Navigator. They allow to finely select the Tables, Frames, OLE Objects. I don't know how to understand Graphics: does this map to Images and Drawing objects in the Navigator?

This interrogation of mine shows it is not clear.

There may be an overlap with the Object mode of "Table of Figures"/"Index of Tables". Once again, I haven't experimented but it is likely that this object mode will end up with all the named objects of the Navigator. Therefore, the "User-Defined" is likely to be preferable to "Tables …"/"Index …" for fine-grain control.

As a "simple" user, I prefer several "Type" selection covering targeted purposes (table of X) rather than a catch-all User-Defined with too many checkboxes, resulting in visual clutter and possibly difficulty to understand what to check to get the desired result.
Comment 14 Heiko Tietze 2020-07-17 10:18:20 UTC
Let's keep one topic per ticket, the request here is to have the same configuration of entries for table of figures and index of tables. Don't see much benefit beyond consistency which is a goal per se. So +1.

> The wording in the Type drop down menu is misleading: "Table of Figures" and 
> "Index of Tables" allow you to do the SAME thing...
>... using word "Table" in the first and "Index" in the second suggests the 
> output is different. 

I disagree here. "Table of tables" does not easily roll off the tongue and I don't see any misleading aspect in the name "Index of Tables". Plus, localizations might change the term. So -1.
Comment 15 Heiko Tietze 2020-07-17 10:23:23 UTC
Could be an easy hack but this LS/LE/S/T defaults are buried under a lot of spaghetti.
Comment 16 ajlittoz 2020-07-17 13:20:08 UTC
My immediate purpose is that both menu choices do exactly the same thing so that one may be eliminated.

I suggest to drop "Index of Tables" because it has no default hyperlink while it is present in "Table of Figures".

I checked that, once you have manually entered a title, another choice in the Category menu does not erase the manual title.

Out of curiosity: are both menu choices handled by the same code? I mean when generating the table/index, not when processing the UI.
Comment 17 QA Administrators 2022-10-20 03:43:54 UTC Comment hidden (obsolete)
Comment 18 ajlittoz 2022-10-20 09:03:07 UTC
Issue still present since no conclusion has been drawn
Comment 19 sdc.blanco 2023-02-23 21:49:58 UTC
(In reply to Mike Kaganski from comment #9)
> question about having hyperlinks for table lists by default is a
> separate, with no clear reason not to have them.
I believe the reason (for now) might be bug 37608.
Comment 20 sdc.blanco 2023-02-24 00:01:49 UTC
(In reply to Heiko Tietze from comment #14)
> Let's keep one topic per ticket, the request here is to have the same
> configuration of entries for table of figures and index of tables. Don't see
> much benefit beyond consistency which is a goal per se. So +1.
I do not think that this statement summarizes the request accurately.

Rather -- "Index of Tables" and "Table of Figures" provide the same (identical) interface and functional possibilities (with the one minor difference that the former preselects "Table" for the Category, while the latter preselects "Figure").  (ignoring the "from objects" part for now)

=>  Why keep the same functionality in an already complicated interface?
Comment 21 sdc.blanco 2023-02-24 00:10:03 UTC
Producing comment 20 inspired further reflection about the (complicated) structure of the Insert Index dialog.

I notice: 

(a) The User-defined,  "Create From" section allows indices from Tables, Graphics, Text Frames and OLE Objects.  These options are functionally equivalent to selecting "Object Names" in Table of Figures, Index of Tables, and the checkboxes in Table of Objects.

(b) afaict (have not tested systematically), the "Styles" and "Index Marks" options in "Create From" for "User-defined" replicates the same functions offered in "Table of Contents"

This suggests the following two-step process for an Insert Dialog.

1. Opening the Insert Index dialog gives 5 radio buttons:

( ) Paragraph Styles and Index Marks 

    (Use for Table of Contents and User-defined Indexes)

( ) Caption Categories

    (Use for Table of Figures and Table Index)

( ) Objects

( ) Alphabetical Index

( ) Bibliography


B. After selecting one of these radio buttons.

(alphabetical Index and Bibliography would then appear as they currently do with the dropdown menu)

If "Objects" is selected, then all the checkboxes from the right side of User-defined and the checkboxes in OLE Objects would appear.

If "Caption Categories" is selected, then "Category" dropdown box appears (or even more flexible, a set of checkboxes corresponding to all category names)
(along with additional styles)

If "Paragraph Styles and Index Marks" is checked, then the choices are:

[ ] Headings
[ ] Styles  
[ ] Index Marks


Comments:
1. Have focused on functionality here (not label choices).
2. The important point is: this structure will allow you to produce all the indices that can be produced with the current (complicated) interface, and does not mix up different possibilities (objects and styles) in the same dialog.
3. I put the parenthetical comments about which choice to use for which purpose as a quick-and-dirty way to illustrate how one could "guide" users toward what to choose (given that the dialog box has lots of room).

Not necessarily trying to promote this design -- but I believe it (a) gives a  comprehensive overview of the functional capabilities/possibilities in the current interface, and (b) highlights a number of overlaps/redundancies between different types, which might help think further about improving the UI/UX.

Add salt and pepper to taste...
Comment 22 sdc.blanco 2023-02-24 00:18:04 UTC
NB. User-defined is intentionally not included in comment 21 as a kind of index.
Rather, as the structure in comment 21 shows, all the indices are "user-defined", where the structure in comment 21 gives the "elements" from which an index is defined.  It would be easy enough to make some guide pages in help (could also be tooltip or extended tip).

To Make TOC
---------------
1. Select Paragraph Styles and Index Marks
2. Select Headings.
3  Press OK. 
4. Use Entries and Styles tab to modify appearance of result.

Again, not advocating this solution. Just trying to show some potentially useful possibilities.