feat(biblio): add org-cite, citeproc
This commit is contained in:
parent
b66aaf9e9f
commit
3047430739
3 changed files with 49 additions and 6 deletions
|
@ -85,6 +85,7 @@
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
;;ansible
|
||||||
|
;;biblio ; Writes a PhD for you (citation needed)
|
||||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
;;direnv
|
||||||
;;docker
|
;;docker
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
;;; tools/biblio/config.el -*- lexical-binding: t; -*-
|
;;; tools/biblio/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
(use-package! bibtex-completion
|
(use-package! bibtex-completion
|
||||||
|
:when (or (featurep! :completion ivy)
|
||||||
|
(featurep! :completion helm))
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(setq bibtex-completion-additional-search-fields '(keywords)
|
(setq bibtex-completion-additional-search-fields '(keywords)
|
||||||
bibtex-completion-pdf-field "file"));; This tell bibtex-completion to look at the File field of the bibtex to figure out which pdf to open
|
bibtex-completion-pdf-field "file"));; This tells bibtex-completion to look at the File field of the bibtex to figure out which pdf to open
|
||||||
|
|
||||||
|
|
||||||
(use-package! ivy-bibtex
|
(use-package! ivy-bibtex
|
||||||
:when (featurep! :completion ivy)
|
:when (featurep! :completion ivy)
|
||||||
|
@ -14,7 +15,46 @@
|
||||||
(add-to-list 'ivy-re-builders-alist '(ivy-bibtex . ivy--regex-plus)))
|
(add-to-list 'ivy-re-builders-alist '(ivy-bibtex . ivy--regex-plus)))
|
||||||
|
|
||||||
|
|
||||||
(use-package! citar
|
;;; Org-Cite configuration
|
||||||
:when (featurep! :completion vertico)
|
|
||||||
:after embark
|
(use-package! oc
|
||||||
:defer t)
|
:after org
|
||||||
|
:config
|
||||||
|
(map! :map org-mode-map
|
||||||
|
:localleader
|
||||||
|
:desc "Insert citation" "@" #'org-cite-insert)
|
||||||
|
(setq org-cite-global-bibliography
|
||||||
|
(let ((paths
|
||||||
|
(cond
|
||||||
|
((boundp 'citar-bibliography) citar-bibliography)
|
||||||
|
((boundp 'bibtex-completion-bibliography) bibtex-completion-bibliography))))
|
||||||
|
;; Always return bibliography paths as list for org-cite.
|
||||||
|
(if (stringp paths) (list paths) paths))
|
||||||
|
;; setup export processor; default csl/citeproc-el, with biblatex for
|
||||||
|
;; latex
|
||||||
|
org-cite-export-processors
|
||||||
|
'((latex biblatex)
|
||||||
|
(t csl))
|
||||||
|
org-cite-insert-processor 'citar
|
||||||
|
org-cite-follow-processor 'citar
|
||||||
|
org-cite-activate-processor 'citar
|
||||||
|
org-support-shift-select t))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Org-cite processors
|
||||||
|
(use-package! oc-biblatex
|
||||||
|
:after oc)
|
||||||
|
|
||||||
|
(use-package! oc-csl
|
||||||
|
:after oc)
|
||||||
|
|
||||||
|
(use-package! oc-natbib
|
||||||
|
:after oc)
|
||||||
|
|
||||||
|
;;;; Third-party
|
||||||
|
|
||||||
|
(use-package! citar-org
|
||||||
|
:when (featurep! :lang org +roam2)
|
||||||
|
:config
|
||||||
|
;; Include property drawer metadata for 'org-roam' v2.
|
||||||
|
(setq citar-org-note-include '(org-id org-roam-ref)))
|
||||||
|
|
|
@ -8,3 +8,5 @@
|
||||||
(package! helm-bibtex :pin "b85662081de98077f13f1a9fac03764702325d28"))
|
(package! helm-bibtex :pin "b85662081de98077f13f1a9fac03764702325d28"))
|
||||||
(when (featurep! :completion vertico)
|
(when (featurep! :completion vertico)
|
||||||
(package! citar :pin "fd33f5c4f7981036a969b5ca8aaf42380848ab32"))
|
(package! citar :pin "fd33f5c4f7981036a969b5ca8aaf42380848ab32"))
|
||||||
|
|
||||||
|
(package! citeproc :pin "0857973409e3ef2ef0238714f2ef7ff724230d1c")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue