Bug 152583 - Need a new citation style and autonumbering scheme for simplifed Chinese
Summary: Need a new citation style and autonumbering scheme for simplifed Chinese
Status: RESOLVED FIXED
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: target:24.2.0
Keywords:
Depends on: 121945
Blocks: Bibliography
  Show dependency treegraph
 
Reported: 2022-12-18 20:03 UTC by Li
Modified: 2023-12-06 17:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li 2022-12-18 20:03:32 UTC
Description:
In China, there's a national standard on formatting references (GB/T 7714-2015). It recommended that in a formal article, like a research paper, endnotes about the source of a certain reference should be labeled with numbers in square bracket as superscript, like [1], [2], [3]... And the endnote should be formatted as "[4] Author. Title: Publisher...". (Parts of the standard can be found here: https://zhuanlan.zhihu.com/p/355312827?ivk_sa=1024320u) Although it's not compulsory, as far as I know, it's relatively widely adopted.
I know it could be added manually in the Insert Footnote Dialog, but it would be much easier to have "[1], [2], [3]..." available as an automatic numbering scheme. Huge thanks.

Steps to Reproduce:
(Enhancement)

Actual Results:
(Enhancement)

Expected Results:
Example:
This[1] is a reference[2](^should be superscript).
-------
[1] Author. Title: Publisher...
[2] ...


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2022-12-18 23:18:42 UTC
Thanks, Li.

Endnotes are not the right part of LibreOffice for this enhancement request. There is a bibliography tool in LibreOffice, and a request exists for adding citation styles to it: bug 121945.
It is possible to customise the format of the citations by hand when inserting a bibliography, and numbers can be used instead of identifiers, but the enhancement request above would need to be resolved before specific, built-in citation styles (like the one you suggest) can be added.
Comment 2 Kevin Suo 2023-11-22 10:05:08 UTC
(In reply to Li from comment #0)
For footnote and endnote, you can change the "Before" and "After" characters of the numbering list in:
Tools > Footnote and Endnote.

Just type in "[" in the "Before" box and "]" in the "After" box.

In order to make Writer to use the [1], [2], [3] numbering style for Chinese documents by default, we need to set templates. We now have a default Chinese template named "Simplified Chinese Normal" under the "Localization" template category (File > Template > Manage Template), you can right click that template and set it to default template for Writer. However that template currently still uses the default 1,2,3 style numbering for footnote and endnote. I can prepare a patch to let that template use [1], [2], [3] style footnote and endnote, but shall I set it to both footnote and endnote, or only for endnote?
Comment 3 Li 2023-11-22 11:36:06 UTC
(In reply to Kevin Suo from comment #2)
> (In reply to Li from comment #0)
> For footnote and endnote, you can change the "Before" and "After" characters
> of the numbering list in:
> Tools > Footnote and Endnote.
> 
> Just type in "[" in the "Before" box and "]" in the "After" box.
> 
> In order to make Writer to use the [1], [2], [3] numbering style for Chinese
> documents by default, we need to set templates. We now have a default
> Chinese template named "Simplified Chinese Normal" under the "Localization"
> template category (File > Template > Manage Template), you can right click
> that template and set it to default template for Writer. However that
> template currently still uses the default 1,2,3 style numbering for footnote
> and endnote. I can prepare a patch to let that template use [1], [2], [3]
> style footnote and endnote, but shall I set it to both footnote and endnote,
> or only for endnote?

The standard I mentioned (GB/T 7714-2015) only concerns how to list reference materials in endnotes. I think there are generally less restrictions and more down to one's preference when it comes to footnotes. As far as I know, circled digits could be the most common footnote numbering style in Simplified Chinese publications. 
 
With that said, it certainly won't hurt to have more options available. There is an industry standard (CY/T 121-2015) that mentioned [1], [2], [3] format as an option, so someone can potentially utilize it if it's also available as a footnote numbering style.

Thanks!

GB/T 7714-2015: https://github.com/saccohuo/GBT-Standard/blob/c01ae2e9b9596e470d21c39b014c3cf6c5ffcb1f/GBT%207714-2015%20%E4%BF%A1%E6%81%AF%E4%B8%8E%E6%96%87%E7%8C%AE%20%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E8%91%97%E5%BD%95%E8%A7%84%E5%88%99.pdf
CY/T 121-2015: https://journal.scu.edu.cn/info/1253/1226.htm
Comment 4 Kevin Suo 2023-11-29 03:15:53 UTC
> In order to make Writer to use the [1], [2], [3] numbering style for Chinese documents by default, we need to set templates. We now have a default Chinese template named "Simplified Chinese Normal" under the "Localization" template category (File > Template > Manage Template), you can right click that template and set it to default template for Writer. However that template currently still uses the default 1,2,3 style numbering for footnote and endnote. I can prepare a patch to let that template use [1], [2], [3] style footnote and endnote, but shall I set it to both footnote and endnote, or only for endnote?

I checked, and the current default Chinese template does use [1], [2], [3] for footnote and endnote numbering, so there is no need to prepare a patch.

You can access the template from: File > Templates > Manage Templates > select "Localization" from the category dropdown, then you will see a template named "Simplified Chinese Normal" (普通简体中文). To set it to your default for Writer documents, right-click that template and select "Set to Default Template". (By the way, see also the feature request in bug 86483)

I will add another numbering style so that this numbering style would show up where you click the numbering toolbar icon.
Comment 5 Commit Notification 2023-11-29 07:22:34 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22d8f339197b23348e401bb3e9dd7430110dfba6

tdf#152583: Add [1],[2],[3] numbering style for zh-CN locale

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Kevin Suo 2023-11-29 07:24:33 UTC
I now mark this as resolved fixed. Feel free to comment if you have any more questions on this.
Comment 7 Commit Notification 2023-11-30 01:52:38 UTC
Kevin Suo committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6fffa9fdf2ad2c93c319ab662d3993b89c0a24ba

tdf#152583 follow-up: Sync LC_NumberingLevel of zh-CN with en-US locale

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Li 2023-11-30 02:52:40 UTC
(In reply to Kevin Suo from comment #4)
> You can access the template from: File > Templates > Manage Templates >
> select "Localization" from the category dropdown, then you will see a
> template named "Simplified Chinese Normal" (普通简体中文). To set it to your
> default for Writer documents, right-click that template and select "Set to
> Default Template". (By the way, see also the feature request in bug 86483)

Found it, thank you very much :)