zotero / citeproc-rs

CSL processor in Rust.

Home Page:https://cormacrelf.github.io/citeproc-wasm-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug report: disambiguation with additional names

zepinglee opened this issue · comments

The spec of givenname-disambiguation-rule="by-cite" says:

Only ambiguous names in ambiguous cites are affected, and disambiguation stops after the first name that eliminates cite ambiguity.

In the following test case, the cites are already disambiguated after expanding the first names ("John Doe, Roe" and "Jack Doe, Roe") and disambiguation should stop. citeproc-rs produces "John Doe, Richard Roe; Jack Doe, Jane Roe" by expanding additional names.

citeproc-rs 2ab195a output:

Diff < left / right > :
<John Doe, Richard Roe; Jack Doe, Jane Roe
>John Doe, Roe; Jack Doe, Roe
>>===== MODE =====>>
citation
<<===== MODE =====<<


>>===== RESULT =====>>
John Doe, Roe; Jack Doe, Roe
<<===== RESULT =====<<


>>===== CSL =====>>
<style
      xmlns="http://purl.org/net/xbiblio/csl"
      class="note"
      version="1.0">
  <info>
    <id />
    <title />
    <updated>2009-08-10T04:49:00+09:00</updated>
  </info>
  <citation
         disambiguate-add-givenname="true"
         givenname-disambiguation-rule="by-cite">
    <layout delimiter="; ">
      <names variable="author">
        <name form="short"/>
      </names>
    </layout>
  </citation>
  <bibliography>
    <layout delimiter="; ">
      <names variable="author">
        <name form="short"/>
      </names>
    </layout>
  </bibliography>
</style>
<<===== CSL =====<<


>>===== CITATION-ITEMS =====>>
[
    [
        {
            "id": "ITEM-1"
        },
        {
            "id": "ITEM-2"
        }
    ]
]
<<===== CITATION-ITEMS =====<<


>>===== INPUT =====>>
[
    {
        "author": [
            {
                "family": "Doe",
                "given": "John"
            },
            {
                "family": "Roe",
                "given": "Richard"
            }
        ],
        "id": "ITEM-1",
        "type": "book"
    },
    {
        "author": [
            {
                "family": "Doe",
                "given": "Jack"
            },
            {
                "family": "Roe",
                "given": "Jane"
            }
        ],
        "id": "ITEM-2",
        "type": "book"
    }
]
<<===== INPUT =====<<