From fecccbbd4287783e53937d9a1374490773ae9c5d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 15 Dec 2015 22:20:33 -0600 Subject: [PATCH] move reftex to don-configuration --- emacs_el/configuration/don-configuration.org | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index e679343..6ecba9f 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -13,6 +13,8 @@ (add-to-list 'load-path '"~/lib/emacs_el/helm") (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/tiny") (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/other") + (add-to-list 'load-path '"~/lib/emacs_el/auctex/lisp") + (add-to-list 'load-path '"~/lib/emacs_el/ESS/lisp") #+END_SRC @@ -89,6 +91,85 @@ (tramp-remote-shell "/bin/sh") (tramp-remote-shell-args ("-c")))) +#+END_SRC +** LaTeX +#+BEGIN_SRC emacs-lisp :tangle don-configuration.el + ; this is in the very newest auctex; avoid for now + (add-to-list 'LaTeX-fill-excluded-macros + '("Sexpr")) + ;; REFTEX (much enhanced management of cross-ref, labels, etc) + ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/ + (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t) + (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil) + (autoload 'reftex-citation "reftex-cite" "Make citation" nil) + (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t) + (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 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode + (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode + + ; use smart quotes by default instead of `` and '' + ; taken from http://kieranhealy.org/esk/kjhealy.html + (setq TeX-open-quote "“") + (setq TeX-close-quote "”") + + ;; (TeX-add-style-hook + ;; "latex" + ;; (lambda () + ;; (TeX-add-symbols + ;; '("DLA" 1)))) + ;; (custom-set-variables + ;; '(font-latex-user-keyword-classes + ;; '(("fixme" + ;; ("DLA" "RZ") + ;; font-lock-function-name-face 2 (command 1 t)))) + ;; ) + + (require 'font-latex) + (setq font-latex-match-reference-keywords + '( + ("fref" "{") + ("Fref" "{") + ("citep" "{") + ("citet" "{") + ("acs" "{") + ("acsp" "{") + ("ac" "{") + ("acp" "{") + ("acl" "{") + ("aclp" "{") + ("acsu" "{") + ("aclu" "{") + ("acused" "{") + ; )) + ; (setq font-latex-match-warning-keywords + ; '( + ("DLA" "{") + ("RZ" "{") + ("OM" "{") + ("DL" "{") + ("fixme" "{"))) + + (setq-default TeX-parse-self t) + (setq-default TeX-auto-save t) + (setq-default TeX-master nil) + + ;; this doesn't seem to work; not currently sure why + ; (setq font-latex-user-keyword-classes + ; '(("my-warning-commands" + ; (("DLA" "{") + ; ("RZ" "{") + ; ("OM" "{") + ; ("DL" "{") + ; ("fixme" "{") + ; ) + ; (:foreground "red" :weight bold :underline (:color foreground-color :style line))) + ; )) + + (setq-default reftex-default-bibliography + '("~/projects/research/references.bib")) + + #+END_SRC * Keybindings ** Override other things -- 2.39.5