2020-04-09 16:47:48 -04:00
|
|
|
;;; tools/biblio/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
2021-11-22 14:21:19 +01:00
|
|
|
;;
|
|
|
|
;;; `org-cite'
|
2021-10-27 17:33:04 -04:00
|
|
|
|
|
|
|
(use-package! oc
|
2021-11-22 14:21:19 +01:00
|
|
|
:defer t
|
2021-10-27 17:33:04 -04:00
|
|
|
:config
|
|
|
|
(setq org-cite-global-bibliography
|
2022-08-07 12:24:14 +02:00
|
|
|
(ensure-list
|
2021-11-22 14:21:19 +01:00
|
|
|
(or (bound-and-true-p citar-bibliography)
|
|
|
|
(bound-and-true-p bibtex-completion-bibliography)))
|
|
|
|
;; Setup export processor; default csl/citeproc-el, with biblatex for
|
2021-10-27 17:33:04 -04:00
|
|
|
;; latex
|
2021-11-22 14:21:19 +01:00
|
|
|
org-cite-export-processors '((latex biblatex) (t csl))
|
2021-10-27 17:33:04 -04:00
|
|
|
org-support-shift-select t))
|
|
|
|
|
|
|
|
|
2021-11-23 13:14:38 +01:00
|
|
|
(use-package! citar
|
|
|
|
:when (featurep! :completion vertico)
|
|
|
|
:no-require
|
|
|
|
:config
|
|
|
|
(setq org-cite-insert-processor 'citar
|
|
|
|
org-cite-follow-processor 'citar
|
2022-01-27 14:39:31 +01:00
|
|
|
org-cite-activate-processor 'citar))
|
2021-11-23 13:14:38 +01:00
|
|
|
|
2021-11-22 14:21:19 +01:00
|
|
|
;; `org-cite' processors
|
|
|
|
(use-package! oc-biblatex :after oc)
|
|
|
|
(use-package! oc-csl :after oc)
|
|
|
|
(use-package! oc-natbib :after oc)
|
2021-10-27 17:33:04 -04:00
|
|
|
|
|
|
|
|
2021-11-22 14:21:19 +01:00
|
|
|
;;
|
|
|
|
;;; Third-party
|
2021-10-27 17:33:04 -04:00
|
|
|
|
2021-11-22 14:21:19 +01:00
|
|
|
(use-package! bibtex-completion
|
|
|
|
:when (or (featurep! :completion ivy)
|
|
|
|
(featurep! :completion helm))
|
|
|
|
:defer t
|
|
|
|
:config
|
|
|
|
(setq bibtex-completion-additional-search-fields '(keywords)
|
|
|
|
;; Tell bibtex-completion to look at the File field of the bibtex to
|
|
|
|
;; figure out which pdf to open:
|
|
|
|
bibtex-completion-pdf-field "file"))
|
|
|
|
|
|
|
|
|
|
|
|
(use-package! ivy-bibtex
|
|
|
|
:when (featurep! :completion ivy)
|
|
|
|
:defer t
|
|
|
|
:config
|
|
|
|
(add-to-list 'ivy-re-builders-alist '(ivy-bibtex . ivy--regex-plus)))
|