From 60b4db99b1bd20f6d6c499a7771147ef6f6afaeb Mon Sep 17 00:00:00 2001 From: noa Date: Thu, 26 Dec 2024 14:42:16 +0800 Subject: Make some changes to bibliography setup --- emacs/init.el | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'emacs') diff --git a/emacs/init.el b/emacs/init.el index 93fdb10..a9adf81 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -765,9 +765,49 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (ebib-notes-show-note-method 'all) (ebib-notes-file-extension "md") (ebib-notes-template "# %T\n\n%%?") - ) + (ebib-file-associations '(("pdf" . "xdg-open") ("ps" . "gv")))) -;; https://juanjose.garciaripoll.com/blog/managing-bibliographies-from-emacs/index.html +(use-package citar + :ensure t + :custom + (citar-bibliography '("~/Documents/Library/References.bib")) + (citar-library-paths '("~/Documents/Library/Papers"))) + +(use-package bibtex + :custom + (bibtex-dialect 'biblatex) + (bibtex-entry-format '(opts-or-alts + page-dashes + required-fields + numerical-fields + whitespace + last-comma + delimiters + unify-case + sort-fields)) + (bibtex-field-delimiters 'braces) + (bibtex-entry-delimiters 'braces)) + +(use-package biblio + :ensure t + :custom + (biblio-bibtex-use-autokey t) + ;; Use one name, appending ETAL if there is more than one author + ;; The name should be all caps + (bibtex-autokey-names 1) + (bibtex-autokey-name-case-convert-function 'upcase) + (bibtex-autokey-additional-names "ETAL") + ;; Follow this with the full year + ;; Probably don't need more than two digits actually + (bibtex-autokey-name-year-separator "-") + (bibtex-autokey-year-length 4) + ;; Follow this with initials of the title + (bibtex-autokey-year-title-separator "-") + (bibtex-autokey-titlewords t) + (bibtex-autokey-titleword-length -1) ;; One character + (bibtex-autokey-titleword-separator "") + (bibtex-autokey-titleword-case-convert-function 'upcase) + (biblio-download-directory "~/Documents/Library/Papers")) (defun noa/yank-buffer-file-name () -- cgit 1.4.1-2-gfad0