Created
February 20, 2016 16:19
-
-
Save willfurnass/a95b6eb62c09c3d12231 to your computer and use it in GitHub Desktop.
Patch Zotero's translators/BibTeX.js so non-empty shortTitle values used as BibTeX key when exporting Zotero library.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- BibTeX.js.orig 2015-07-03 07:18:37.000000000 +0100 | |
+++ BibTeX.js 2015-08-09 14:21:08.779706944 +0100 | |
@@ -1176,7 +1176,11 @@ | |
if(!type) type = "misc"; | |
// create a unique citation key | |
- var citekey = buildCiteKey(item, citekeys); | |
+ if (item.shortTitle==''){ | |
+ var citekey = buildCiteKey(item, citekeys); | |
+ } else { | |
+ var citekey = item.shortTitle | |
+ } | |
// write citation key | |
Zotero.write((first ? "" : "\n\n") + "@"+type+"{"+citekey); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment