Bug 127452

Summary: Only first sentence of caption in Index
Product: LibreOffice Reporter: Ilya <flyamer>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: dgp-mail, eyalroz1, sdc.blanco, xiscofauli
Priority: medium    
Version: 6.2.6.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=48459
https://bugs.documentfoundation.org/show_bug.cgi?id=153904
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 89606    

Description Ilya 2019-09-09 12:42:34 UTC
Description:
When creating an Index of Tables/Figures etc, would be great to have an option of adding just the first sentence of the Caption.

Currently it's possible to create it with either just the Category and number, just the Caption, or both together. But often (at least in scientific literature) the first sentence of the caption is used as a general description of the figure, and then the details are provided in later sentences. Having the whole caption in the index is way too much detail, having no description is somewhat unhelpful, while having just the first sentence of the caption would be perfect.

Steps to Reproduce:
Create a file with figures, caption them

Actual Results:
Add Index for Figures. You can create it with either just the Category and number, just the Caption, or both together.

Expected Results:
An option to just use the first sentence of the caption would be highly desirable.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Dieter 2019-09-11 05:08:39 UTC
Ilya, thank you for your proposal. But I think I don't understand it. I can't remember that I have seen captions with a couple of sentences in scientific literaure. So perhaps I misunderstood something. Is it possible to add a short example that makes your idea more clear?
Comment 2 Ilya 2019-09-11 09:11:43 UTC
Example from my thesis.

Figure caption:

Figure 1.3. Hi-C data at different resolutions. The same region from chromosome 12 in Hi-C data from human ES cells (Dixon et al., 2012) at three different resolutions. While 32 kbp and 16 kbp are acceptable to use, 8 kbp bins are too small: data is very noisy and a lot of bins are blank. Generated using HiGlass.


What I want in the List of Figures:

Figure 1.3. Hi-C data at different resolutions...............................29


Hope this helps.
Comment 3 Ilya 2019-09-11 16:13:26 UTC
https://ask.libreoffice.org/en/question/3696/illustration-index-issues-graphs-and-bookmarks/

This has been asked for before, by the way, so I am not alone.
Comment 4 Dieter 2019-09-12 05:51:52 UTC
(In reply to Ilya from comment #2)
> Hope this helps.

Yes, it does. But I don't know, if this is possible.
Comment 5 Xisco FaulĂ­ 2019-10-29 09:40:10 UTC
(In reply to Ilya from comment #3)
> https://ask.libreoffice.org/en/question/3696/illustration-index-issues-
> graphs-and-bookmarks/
> 
> This has been asked for before, by the way, so I am not alone.

qubit asked the askbot reporter to fill an enhancement. thus, moving it to NEW
Comment 6 ajlittoz 2023-02-26 10:38:10 UTC
IMHO this is akin to inline headings.

Consequently, the same trick may be used to implement it:
- a hidden paragraph containing what is meant as the caption in the table of figures
- a cross-reference defined over this paragraph
- a cross-reference to the caption inserted at head of what is seen as the caption with all its description following it
Comment 7 sdc.blanco 2023-02-26 11:53:04 UTC
(In reply to ajlittoz from comment #6)
> IMHO this is akin to inline headings.
Thanks for possible workaround.  Also, see bug 48459, comment 8 and bug 48459, comment 15 for other possible workarounds.
Comment 8 Eyal Rozenberg 2023-03-12 19:39:26 UTC
1. Why the first sentence? Shouldn't the limitation be more flexible? What if my language doesn't have sentences? What if I need two sentences? Or - what if I only want the text up until some other mark, like a space, a hyphen or a colon?

2. Why only captions? Shouldn't this be relevant to other styles, e.g. headings?