Integrate citar with org-cite

Add org-mode and LaTeX-mode hooks to set up citar capf
This commit is contained in:
Evie Litherland-Smith 2024-01-17 10:42:00 +00:00
parent 66abfa208f
commit f124b91f30

View file

@ -563,20 +563,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
** Citar ** Citar
#+begin_src emacs-lisp :results output silent #+begin_src emacs-lisp :results output silent
(let ((citar-base-directory "~/Documents/References"))
(setq citar-bibliography (expand-file-name "main.bib" citar-base-directory)
citar-library-paths (list (expand-file-name "library" citar-base-directory))
citar-notes-paths (list (expand-file-name "notes" citar-base-directory))))
(use-package citar (use-package citar
:ensure t :ensure t
:diminish :diminish
:custom
(org-cite-global-bibliography '("~/Documents/References/main.bib"))
(org-cite-insert-processor 'citar)
(org-cite-follow-processor 'citar)
(org-cite-activate-processor 'citar)
(citar-bibliography org-cite-global-bibliography)
(citar-library-paths '("~/Documents/References/library/"))
(citar-notes-paths '("~/Documents/References/notes/"))
:hook
(LaTeX-mode . citar-capf-setup)
(org-mode . citar-capf-setup)
:bind (("C-c r r" . citar-open) :bind (("C-c r r" . citar-open)
("C-c r e" . citar-open-entry) :map org-mode-map :package org
("C-c r f" . citar-open-files) ("C-c r i" . #'org-cite-insert))
("C-c r l" . citar-open-links)
("C-c r n" . citar-open-notes)
("C-c r a" . citar-attach-files)
("C-c r i" . citar-insert-citation))
:config :config
(defvar citar-indicator-files-icons (defvar citar-indicator-files-icons
(citar-indicator-create (citar-indicator-create