Bug 81658 - Allow cross-references (with a field) to Tables without adding a caption with a frame (the need to do so, is the case with e.g. Images)
Summary: Allow cross-references (with a field) to Tables without adding a caption with...
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: Workaround: Comment 12 (end)
Keywords:
Depends on:
Blocks: Fields-Cross-Reference
  Show dependency treegraph
 
Reported: 2014-07-23 06:19 UTC by Kumāra
Modified: 2019-02-07 03:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document with an image, a table, and index of tables and images (74.38 KB, application/vnd.oasis.opendocument.text)
2017-04-05 12:05 UTC, Ulrich Windl
Details
Screenshot table of contents (60.67 KB, image/jpeg)
2017-04-10 09:57 UTC, Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kumāra 2014-07-23 06:19:36 UTC
Presently, Cross-references (Field) include Headings, Numbered Paragraphs, Bookmarks and Footnotes. I'd like to request adding Tables. Should be a fairly simple hack as Tables are already named.
Comment 1 Ulrich Windl 2016-08-25 09:03:45 UTC
(I thought this once worked already).
From the navigator you can add such a reference dragging the table into the text, but the text for the link is ugly (like "table3").
Comment 2 Ulrich Windl 2016-08-25 09:05:13 UTC
Comment #0 also lacks the fact that "images" is also present. It's hard to understand, why you can reference images, but not tables.
Comment 3 Dieter 2016-12-01 12:51:41 UTC
I think the option of using tables as a cross-reference is there. Steps to reproduce (with LO 5.2.3.3):

1. Open an new document

2. Insert an new table (Table => Insert table) and enable "headings" => Insert table

3. Insert => Cross-reference => You can choose the type "table"

I think it depends on creating a heading, because

4. Delate the heading of the table

5. Insert => Cross-reference => You can‘t choose the type "table"

I only got the solution, because in one of my documents I could choose table as a reference-style and within another document I couldn't. So I think it would be unseful to add this information in LO Help, because I could'nt find this information there (german version).
Comment 4 Dieter 2017-04-05 10:29:42 UTC
Sorry, I've forgotten an important step in my previous comment:

First you have to make sure, that captions are automatically added:
Tools -> Option -> LibreOffice Write -> AutoCaption -> Enable "Add captions automatically when inserting" for LibreOffice Writer table.

If you now insert a new table in your document, "table" as a type in your cross-reference dialog.

So my proposal is to close this bug as WORKSFORME and open another bug for Writer-Help so that somebody can add some informations about tables as a type of cross-reference in the help.
Comment 5 Ulrich Windl 2017-04-05 12:05:38 UTC
Created attachment 132351 [details]
Sample Document with an image, a table, and index of tables and images

(In reply to Ulrich Windl from comment #2)
> Comment #0 also lacks the fact that "images" is also present. It's hard to
> understand, why you can reference images, but not tables.

(In reply to dieterp from comment #4)
(...)
> First you have to make sure, that captions are automatically added:
(...)
> If you now insert a new table in your document, "table" as a type in your
> cross-reference dialog.
> 
> So my proposal is to close this bug as WORKSFORME and open another bug for
(...)

I strongly object: A table is a table even without a caption. You can even select between "References", "Category and Number" and "Caption Text". So only for the last one a caption should be (must?) present.

In the sample document both indexes (tables of images and tables) are empty, even though "Category and number" was selected. However Navigator shows both: "Table1" and "Image1".
Comment 6 Ulrich Windl 2017-04-05 12:11:01 UTC
Looking at the image in attachment 132351 [details], I noticed that "Create from" "Object Names" is unchecked: If I check that, I get an index for images and tables, but I cannot select what type of information I want (like for "Create from" "Captions"). That must be a bug: Why is the option "Captions", if it allows sub-options "References", "Category and Number", and "Caption Text"?
To me the first option "Create from" seems useless, because you could select it all from the sub-options. Did I miss something?
Comment 7 Dieter 2017-04-10 09:57:01 UTC
Created attachment 132443 [details]
Screenshot table of contents

Sorry, but I can't answer your question, because my "table of contents"-dialog looks different (5.3.2.2 (x64)).
Comment 8 Kumāra 2017-05-10 09:28:23 UTC
(In reply to Ulrich Windl from comment #1)
> (I thought this once worked already).
> From the navigator you can add such a reference dragging the table into the
> text, but the text for the link is ugly (like "table3").

You're right. This I've just learnt from you. Thank you very much!

The "ugly" text link is editable. So, it's ok. Actually, I can also rename the table at the Navigator first (though space characters unallowed). All's good here.

The only issue left is the table names must contain basic alphanumerics only. If Unicode characters are used, dragging the link into the text will have "?" in place of any Unicode characters. It also makes the link useless.

Workaround: Avoid Unicode characters in table names. Then (as Ulrich suggested) from the Navigator, drag the table name to where you want to place the link. Edit the link text if necessary. (Note: Renaming the table later will break the link.)

Marking this as WORKSFORME.

(Btw, this issue is not about "Table of Contents". Please report that separately.)
Comment 9 Ulrich Windl 2017-05-10 11:07:53 UTC
IMHO that does not work for me: The problem as described is not fixed, and the workaround presented in comment #1 simply demonstrates that all the mechanisms needed are there in the code base (e.g. captions as suggested in comment #3 and comment #4 are not really necessary), just the higher levels don't make use of it. It seems the fix isn't complicated, but would help usability a lot.
Also in 5.2.5.1 (Linux) no hyperlinks are inserted when dragging a table from the navigator, but in 5.2.6.2 (Windows) they are. Also in the latter version I could rename the Table using Unicode characters (e.g. "Tabäle1"), and dragging the table into text correctly displayed the Unicode character.
Comment 10 Kumāra 2017-05-11 08:12:39 UTC
(In reply to Ulrich Windl from comment #9)
> Also in 5.2.5.1 (Linux) no hyperlinks are inserted when dragging a table
> from the navigator, but in 5.2.6.2 (Windows) they are. 

Better compare using the same number version.

> Also in the latter
> version I could rename the Table using Unicode characters (e.g. "Tabäle1"),
> and dragging the table into text correctly displayed the Unicode character.

ä may not count as Unicode. Try this: jhāna
Comment 11 Ulrich Windl 2017-05-11 08:29:19 UTC
(In reply to Kumāra from comment #10)
> ä may not count as Unicode. Try this: jhāna

So maybe "Unicode" actually means "a code point > 0xff", like U+0101 (small letter a with macron).
Comment 12 Kumāra 2018-03-05 03:46:47 UTC
I'm reopening this. I now agree with Ulrich Windl (in Comment 9) that "It seems the fix isn't complicated, but would help usability a lot."

The 2 suggested workarounds are not really workable:

1. Create a caption and reference it instead.
a. The user may not want to have a caption. (That's true for me.)
b. Clicking on the link leads to the caption, not the table. OK if the caption is above the table, but not OK if its below (esp a long table).
c. Even if the above issues are relevant to certain users, the steps are unnecessarily tedious. 

2. Drag and drop a table object from the Navigator into the document.
a. This creates a link with a line, which may be undesirable.
b. The user can't insert the page number and other elements available for cross-references.

Since LO can cross-reference footnotes, why not tables?

So again, I'd like to request this enhancement: Include Tables among Cross-references, which "isn't complicated, but would help usability a lot."


For the benefit of others seeking the same, my current workaround is to place a bookmark on the first row of the table, and cross-reference that. That's the only way I know to make the result elegant, but it's a bit tedious. A fix is still much preferred, and will be much appreciated.
Comment 13 Cor Nouws 2019-02-05 18:45:19 UTC
(In reply to Kumāra from comment #12)
> I'm reopening this. I now agree with Ulrich Windl (in Comment 9) that "It
> seems the fix isn't complicated, but would help usability a lot."
Then let Ulrich do it.
Or create an enhancement request.
You can't insert references to images too, if they do not have a caption. Etc.
This bug simply is WorskForMe.
Comment 14 Kumāra 2019-02-06 04:40:47 UTC
(In reply to Cor Nouws from comment #13)
> (In reply to Kumāra from comment #12)
> > I'm reopening this. I now agree with Ulrich Windl (in Comment 9) that "It
> > seems the fix isn't complicated, but would help usability a lot."
> Then let Ulrich do it.
> Or create an enhancement request.
> You can't insert references to images too, if they do not have a caption.
> Etc.
> This bug simply is WorskForMe.

Cor, this *is* an enhancement request. If Ulrich or someone else can fix this, then why close this with WORKSFORME?
Comment 15 Ulrich Windl 2019-02-06 07:03:48 UTC
(In reply to Cor Nouws from comment #13)
[...]
> Then let Ulrich do it.
[...]
> This bug simply is WorskForMe.

(In reply to Kumāra from comment #14)
[...]
> Cor, this *is* an enhancement request. If Ulrich or someone else can fix
> this, then why close this with WORKSFORME?

So while it's simple to fix (and it is a useful request (other programs can do that!)) you are not willing to take care of it? Actually I do not have the resources to fix it, but I donated to the project regularly. I dod not like they way, reasonable enhancement requests are handled here. I had to say that. Sorry.
Comment 16 Cor Nouws 2019-02-06 07:56:11 UTC
(In reply to Ulrich Windl from comment #15)
> So while it's simple to fix (and it is a useful request (other programs can
> do that!)) you are not willing to take care of it? Actually I do not have
It's not that. But simply assuming that something is simple, is rather dangerous in  LibreOffice code ;)

> the resources to fix it, but I donated to the project regularly. I dod not
> like they way, reasonable enhancement requests are handled here. I had to
> say that. Sorry.
Sorry, it was not too kind of me.

So, I changed the summary.. That is accurate, isn't it?
Regards - Cor
Comment 17 Kumāra 2019-02-07 03:21:54 UTC
Thanks, Cor. Apology fully accepted.

Also, good that you made the summary more complete, though it seems a little confusing to me.

This part "Allow cross-references (with a field) to Tables without adding a caption with a frame" is clear enough. (I would leave out "with a frame", this being a *summary*.)

As for the remaining bit "(the need to do so, is the case with e.g. Images)", 
I'm not sure how to improve on it as I'm not sure what you want to say.