bibliography: citar + biblio + org-cite CSL setup
- init.el: biblio module with +citar flag - packages.el: citeproc for org-cite CSL export - config.el: citar (browse/insert/notes), biblio (online search), org-cite with CSL processor, bibtex editing defaults - Keybindings under SPC b: browse, insert, notes, search online - Auto-creates ~/org/references.bib if missing
This commit is contained in:
53
config.el
53
config.el
@@ -1807,18 +1807,59 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular."
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
;;; BIBTEX / CITAR
|
||||
;;; BIBLIOGRAPHY — citar + biblio + org-cite
|
||||
;;; ============================================================
|
||||
;; Workflow:
|
||||
;; 1. SPC b s → search CrossRef/DBLP/arXiv by author/title/DOI
|
||||
;; 2. In results: select entry → i = insert into references.bib
|
||||
;; 3. In org file: SPC b i → search your .bib → insert [cite:@key]
|
||||
;; 4. Export to PDF: citations auto-formatted, bibliography generated
|
||||
;;
|
||||
;; Files:
|
||||
;; ~/org/references.bib — master bibliography (auto-created if missing)
|
||||
;; ~/org/notes/ — reading notes per reference
|
||||
;; ~/org/papers/ — PDF library (optional)
|
||||
|
||||
(after! citar
|
||||
(setq citar-bibliography '("~/org/references.bib")
|
||||
citar-notes-paths '("~/org/notes/")
|
||||
citar-library-paths '("~/org/papers/"))
|
||||
(map! :leader
|
||||
"b b" #'citar-open
|
||||
"b i" #'citar-insert-citation
|
||||
"b n" #'citar-open-notes
|
||||
"b r" #'citar-refresh))
|
||||
|
||||
;; Ensure references.bib exists
|
||||
(let ((bib (expand-file-name "~/org/references.bib")))
|
||||
(unless (file-exists-p bib)
|
||||
(with-temp-file bib (insert "% Bibliography — managed via citar + biblio\n\n")))))
|
||||
|
||||
;; org-cite: use CSL processor (no BibLaTeX/BibTeX toolchain needed)
|
||||
(after! oc
|
||||
(require 'citeproc)
|
||||
(setq org-cite-global-bibliography '("~/org/references.bib")
|
||||
org-cite-export-processors '((latex csl)
|
||||
(html csl)
|
||||
(t csl))))
|
||||
|
||||
;; biblio.el: search and import references from online databases
|
||||
(after! biblio
|
||||
(setq biblio-crossref-user-email-address "martin@sukany.cz"))
|
||||
|
||||
;; BibTeX editing defaults
|
||||
(setq bibtex-dialect 'biblatex
|
||||
bibtex-autokey-year-length 4
|
||||
bibtex-autokey-name-year-separator ""
|
||||
bibtex-autokey-year-title-separator "-"
|
||||
bibtex-autokey-titleword-length 5
|
||||
bibtex-autokey-titlewords 3)
|
||||
|
||||
(map! :leader
|
||||
(:prefix ("b" . "bibliography")
|
||||
:desc "Browse references" "b" #'citar-open
|
||||
:desc "Insert citation" "i" #'citar-insert-citation
|
||||
:desc "Open notes for reference" "n" #'citar-open-notes
|
||||
:desc "Refresh bibliography" "r" #'citar-refresh
|
||||
:desc "Search online (CrossRef)" "s" #'biblio-crossref-lookup
|
||||
:desc "Search arXiv" "a" #'biblio-arxiv-lookup
|
||||
:desc "Search DBLP" "d" #'biblio-dblp-lookup
|
||||
:desc "Search DOI" "D" #'biblio-doi-insert-bibtex))
|
||||
|
||||
|
||||
;;; ============================================================
|
||||
|
||||
2
init.el
2
init.el
@@ -46,7 +46,7 @@
|
||||
|
||||
:tools
|
||||
ansible
|
||||
biblio
|
||||
(biblio +citar)
|
||||
debugger
|
||||
docker
|
||||
(eval +overlay)
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
(package! combobulate :recipe (:host github :repo "mickeynp/combobulate"))
|
||||
(package! breadcrumb :recipe (:host github :repo "joaotavora/breadcrumb"))
|
||||
|
||||
;; Bibliography: CSL citation processor for org-cite export
|
||||
(package! citeproc)
|
||||
|
||||
;; Tier 3 — Supplementary
|
||||
(package! org-anki)
|
||||
(package! org-ql)
|
||||
|
||||
Reference in New Issue
Block a user