Bug 166308 - Allow to assign a character style to citation entries
Summary: Allow to assign a character style to citation entries
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Bibliography TableofContents-Indexes-Dialog
  Show dependency treegraph
 
Reported: 2025-04-23 12:45 UTC by Uralion
Modified: 2025-04-25 11:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
superscript citation (26.30 KB, image/png)
2025-04-23 12:45 UTC, Uralion
Details
Test document (38.59 KB, application/vnd.oasis.opendocument.text)
2025-04-24 07:53 UTC, Heiko Tietze
Details
Mockup (59.78 KB, image/png)
2025-04-25 07:38 UTC, Heiko Tietze
Details
Citation style selector mockup (15.92 KB, image/png)
2025-04-25 07:57 UTC, Uralion
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uralion 2025-04-23 12:45:07 UTC
Description:
I would like to use superscript citation for my bibliographic entries.

Right now, it can be done by manually superscripting each citation field, and for long documents it can mean doing it hundreds of times. So it would be nice 
So it would be great if there was an option to make it happen automatically.

This superscript citation is commonly used un medicine, science, engineering... like in Vancouver citation format.

I will a mockup in the next message.
Thank you very much!

Steps to Reproduce:
None (it is a feature request)

Actual Results:
None

Expected Results:
None


Reproducible: Always


User Profile Reset: No

Additional Info:
None
Comment 1 Uralion 2025-04-23 12:45:42 UTC
Created attachment 200467 [details]
superscript citation
Comment 2 m_a_riosv 2025-04-23 15:19:50 UTC
Please attach a sample file, reduce the size as much as possible without private information, 
and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 3 Uralion 2025-04-23 15:25:16 UTC
A sample file of what exactly? This is a feature request.
Comment 4 Heiko Tietze 2025-04-24 07:53:34 UTC
Created attachment 200493 [details]
Test document

Dummy text with two citations; the bibliography defines entries as just numbers, and I applied a character style to it afterwards with superscript. Expectation is to apply this automatically.

I wonder if this use case is generic enough to justify the effort (and increased complexity of the UI). Do you have a reference for superscript as standard? Why not using endnotes instead?
Comment 5 Uralion 2025-04-24 09:16:36 UTC
(In reply to Heiko Tietze from comment #4)
> Created attachment 200493 [details]
> Test document
> 
> Dummy text with two citations; the bibliography defines entries as just
> numbers, and I applied a character style to it afterwards with superscript.
> Expectation is to apply this automatically.
> 
> I wonder if this use case is generic enough to justify the effort (and
> increased complexity of the UI). Do you have a reference for superscript as
> standard? Why not using endnotes instead?

As I said in my main message, I know that it can be done manually with each in-text citation, but an article can contain hundreds of citations. The idea is to make it happen automatically.

As for evidence, you only have to go to high impact scientific journals to see the vast use of super-index citation:

The Lancet (https://www.thelancet.com/journals/lanres/article/PIIS2213-2600(21)00511-7/fulltext)

Journal of the American Medical Association (JAMA) (https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2832848)

British Medical Journal (BMJ) (https://www.bmj.com/content/387/bmj-2024-081318)

New England Journal of Medicine (NEJM) (https://www.nejm.org/doi/10.1056/NEJMoa2206916?url_ver=Z39.88-2003)

Nature Medicine (https://www.nature.com/articles/s41591-025-03622-w)
Comment 6 Uralion 2025-04-24 09:23:45 UTC
Sorry, I made a mistake in the previous message, I meant superscript (not super-index).
Comment 7 Heiko Tietze 2025-04-24 10:31:01 UTC
Thanks for the references. What is your take against endnotes?
Comment 8 Uralion 2025-04-24 10:48:41 UTC
I think footnotes are a totally different 'animal'. For example:
• They can´t replicate a Bibliographic index with Entry formatting for each Type Entry (article, book, etc).
• The can´t be located at the exact position one desires. And the document is messed if you want to add something after footnotes (acknowledgements, annexes...).
• They don´t let you temporarily choose beetween showing referenced article as number or as ab ID in in-text citation field, as a Bibliographic index does. (When writing it is sometimes very useful to see citations as ID, just to quickly see what has been cited, as a number does not always say much).
I am sure I forget some more things.
Comment 9 RGB 2025-04-24 19:51:45 UTC
I think it would be more useful to have the ability to automatically assign a character style to the citation fields, where they could not only be set as superscript, but also give them a different color, etc.

Related enhancement request: Bug 119048 - Associate a character style to cross-reference fields
Comment 10 Uralion 2025-04-24 20:05:49 UTC
Well, RGB, honestly having a custom style for citation fields would be great! It would elegantly solve this problem. Thank you!
Comment 11 Heiko Tietze 2025-04-25 07:38:33 UTC
Created attachment 200508 [details]
Mockup

Mockup to illustrate the request: It should be possible to optionally apply a character style to citation entries similar how we handle foot/endnote anchors (Tools > Footnote/Endnote Settings...).
Comment 12 Heiko Tietze 2025-04-25 07:41:32 UTC
The cross-reference character style would be another CS.
Comment 13 Uralion 2025-04-25 07:57:24 UTC
Created attachment 200509 [details]
Citation style selector mockup

Hi Heiko Tietze,
Thank you. However, Entries already have their own Styles tab (in the same dialog of your image) for selecting their style. And citations fields are diffent than Bibliographic entries.
Entries are the references listed in the Bibliographic index, and citations are the fields in the text that are linked to bibliographic indexes.
So, I think it makes more sense to create another section for citations.
What do you think?
Comment 14 Heiko Tietze 2025-04-25 09:47:21 UTC
I believe we have a terminology problem here. Stumbled over 'citation entry' myself. Whatever we call this thing, the new option belongs to the "Formatting of the Entries" frame since you define whether it's a number and what bracket to use.

The confusion results from the fact that we have index entries too, which is actually the ToC list.
Comment 15 Uralion 2025-04-25 09:55:37 UTC
There is definitely a terminology problem here. 
Currently 'Formatting of the Entries' configuration is applied to both Bibliographic Entries in the Bibliographic Index and Citation Fields, but at the same time both are treated  as Entry entities.
Comment 16 V Stuart Foote 2025-04-25 11:27:06 UTC
Overdue, +1 

But if we are going to make the effort to provide char styling to the citation markings, we might want to discuss with the Zotero folks to get their take on what would be least disruptive, or maybe even helpful, for their plugin extension?
Comment 17 Adomas Venčkauskas 2025-04-25 11:41:28 UTC
This isn't relevant to Zotero. The Zotero plugin manages the styling of inserted citations by using the LibreOffice API directly. This appears to be a feature request for the native LibreOffice citing feature/UI.

If Uralion or others in this thread are confused Zotero users, then you can ask for help in Zotero forums and we'll point you in the right direction, but generally this sort of thing is managed in Zotero by choosing the correct citation style (e.g. Vancouver).
Comment 18 Uralion 2025-04-25 11:44:33 UTC
I am not a confused Zotero user.
I am trying to apply an specific style to citations (like Zoreto do) natively, easily and without the need to use a Java environment (JRE).