Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upTEI: Use Better BibTeX citation key if available #1810
Conversation
adam3smith
reviewed
Jan 21, 2019
@@ -182,7 +182,7 @@ function generateItem(item, teiDoc) { | |||
|
|||
if (Zotero.getOption("Generate XML IDs")) { | |||
if (!generatedItems[item.uri]) { | |||
var xmlid = genXMLId(item); | |||
var xmlid = item.citekey || genXMLId(item); // use Better BibTeX for Zotero citation key if available |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
retorquere
Jan 21, 2019
Contributor
I fully understand Zotero wouldn't want to do stuff that specifically targets BBT. Are there prospective thoughts on the name for the citation key field when it comes to Zotero natively? I wouldn't mind renaming my field to that ahead of time.
This comment has been minimized.
This comment has been minimized.
adunning
Jan 21, 2019
Contributor
I should perhaps explain that I'm proposing this because there is a group of us using the TEI translator for a few projects, and we need something more reliable and configurable than the xml:id
generation in the TEI translator. This is the best approach to improving it that I can think of without breaking existing workflows.
This comment has been minimized.
This comment has been minimized.
I'm going to try to get to the new fields soon, so I'm OK with looking for (Also, this is equivalent to |
This comment has been minimized.
This comment has been minimized.
citationKey works for me, but I'd likely have to write migrations for it to work and I'd rather not stack migration on migration. But if we can pin down (so to speak) Looking at the CSL docs, |
This comment has been minimized.
This comment has been minimized.
Ah, OK, right. Disregard. So unless anyone has a reason why the citekey field wouldn't be called "Citation Key" in the interface, we can go with |
This comment has been minimized.
This comment has been minimized.
I've updated it to use |
This comment has been minimized.
This comment has been minimized.
Thanks, I'll take this as soon as the BBT change is fully released; please just ping me here. (On a side note, we'll almost certainly want to add a variable for citekey to CSL -- it'd do a ton to facilitate CSL/BibTeX interoperability cc @rmzelle ) |
This comment has been minimized.
This comment has been minimized.
Done. |
adam3smith
merged commit 1400b21
into
zotero:master
Jan 22, 2019
1 check passed
This comment has been minimized.
This comment has been minimized.
Thanks everyone! |
adunning
deleted the
adunning:patch-1
branch
Jan 22, 2019
This comment has been minimized.
This comment has been minimized.
Thank you! |
adunning commentedJan 21, 2019
This will use the citation key generated by Better BibTeX for Zotero as the
xml:id
if it is available. If that add-on is not enabled, this change has no effect. Solution from @retorquere in retorquere/zotero-better-bibtex#1124.