From f124b91f30e1b941a4ab3fe7c2c28306ffe638be Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 17 Jan 2024 10:42:00 +0000 Subject: [PATCH] Integrate citar with org-cite Add org-mode and LaTeX-mode hooks to set up citar capf --- README.org | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.org b/README.org index ec943f6..d7780eb 100644 --- a/README.org +++ b/README.org @@ -563,20 +563,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]] ** Citar #+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 :ensure t :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) - ("C-c r e" . citar-open-entry) - ("C-c r f" . citar-open-files) - ("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)) + :map org-mode-map :package org + ("C-c r i" . #'org-cite-insert)) :config (defvar citar-indicator-files-icons (citar-indicator-create