Bug 141651 - INDEX: Table of Figures Hyperlink points to reference in caption, should point to object (see comment 16)
Summary: INDEX: Table of Figures Hyperlink points to reference in caption, should poin...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2021-04-12 15:50 UTC by demo4
Modified: 2022-10-28 06:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
index (112.03 KB, application/vnd.oasis.opendocument.text)
2021-05-09 15:26 UTC, Dieter
Details
Example with index and cross-reference (112.85 KB, application/vnd.oasis.opendocument.text)
2021-05-10 08:35 UTC, Dieter
Details
Example with caption separated from image (73.02 KB, application/vnd.oasis.opendocument.text)
2021-05-25 09:32 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description demo4 2021-04-12 15:50:03 UTC
Description:
The references in the table of figures (and in all other indexes as well, like index of tables) link to the caption. It would be nice if they could link to the picture or the frame, so that you can see the picture when you follow the link.

Same behavior in PDF export, but this is probably the result of the IMO misplaced jump label in the LO document. 

Steps to Reproduce:
1. Create LO Writer document with 4 pages through pages breaks
2. Insert (drag'n'drop) images to pages 2, 3 and 4
3. Insert Captions through the context menu for every image with 'Categoriy: Figure'
4. Insert 'Table of Contents, Index or Bibliography' and select 'Type: Table of Figures'

Actual Results:
When you ctrl+click on one element in the listing (follow the hyperlink), LO jumps to the beginning of the caption.

Expected Results:
LO should follow to the parent frame, so that you can see the image 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 1 Dieter 2021-04-27 15:13:48 UTC
I confirm the described behaviour with

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

Additional information:
If you choose "Create from Objects" in the type tab you get the desired result

Let's decide design team, if an improvement is useful here.
cc: Design-Team
Comment 2 Heiko Tietze 2021-04-28 09:46:57 UTC
This is not going to fly. ToC are references to fields and you can use image, picture, figure or any other term. Even mixed. And the reference is not the frame but this field. Secondly, there is no need to have a frame at all. Copy/paste the image in a table and move the caption to the cell at right, for example. And last but not least, this behavior is quite common. MSO does also jump to the caption and not top of the image. Bad argument but the first two are striking to resolve as WF.
Comment 3 Dieter 2021-04-28 11:19:58 UTC
Heiko, you're the expert of course, but how do you explain the different behaviour, if you choose "Create from Captions" or "Create from Object Names"? I would expect, that thisonly affects the entry in the index, but not the target of the hyperlink.
Comment 4 Heiko Tietze 2021-05-04 17:14:43 UTC
(In reply to Dieter from comment #3)
> Heiko, you're the expert of course, but how do you explain the different
> behaviour, if you choose "Create from Captions" or "Create from Object
> Names"? I would expect, that thisonly affects the entry in the index, but
> not the target of the hyperlink.

Isn't it perfectly clear that Captions points to the label and Object names to the object itself? What should we change?
Comment 5 Dieter 2021-05-09 15:26:40 UTC
Created attachment 171798 [details]
index

(In reply to Heiko Tietze from comment #4)
>Isn't it perfectly clear that Captions points to the label and Object names
> to the object itself? What should we change?

For me it is clear that "Create from Captions" should be understood as "Create entry in index from Captions" and "Create from Object Names" should be understood as "Create entry in index from Object Names". I hope yo agree.
So I wouldn't expect, that the options also determine the target of the hyperlink. And I hope you agree, that - if you have an image or an table with caption below - the user won't expect to see only the caption, but not the table or the image itself, if he clicks within the index. (see attached example)
Comment 6 Heiko Tietze 2021-05-10 07:12:59 UTC
(In reply to Dieter from comment #5)
> For me it is clear that "Create from Captions" should be understood as
> "Create entry in index from Captions" and "Create from Object Names" should
> be understood as "Create entry in index from Object Names". I hope yo agree.
Absolutely

> So I wouldn't expect, that the options also determine the target of the
> hyperlink. 
Me not; one target is the caption the other the object (name). 

> And I hope you agree, that - if you have an image or an table
> with caption below - the user won't expect to see only the caption, but not
> the table or the image itself, if he clicks within the index. 
In other words you would always target the object itself. But caption and object don't need to stick together, a common scenario is when you place two images next to each other and one caption below; all placed as character in a table. And while I see the point of showing the actual object rather than the caption I'm afraid of side-effects. What should happen if the object is removed but the caption remains in the document - which is possible after de-framing. There is just no unique link between caption and object.
Comment 7 Dieter 2021-05-10 07:35:46 UTC
(In reply to Heiko Tietze from comment #6)
> (In reply to Dieter from comment #5)
> > For me it is clear that "Create from Captions" should be understood as
> > "Create entry in index from Captions" and "Create from Object Names" should
> > be understood as "Create entry in index from Object Names". I hope yo agree.
> Absolutely
> 
> > So I wouldn't expect, that the options also determine the target of the
> > hyperlink. 
> Me not; one target is the caption the other the object (name).

So we have different opinions. Help only says: "Create from: Use this area to specify which information to include in an index." https://help.libreoffice.org/7.2/en-GB/text/swriter/01/04120211.html?System=WIN&DbPAR=WRITER&HID=modules/swriter/ui/tocindexpage/TocIndexPage#bm_id3145247
 
> > And I hope you agree, that - if you have an image or an table
> > with caption below - the user won't expect to see only the caption, but not
> > the table or the image itself, if he clicks within the index. 
> In other words you would always target the object itself.
Yes, because we have an index of figures or an index of tables and not in index of captures ;-)

> But caption and
> object don't need to stick together, a common scenario is when you place two
> images next to each other and one caption below; all placed as character in
> a table.
I see your point, but I can't say if this is common or not (can't remember, that I have seen it)

> And while I see the point of showing the actual object rather than
> the caption I'm afraid of side-effects. What should happen if the object is
> removed but the caption remains in the document
I think we shouldn't take into account every "mistake" a user can make.

But we don't have to into a deeper discussion here. Now I know, that you understand my POV. and it's of course up to you or the design-team to decide.
Comment 8 Heiko Tietze 2021-05-10 08:28:25 UTC
(In reply to Dieter from comment #7)
> But we don't have to into a deeper discussion here. Now I know, that you
> understand my POV. and it's of course up to you or the design-team to decide.

It's always us, the community, who makes the call. If you think this needs a closer look or my POV is wrong, just reopen.
Comment 9 Dieter 2021-05-10 08:35:26 UTC
Created attachment 171813 [details]
Example with index and cross-reference

Just made some further testing with a cross-reference (see attachment). Focus is in caption, but at least part of the image is visible. So it should be possible to get the same result with an index entry. So I change status back to UNCONFIRMED.
Comment 10 Heiko Tietze 2021-05-25 09:32:16 UTC
Created attachment 172317 [details]
Example with caption separated from image

My argument: The caption is just a field and can be anywhere.
Comment 11 demo4 2021-05-25 16:10:17 UTC
> The caption is just a field and can be anywhere.
Correct. Regarding this it makes sense that the ToF points to the caption. That, especially considering the background of when you follow the reference to change the caption. 

> So it should be possible to get the same result with an index entry
How it is possible? In order for an index to point to a picture, "Create from object names" must be selected. In my opinion, this is not a real alternative, because the object name does not match the caption. In addition, this only works with some predefined index-types (Table of Figures, Index of Tables).
Comment 12 Dieter 2021-05-25 16:54:25 UTC
(In reply to demo4 from comment #11)
> > So it should be possible to get the same result with an index entry
> How it is possible?

Sorry, perhaps my comment was not correct enough. "It should be possible to get the same result" = It should be possible for a developer to change behaviour of link from Table of Figure that it behaves like link from a cross reference
Comment 13 Heiko Tietze 2021-06-03 12:48:10 UTC
Making the ToF cross-reference-like sounds like over-engineering to me. And we have the Display option right now, plus the radio buttons in discussion. But maybe we can improve the situation with a better naming like "Create From" -> "Reference to" and "Object names" -> "Figure"/"Table"/etc.

Had this topic on the agenda for the design meeting but no further input. So removing the keyword but keeping the ticket.
Comment 14 Dieter 2022-08-19 14:58:59 UTC
(In reply to Heiko Tietze from comment #13)
> Had this topic on the agenda for the design meeting but no further input. So
> removing the keyword but keeping the ticket.

Heiko, so who can decide, that enhancement request is accepted?
Comment 15 Heiko Tietze 2022-08-19 17:09:28 UTC
(In reply to Dieter from comment #14)
> Heiko, so who can decide, that enhancement request is accepted?

Since we have different opinions you can set it to New or follow my take and go with WF. Or keep in this state until someone has further arguments.
Comment 16 Dieter 2022-10-28 06:37:22 UTC
First I thought it might be sufficient to add a short information to help page. But help page for indexes needs some improvement (it is more or less related to TOC and doesn't include relevant informations for different indexes.

So I change status to NEW.

So steps in sum
1. Create a document with some images and captures
2. Create a table fo figures and choose "Create From Captions" in Type tab
3. Create a second table of figures and choose "Create From Object Names" in Type tab
4. Click in entries of the two indexes and see different results

Actual result
Target of entries in first ToF is the reference in caption
Target of entries in second ToF is the image

Expected result
Target should be always the option (because you only choose "Create From")