Closed clbarnes closed 5 years ago
Are literal names a problem because of reserved characters (like spaces), or are they processed wrong? Either way, would something like this work for you?
plugins.config.get('@bibtex').generateLabels = false // and get them from `id` instead
That's easy for me because it wouldn't be a breaking change then, but I don't know how you're using Citation.js so I don't know if that would work for you.
My use case is a tool called citepy which fetches citation data from the python package index and dumps it out as CSL-data JSON, but can obviously only get a raw string for the author (as it might be multiple people, an organisation, etc). I'm then recommending people use citation-js as a command line utility (so not much I can do on the js end) to convert the CSL-data JSON into bibtex/citations.
From what I can tell, the default when the only name is literal is to use nameyeartitle, but that means I end up with e.g.
"Travis Oliphant et al.2019numpy"
As the citation key in my bibtex output, which is unwieldy. But I've already defined what I want the ID to be in the CSL-data's ID field - a command line switch to use it would be great!
Available in the next update:
citation-js -i INPUT -s bibtex --formatter-options generateLabel=false
Also, I will include a fix which should make the author names, and not just the title, safe for usage as a BibTeX key.
The current default {author}{year}{title} scheme doesn't work well with e.g. literal names, and we've got an ID just sitting there not doing anything.