Home / Emacs / Org Cite & Citar
Configure!
Install Citar.
(with-eval-after-load 'package
(add-to-list 'package-selected-packages 'citar)
(add-to-list 'package-selected-packages 'citeproc))
Use Citar.
(with-eval-after-load 'org
(setopt org-cite-insert-processor 'citar
org-cite-follow-processor 'citar
org-cite-activate-processor 'citar))
Define the global keybinding.
(keymap-global-set "C-c b" #'citar-open)
Fix Citar keybindings.
Make RET open the citation instead of add a newline.
(with-eval-after-load 'citar-org
(keymap-set citar-org-citation-map "RET" #'org-open-at-point))
Make citar find library files.
(with-eval-after-load 'citar
(setopt citar-library-paths
(list (file-name-concat (progn
(require 'org)
org-directory)
"bib"))))
Find the library files for the given key as
key.extensionorkey~variant.extensionfor anyvariant.
By default, per the citar-library-file-extensions, any extension works.
(setopt citar-file-additional-files-separator "~")
Remember the recently used bibliographic items across Emacs sessions.
(with-eval-after-load 'savehist
(add-to-list 'savehist-additional-variables 'citar-history))
Locate the BibTeX files.
(let ((bibliography (list (file-name-concat (progn
(require 'org)
org-directory)
"obtf.bib"))))
(setopt org-cite-global-bibliography bibliography
citar-bibliography bibliography))
Do not wait for the user to select multiple items.
(with-eval-after-load 'citar
(setopt citar-select-multiple nil))
Use the CSL citation processor and find the CSL styles.
Per the Introducing citations! article.
(with-eval-after-load 'org
(setopt org-cite-csl-styles-dir org-directory
org-cite-export-processors '((t csl))))
Workaround: Do not show the “unknown processor csl” error when attempting
to export a document with the #+PRINT_BIBLIOGRAPHY but with no intext
citations.
(with-eval-after-load 'ox
(require 'oc-csl))
Completions.
;; (with-eval-after-load 'org
;; (add-hook 'org-mode-hook #'citar-capf-setup))