dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 06296000c7bd0b80b34c0ccf514cab8a955b5895
parent 35e9bfc827cd01f27bdb9dc228f3ab0c04e7abe0
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Tue,  6 May 2014 11:03:11 +0200

added reftex to tex and org modes

Diffstat:
M.emacs.d/init.el | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -36,6 +36,8 @@ helm ; Emacs incremental and narrowing framework popup ; visual popup interface library ;doxymacs ; doxygen integration + auctex ; advanced LaTeX mode + reftex ; BiBTeX references powerline ; powerline for emacs rainbow-delimiters ; color nested parantheses magit ; emacs mode for git @@ -173,7 +175,33 @@ ; ("\\paragraph{%s" . "\\paragraph*{%s}") ; ("\\subparagraph{%s" . "\\subparagraph*{%s}"))) + +;; reftex for BiBTeX references +;; Create label with C-c (, reference label with C-c ) +;; Reference citation with C-c [ t (for citet) or C-c [ p (for citep) +;(setq reftex-plug-into AUCTeX t) (setq reftex-default-bibliography '("/home/adc/owncloud/articles/adc-articles/BIBnew.bib")) +(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode +(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode +(add-hook 'org-mode-hook 'turn-on-reftex) ; with Org mode +(setq reftex-cite-format 'natbib) + +;; Enable reftex in org mode +;(defun org-mode-reftex-setup () +; (load-library "reftex") +; (and (buffer-file-name) (file-exists-p (buffer-file-name)) +; (progn +; ; enable auto-revert-mode to update reftex when bibtex file changes +; (global-auto-revert-mode t) +; (reftex-parse-all) +; ; add a custom cite format to insert link +; (reftex-set-cite-format "** [[papers:%l][%l]]: %t \n" +; ))) +; (define-key org-mode-map (kbd "C-c )") 'reftex-citation) +;) +;(add-hook 'org-mode-hook 'org-mode-reftex-setup) +;(setq org-link-abbrev-alist +; '(("papers" . "/home/adc/owncloud/articles/adc-articles/BIBnew.bib"))) ;; automatic LaTeX make, sometimes causes problems with references ;(setq org-latex-pdf-process (list "latexmk -pdf -bibtex %f"))