-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docx+citations from zotero: different ids used for in-text and CSL-YAML #10366
Comments
Minimal test docx
|
Here is the citation embedded in Test-2.docx. You can see that the id of the first citationItem is indeed Ml6QQcFl/5Udmir6l. There is then an itemData that embeds bibliographic information, and it uses a different id "2102". I'm not sure how it's supposed to work in this case (if it's not just a mistake), but perhaps we're meant to use the id Ml6QQcFl/5Udmir6l both places? @bdarcus do you know?
|
I just pushed a fix that will use the citationItem id in the bibliography, even if the itemData contains a different reference id. If that's wrong, we can change. |
Thanks @jgm -- what happens when there is a {
"id": "uh2vLrAB/XwGHp8PL",
"uris": [
"http://zotero.org/users/1940082/items/IYHGI6A3"
],
"itemData": {
"id": 15691,
"type": "book",
"note": "Citation Key: dowling2017\npage: 136",
"publisher": "International Retinal Research Foundation",
"title": "Amblyopia: Chal-lenges and opportunities",
"volume": "The Lasker/IRRF Initiative for Innovation in Vi-sion Science",
"author": [
{
"family": "Dowling",
"given": "John E."
}
],
"editor": [
{
"family": "Dowling",
"given": "John E."
}
],
"issued": {
"date-parts": [
[
"2017"
]
]
},
"citation-key": "dowling2017"
}
} ...has a main |
We use |
Thank you as always! |
Just FYI, I just checked the schema for csl-data (which is what "citation-key": {
"type": "string"
}, So this would be where the BibTeX key, if present, should be stored. Let me see if I can make a filter to make this replacement, as a workflow where the BibTeX key is used as an id is more flexible overall... |
It's not documented for the released version; perhaps it was added later. |
I have a Word docx written using Zotero by a collaborator with the following injected example reference (toggle field codes and copy paste):
The important part is there is a base id
"id": "Ml6QQcFl/5Udmir6l"
and an"itemData": { "id": 2102,
— pandoc unfortunately uses the first one for the in-text citation:but the YAML uses the other id:
As this is a docx from a collaborator, I don't have his database and I don't know why the zotero data is like this (most references are like this), but this is in-the-wild and I'd hope a consistent id selection by pandoc should be easy to do?
The text was updated successfully, but these errors were encountered: