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

TEI: Use Better BibTeX citation key if available #1810

Merged
merged 2 commits into from Jan 22, 2019

Conversation

Projects
None yet
4 participants
@adunning
Copy link
Contributor

adunning commented Jan 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.

TEI: Use Better BibTeX citation key if available
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>.
TEI.js Outdated
@@ -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.

@adam3smith

adam3smith Jan 21, 2019

Collaborator

@dstillman what's your view on this?

This comment has been minimized.

@retorquere

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.

@adunning

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.

@dstillman

This comment has been minimized.

Copy link
Member

dstillman commented Jan 21, 2019

Are there prospective thoughts on the name for the citation key field when it comes to Zotero natively?

citationKey, I would imagine?

I'm going to try to get to the new fields soon, so I'm OK with looking for citationKey now.

(Also, this is equivalent to citation-label in CSL, right?)

@retorquere

This comment has been minimized.

Copy link
Contributor

retorquere commented Jan 21, 2019

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) citationKey, I'd be happy to start doing that.

Looking at the CSL docs, citation-label is the "label identifying the item in in-text citations of label styles" -- that sounds to me like something that's exposed to the reader.

@dstillman

This comment has been minimized.

Copy link
Member

dstillman commented Jan 21, 2019

Looking at the CSL docs, citation-label is the "label identifying the item in in-text citations of label styles" -- that sounds to me like something that's exposed to the reader

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 citationKey for the field name.

@adunning

This comment has been minimized.

Copy link
Contributor

adunning commented Jan 22, 2019

I've updated it to use citationKey (works with the test build of Better BibTeX at retorquere/zotero-better-bibtex#1124 (comment)).

@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Jan 22, 2019

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 )

@retorquere

This comment has been minimized.

Copy link
Contributor

retorquere commented Jan 22, 2019

Done.

@adam3smith adam3smith merged commit 1400b21 into zotero:master Jan 22, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adam3smith

This comment has been minimized.

Copy link
Collaborator

adam3smith commented Jan 22, 2019

Thanks everyone!

@adunning adunning deleted the adunning:patch-1 branch Jan 22, 2019

@adunning

This comment has been minimized.

Copy link
Contributor

adunning commented Jan 22, 2019

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment