Adding the itemID to a CSL style

13 views
Skip to first unread message

Emiliano Heyns

unread,
Dec 16, 2017, 6:42:40 PM12/16/17
to zotero-dev
I'm trying to output the itemID using a CSL style. If I manually add a variable named "id" using a text editor, the visual csl editor (http://editor.citationstyles.org/visualEditor/) will dutifully import and  display it, but I can't add it using the visual editor, and Zotero ignores the field it seems. Can this be done?

Sebastian Karcher

unread,
Dec 16, 2017, 8:18:54 PM12/16/17
to zoter...@googlegroups.com
No, Csl doesn't have a concept of item ID and zotero doesn't map it, sorry. That's why we use a translator for scannable cite

On Dec 16, 2017 6:42 PM, Emiliano Heyns <emilian...@iris-advies.com> wrote:
I'm trying to output the itemID using a CSL style. If I manually add a variable named "id" using a text editor, the visual csl editor (http://editor.citationstyles.org/visualEditor/) will dutifully import and  display it, but I can't add it using the visual editor, and Zotero ignores the field it seems. Can this be done?

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at https://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.

Emiliano Heyns

unread,
Dec 17, 2017, 9:46:19 AM12/17/17
to zotero-dev
I'm trying to help a user migrate a word document to markdown while retaining the references. I've considered a translator, but a csl style would be the easiest transition.

I've been trying to hold off writing a scannable cite matcher to replace the references. I'd really rather not.

Would it be possible to monkey patch the embedded citeproc-js to make the citekey available to a style?

Emiliano Heyns

unread,
Dec 17, 2017, 2:07:45 PM12/17/17
to zotero-dev


On Sunday, December 17, 2017 at 2:18:54 AM UTC+1, adamsmith wrote:
No, Csl doesn't have a concept of item ID and zotero doesn't map it, sorry. That's why we use a translator for scannable cite


But the CSL object passed to the processor does have an ID, correct? Zotero passes the item URL in it. It's easy enough to patch itemToCSLJSON, but if the processor already doesn't use the "id" (or the "type") field even though it's available in the object, there's probably no point.

I've been going over the citeproc sources, but I don't see where the variable access limits the fields picked from the object.
Reply all
Reply to author
Forward
0 new messages