Last active
March 15, 2021 17:25
-
-
Save bdarcus/6c625051d67b072d7fcfb03fafd574a8 to your computer and use it in GitHub Desktop.
better bibtex post-script
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
// https://github.com/retorquere/zotero-better-bibtex/issues/1759 | |
switch (Translator.header.label) { | |
case "Better BibLaTeX": | |
if (reference.has.keywords) { | |
reference.has.keywords.name = "tags"; | |
} | |
if (reference.has.title) { | |
const titles = reference.has.title.value.match(/(.+?)([?:;])(.*)/); | |
if (titles) { | |
let title = titles[1] + (titles[2] === "?" ? "?" : ""); | |
reference.add({ | |
name: "title", | |
value: title, | |
}); | |
reference.add({ | |
name: "subtitle", | |
value: titles[3].trim(), | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment