-
Notifications
You must be signed in to change notification settings - Fork 55
Zotero integration
Ramon Diaz-Uriarte edited this page Feb 25, 2024
·
6 revisions
Better BibTeX has a feature to enable outside linking to an item in Zotero via "select links", which you can then use from the command line like:
❯ xdg-open "zotero://select/items/@citekey"
Such a feature is easy to integrate with Citar.
(defun my/open-in-zotero (citekey)
"Open a reference item in Zotero."
(interactive (list (citar-select-ref)))
(citar-file-open-external
(concat "zotero://select/items/@" citekey)))
It is possible to configure citar-open-entry-function
so that it uses citar-open-entry-in-zotero
instead of the default citar-open-entry-in-file
(https://github.com/emacs-citar/citar/issues/736).
If you want to be able to access both options, you can add an action to the citar-embark-map
: (define-key citar-embark-map (kbd "z") #'citar-open-entry-in-zotero)
for example in the citar-embark
use-package
form:
(use-package citar-embark
:after citar embark
:ensure t
:no-require
:config
(citar-embark-mode)
(define-key citar-embark-map (kbd "z") #'citar-open-entry-in-zotero)
)
Now, e
will open the entry in the bib file (the default) and z
in Zotero.