Bug 158840 - In libreoffice writer, i want to insert cross reference of a numbered paragraph with out the before and after fields
Summary: In libreoffice writer, i want to insert cross reference of a numbered paragra...
Status: RESOLVED DUPLICATE of bug 121465
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-23 15:59 UTC by Mahmoud Alnaanah
Modified: 2024-01-30 10:48 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example on inserting cross-reference to a numbered paragrph (16.27 KB, application/vnd.oasis.opendocument.text)
2024-01-09 16:45 UTC, Mahmoud Alnaanah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mahmoud Alnaanah 2023-12-23 15:59:32 UTC
Description:
In LibreOffice writer, i want to insert the number in a numbered paragraph as a cross reference without the before and after fields, this is necessary for research papers where the numbered paragraph has square brackets [ and ] around the number but not in their cross reference. 

Steps to Reproduce:
1. Make a numbered paragraph with [ and ] before and after the number
2. Insert the number as cross refrence.
3. the [ and ] appear in the cross reference

Actual Results:
the [ and ] appear in the cross reference

Expected Results:
I don't want them to appear


Reproducible: Always


User Profile Reset: No

Additional Info:
necessary for research papers
Comment 1 Dieter 2024-01-06 09:23:10 UTC
Mahmoud, thank you for reporting the bug. Please paste information help -> About LibreOffice and also add a short sample file, that shows the problem. Thank you.
=> NEEDINFO
Comment 2 Mahmoud Alnaanah 2024-01-09 16:45:30 UTC
Created attachment 191826 [details]
Example on inserting cross-reference to a numbered paragrph

Version: 7.6.3.2 (X86_64) / LibreOffice Community
Build ID: 60(Build:2)
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.3~rc2-0ubuntu0.22.04.1~lo3
Calc: threaded
Comment 3 QA Administrators 2024-01-10 03:12:34 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2024-01-12 17:16:19 UTC
Heiko and Eyal, you've discussed this before. Should this be marked as a duplicate of bug 121465 or bug 147774 or bug 149635, or maybe merge everything into a straight-forward "add option to suppress before and/or after separators in cross-referencing?"
(Sorry I have not caught-up to the detailed discussions on the topic.)
Comment 5 Eyal Rozenberg 2024-01-12 23:53:46 UTC
(In reply to Mahmoud Alnaanah from comment #0)
> this is necessary
> for research papers where the numbered paragraph has square brackets [ and ]
> around the number but not in their cross reference. 

1. If this is the only scenario you are interested, are you not well enough served by the bibliography mechanism [1]? TBH, I haven't used it myself, I don't  write scholarly papers with Writer/MS-Word-like tools.

2. A researcher myself, whenever [123]-style keys are used as keys, these are also used as the reference text. So, are you sure you really want to remove the brackets?


 [1] : https://help.libreoffice.org/7.0/en-US/text/swriter/guide/indices_literature.html?DbPAR=WRITER
Comment 6 Mahmoud Alnaanah 2024-01-13 00:03:13 UTC
(In reply to Eyal Rozenberg from comment #5)
> (In reply to Mahmoud Alnaanah from comment #0)
> > this is necessary
> > for research papers where the numbered paragraph has square brackets [ and ]
> > around the number but not in their cross reference. 
> 
> 1. If this is the only scenario you are interested, are you not well enough
> served by the bibliography mechanism [1]? TBH, I haven't used it myself, I
> don't  write scholarly papers with Writer/MS-Word-like tools.
> 
> 2. A researcher myself, whenever [123]-style keys are used as keys, these
> are also used as the reference text. So, are you sure you really want to
> remove the brackets?
> 
> 
>  [1] :
> https://help.libreoffice.org/7.0/en-US/text/swriter/guide/indices_literature.
> html?DbPAR=WRITER

1. I tried few times to use Bibliography, but it seemed to complicated and time consuming. It is easier to copy the citation from Google scholar and cross reference it.
2. I am sure I want to remove the brackets, and it makes more sense. Because usually you want to reference using the number regarding what decoration is put before or after it.
Comment 7 Heiko Tietze 2024-01-16 11:03:14 UTC
You are abusing the cross-reference function for bookmarks, and Zotero/Mendeley and co. would be the better solution anyway. For simple text it might be an easy solution, however.

The steps are:
* insert the reference
* format as list with brackets before/after (only needed for the first item)
* insert a cross-reference to a Numbered Paragraph

The Numbered Paragraph provides the types Number, Number (no context), Number (full context), 

According the help https://help.libreoffice.org/7.6/en-US/text/swriter/01/04090002.html

* Number: Inserts the number of the heading or numbered paragraph, including superior levels depending on the context. See note below this table for more information.
* Number (no context): Inserts only the number of the heading or numbered paragraph.
* Number (full context): Inserts the number of the heading or numbered paragraph, including all superior levels.

So I can follow the expectation that before/after separators should be omitted. And while bug 149635 only talks about "remove "after" separator in cross-reference to numbered list item" we better keep the topics together. I suggested to make it a duplicate.
Comment 8 Stéphane Guillou (stragu) 2024-01-18 16:41:20 UTC
Thank you all.
My suggestion is to mark this report, bug 149635 and bug 147774 as all duplicates of the enhancement request in bug 121465.
Any objection?
Comment 9 Mahmoud Alnaanah 2024-01-18 17:34:38 UTC
(In reply to Stéphane Guillou (stragu) from comment #8)
> Thank you all.
> My suggestion is to mark this report, bug 149635 and bug 147774 as all
> duplicates of the enhancement request in bug 121465.
> Any objection?

I agree with anything that helps. The problem is clear, and enhancement request in bug 121465 describe it well.
Comment 10 Buovjaga 2024-01-30 10:48:01 UTC

*** This bug has been marked as a duplicate of bug 121465 ***