-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conflicts between easykeys and betterbibtexkeys #6
Comments
Thanks for reporting this. I'll have a look at it. zotxt may have changed the way it handles easy citekeys. I'm also under the impression that @egh has effectively retired them. @egh, did you? I, for one, would be happy if you'd bring them back (the "you" indicating that I don't see myself finding the time to contribute a PR, sorry). Better BibTeX slows down Zotero's startup a lot. And there are only a few items in my library that are not uniquely identified by their author and the year they've been published in; I can take care of those manually. As for trying Better BibTex keys before easy citekeys: Putting |
Hmm, zotxt appears to handle queries that match multiple items the way it used to. % curl 'http://localhost:23119/zotxt/items?easykey=haslanger:2012construction'
haslanger:2012construction returned multiple items% However, There is no way to dinstingusih easy citekeys and Better BibTeX keys, so pandoc-zotxt.lua simply tries whether assuming that a citation key is of a given type yields a result. It does so for every key type, and the order in which it tries them simply depends on whether assuming that a key is of a given type yielded a result the last time. |
This, I think, is precisely what’s happening. As to solutions, for me it’s perfectly ok to delete the One more general solution might be for There might be other solutions, but I fould that checking whether BBT is running is possible by trying to fetch a bibliography without actually giving a collectionID, using Caveat: Replace portnumber 23119 with 24119 for Juris-M (see https://retorque.re/zotero-better-bibtex/exporting/pull/). |
I am trying to deprecate easykeys. I think BBT provides a much better solution. They are no longer mentioned in the documentation. I'm not planning to remove support from zotxt any time soon, though. |
Hmm, disabling easy citekeys when BBT is installed would break old documents that still use them. I'm leaning towards just 'demoting' easy citekeys, so that they are only tried when the BBT citation key does not match, and making keytypes configurable, so that users have a better way to resolve conflicts than editing the souce. |
I’ve released a new beta version that allows you to declare what type(s) of citation keys you want to use by setting a new metadata field |
Closing this because v1.1.0b7 is stable enough. I'll release it once I am sure it will work with the next release of Pandoc. |
zotxt’s “Easy Citekeys” are of the form
DoeTitle2000
ordoe:2000title
, wheretitle
(IIRC) can be any word from the title.If either of these two basic formats is used for BBT citekeys, too, pandoc-zotxt.lua will sometimes return unexpected items.
For example, if there are two items in Zotero, author and date of both “Doe, Jane” and ”2020”, one title “Foo bar baz”, the other “Baz”, I’ve had
echo "@doe:2020baz" | pandoc -L pandoc-zotxt.lua -C -t plain
sometimes returnDoe, Jane. 2020. “Foo Bar Baz.”
(Expected, of course:Doe, Jane. 2020. “Baz.”
)My temporary solution has been to modify the
pandoc-zotxt.lua
script, either disablingeasykey
, or moving it to the end of the relevant list, which seems to have the effect of checking the specific and (IIRC) guaranteed to be unique keys before the somewhat fuzzy easykeys:I wonder whether it might be a good idea for the official pandoc-zotxt.lua to adopt this.
What’s more, my impression is that https://github.com/egh/zotxt has, sort of, retired easykeys in favour of betterbibtexkeys (at least easykeys are not being mentioned on the project’s main page any longer at all).
It might be worth checking with @egh, and if easykeys have indeed become obsolete, remove them from pandoc-zotxt.lua as well.
The text was updated successfully, but these errors were encountered: