Add module-latex
This commit is contained in:
parent
96f9d1dd44
commit
c71cc10f98
3 changed files with 42 additions and 36 deletions
40
modules/module-latex.el
Normal file
40
modules/module-latex.el
Normal file
|
@ -0,0 +1,40 @@
|
|||
;;; module-latex.el
|
||||
|
||||
(defvar bibtex-dir "~/Dropbox/docs/biblio")
|
||||
|
||||
(use-package reftex
|
||||
:commands turn-on-reftex
|
||||
:init
|
||||
(setq reftex-plug-into-AUCTeX t
|
||||
reftex-ref-style-default-list '("Cleveref" "Hyperref" "Fancyref")
|
||||
reftex-default-bibliography
|
||||
`(,(expand-file-name "phys.bib" bibtex-dir)))
|
||||
(add-hook! (LaTeX-mode latex-mode) 'turn-on-reftex))
|
||||
|
||||
(use-package helm-bibtex
|
||||
:commands helm-bibtex
|
||||
:init
|
||||
(setq TeX-auto-save t
|
||||
TeX-parse-self t
|
||||
bibtex-dialect 'biblatex
|
||||
bibtex-align-at-equal-sign t
|
||||
bibtex-text-indentation 20)
|
||||
(add-hook! bibtex-mode
|
||||
(local-set-key (kbd "C-c \\") 'bibtex-fill-entry)
|
||||
(setq fill-column 140))
|
||||
(add-hook! (LaTeX-mode latex-mode) 'turn-on-auto-fill)
|
||||
|
||||
:config
|
||||
(setq helm-bibtex-bibliography
|
||||
(list (f-expand "phys.bib" bibtex-dir))
|
||||
|
||||
helm-bibtex-library-path
|
||||
(list (f-expand "phys-pdf" bibtex-dir))
|
||||
|
||||
helm-bibtex-notes-path (f-expand "notes.org" bibtex-dir)
|
||||
|
||||
helm-bibtex-pdf-open-function
|
||||
(lambda (fpath) (async-start-process "open-pdf" "/usr/bin/open" nil fpath))))
|
||||
|
||||
(provide 'module-latex)
|
||||
;;; module-latex.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue