aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-12-14 22:25:03 +0800
committerAaron LI <aaronly.me@outlook.com>2016-12-14 22:25:03 +0800
commite1c6811f302fcfe1ff4825eb471d2c5c99fd0eb8 (patch)
treeab80f53d4595290dd88c7e1ac3565c567d349032
parentc27bf7a0dccda439982be6266738f47e7c5b8a91 (diff)
downloaddotfiles-e1c6811f302fcfe1ff4825eb471d2c5c99fd0eb8.tar.bz2
_spacemacs: Configure "helm-bibtex"
-rw-r--r--_spacemacs.d/init.el22
1 files changed, 16 insertions, 6 deletions
diff --git a/_spacemacs.d/init.el b/_spacemacs.d/init.el
index 3425a26..c961dfa 100644
--- a/_spacemacs.d/init.el
+++ b/_spacemacs.d/init.el
@@ -74,14 +74,13 @@
auto-completion-enable-sort-by-usage t
auto-completion-private-snippets-directory
"~/.spacemacs.d/snippets/")
- ;; better-defaults
bibtex
c-c++
(chinese :variables chinese-enable-fcitx t)
(clojure :variables clojure-enable-fancify-symbols t)
colors
emacs-lisp
- ess ; R programming language
+ ess ; For `R' programming language
games
git
html
@@ -458,13 +457,24 @@
;; Set monospaced font size for Chinese (from `chinese' layer)
(spacemacs//set-monospaced-font "M+ 1mn" "WenQuanYi Zen Hei" 14 14)
;;
- ;; Configure the BibTeX file for `org-ref' from `bibtex' layer
+ ;; Configure BibTeX completion for `helm-bibtex'
+ (setq bibtex-completion-bibliography '("~/papers/references.bib"))
+ (setq bibtex-completion-library-path "~/papers/") ;; where to find PDFs
+ (setq bibtex-completion-notes-path "~/papers/notes.org")
+ (setq bibtex-completion-pdf-field "File")
+ (setq bibtex-completion-pdf-open-function
+ (lambda (fpath)
+ (start-process "xdg-open" "*helm-bibtex-open*" "xdg-open" fpath)))
+ (setq bibtex-completion-display-formats
+ '((article . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${journal:40}")
+ (inbook . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} Chapter ${chapter:32}")
+ (incollection . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
+ (inproceedings . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*} ${booktitle:40}")
+ (t . "${=has-pdf=:1}${=has-note=:1} ${=type=:3} ${year:4} ${author:36} ${title:*}")))
+ ;; Configure the BibTeX file for `org-ref'
(setq org-ref-default-bibliography '("~/papers/references.bib")
org-ref-pdf-directory "~/papers/"
org-ref-bibliography-notes "~/papers/notes.org")
- (setq org-ref-open-pdf-function
- (lambda (fpath)
- (start-process "xdg-open" "*helm-bibtex-open*" "xdg-open" fpath)))
;;
;; ESS: Turn off the automatic replacement of `_' by `<-'
(add-hook 'ess-mode-hook (lambda () (ess-toggle-underscore nil)))