Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io
Other
305 stars 84 forks source link

An unnecessary space when bold for Chinese author #199

Open redleafnew opened 2 years ago

redleafnew commented 2 years ago

hi,I post this issue on zotero forum: https://forums.zotero.org/discussion/comment/400333 and @bwiernik suggested to open an issue here.

I add bold for Chinese author using like <b>韩</b>,<b>林娜</b> in author field of zotero, and an unnecessary space appear between the family name and given name in the formatted bibliography of Word, as 林娜, how to avoid the space except merge the name and use<b>韩林娜</b>?

zotero_7Cvxjybd6l WINWORD_S8S5mumzHP

Many thanks.

bwiernik commented 2 years ago

Could you export a Zotero RDF or CSL JSON of this item and paste it here?

redleafnew commented 2 years ago
[
    {
        "id": "http://zotero.org/users/4181482/items/QVEWG6AU",
        "type": "article-journal",
        "abstract": "目的为了延长植物基人造肉的货架期,提高植物基人造肉贮藏期间的品质,研究微波杀菌和高压杀菌这2种杀菌方式的保鲜效果。方法对植物基人造肉进行真空包装后,分别进行微波杀菌和高压杀菌处理,并在4℃下进行贮藏,对不同贮藏时间条件下的植物基人造肉的pH值、硫代巴比妥酸值、菌落总数、大肠杆菌、沙门氏菌、金黄色葡萄球菌进行测定,与空白组做对照,比较分析微波杀菌和高压杀菌的保鲜效果。结果与空白对照组相比,2种杀菌方式在贮存28d时,植物基人造肉的pH值和硫代巴比妥酸值变化缓慢,菌落总数、大肠杆菌数、金黄色葡萄球菌数均未达到国家规定的超标值,并且在人造肉中未检出沙门氏菌,产品合格。结论微波杀菌和高压杀菌对植物基人...",
        "container-title": "包装工程",
        "ISSN": "1001-3563",
        "issue": "13",
        "language": "en",
        "page": "36-41",
        "source": "CNKI",
        "title": "杀菌处理对植物基人造肉保鲜效果的影响",
        "URL": "https://chn.oversea.cnki.net/KCMS/detail/detail.aspx??sfield=fn&QueryID=2&CurRec=17&recid=&FileName=BZGC202113006&DbName=CJFDLAST2021&DbCode=CJFD&yx=&pr=&URLID=",
        "volume": "42",
        "author": [
            {
                "family": "<b>韩</b>",
                "given": "<b>林娜</b>"
            },
            {
                "family": "戴",
                "given": "增辉"
            }
        ],
        "accessed": {
            "date-parts": [
                [
                    "2021",
                    11,
                    15
                ]
            ]
        },
        "issued": {
            "date-parts": [
                [
                    "2021"
                ]
            ]
        }
    }
]

Desktop.zip

bwiernik commented 2 years ago

@retorquere could you take a look?

retorquere commented 2 years ago

I'll start by creating a test case for it.

The test setup includes a fair few ancient packages, and a setup that demands that citeproc-test-runner is installed globally (which hauls in these outdated packages into the global scope). How much leeway do I have to change this?

redleafnew commented 2 years ago

@retorquere thanks for your kind help. When writing a project proposal, the bold author in bibliography highlight the paper was proposer's.

retorquere commented 2 years ago

I don't have push access to https://github.com/citation-style-language/test-suite, so I cannot add the testcase. I have a fix, which I'll submit as a PR here after I've added the testcase (or someone has added the testcase for me).

Anyone know why the testcases live in a separate repo? The organisation within citeproc is very different from what I'm used to.

bwiernik commented 2 years ago

@fbennett Could you make me an admin of the test suite?

redleafnew commented 2 years ago

Sorry, is there any progress for this issue?