Skip to content

docx+citations from zotero: different ids used for in-text and CSL-YAML #10366

@iandol

Description

@iandol

I have a Word docx written using Zotero by a collaborator with the following injected example reference (toggle field codes and copy paste):

{
	"id": "Ml6QQcFl/5Udmir6l",
	"uris": [
		"http://zotero.org/users/9456003/items/M6XJVYGG"
	],
	"itemData": {
		"id": 2102,
		"type": "article-journal",
		"abstract": "...",
		"container-title": "NeuroImage",
		"DOI": "10.1016/j.neuroimage.2012.01.078",
		"ISSN": "1095-9572",
		"issue": "2",
		"journalAbbreviation": "Neuroimage",
		"language": "eng",
		"note": "PMID: 22285220",
		"page": "1307-1315",
		"source": "PubMed",
		"title": "Abnormal cortical processing of pattern motion in amblyopia: evidence from fMRI",
		"title-short": "Abnormal cortical processing of pattern motion in amblyo-pia",
		"volume": "60",
		"author": [
			{
				"family": "Thompson",
				"given": "B."
			},
			{
				"family": "Villeneuve",
				"given": "M. Y."
			},
			{
				"family": "Casanova",
				"given": "C."
			},
			{
				"family": "Hess",
				"given": "R. F."
			}
		],
		"issued": {
			"date-parts": [
				[
					"2012",
					4,
					2
				]
			]
		}
	}
}

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:

However, with further research, fMRI studies have revealed that amblyopic patients exhibit not only functional abnormalities in V1 but also in other regions, such as V2, V3, V4, V5, and higher-order
areas like MT+ [@Ml6QQcFl/5Udmir6l].

but the YAML uses the other id:

- abstract: ...
  author:
  - family: Thompson
    given: B.
  - family: Villeneuve
    given: M. Y.
  - family: Casanova
    given: C.
  - family: Hess
    given: R. F.
  container-title: NeuroImage
  container-title-short: Neuroimage
  DOI: 10.1016/j.neuroimage.2012.01.078
  id: 2102
  ISSN: 1095-9572
  issue: 2
  issued: 2012-04-02
  language: eng
  page: 1307-1315
  PMID: 22285220
  source: PubMed
  title: "Abnormal cortical processing of pattern motion in amblyopia:
    evidence from fMRI"
  title-short: Abnormal cortical processing of pattern motion in
    amblyopia
  type: article-journal
  volume: 60
image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions