From 594a5a29885bdb9e4d02edd7ac6016beef321c1c Mon Sep 17 00:00:00 2001 From: Shinsuke OTA Date: Tue, 2 Oct 2018 00:09:42 +0900 Subject: [PATCH] [mod] reftex --- init.el | 2 +- inits/30_auctex.el | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 84a8555..4dd7970 100644 --- a/init.el +++ b/init.el @@ -67,7 +67,7 @@ ;; If there is more than one, they won't work right. '(package-selected-packages (quote - (buttercup flycheck auctex yasnippet-snippets helm-c-yasnippet yatemplate yasnippet zenburn-theme yaml-mode smart-mode-line powerline markdown-mode magit madhat2r-theme helm flycheck-popup-tip company color-theme auctex-latexmk atom-one-dark-theme)))) + (js2-mode yasnippet-snippets helm-c-yasnippet yatemplate yasnippet zenburn-theme yaml-mode smart-mode-line powerline markdown-mode magit madhat2r-theme helm flycheck-popup-tip company color-theme auctex-latexmk atom-one-dark-theme)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/inits/30_auctex.el b/inits/30_auctex.el index 0849143..112ad8f 100644 --- a/inits/30_auctex.el +++ b/inits/30_auctex.el @@ -19,15 +19,28 @@ ;; find file in the present directory (setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative) + (add-hook 'LaTeX-mode-hook (lambda () (setq TeX-command-extra-options "-shell-escape") )) + (add-hook 'LaTeX-mode-hook '(lambda () (add-to-list 'TeX-command-list '("LatexMK-pLaTeX" "latexmk -e '$latex=q/platex %%O %(file-line-error) %(extraopts) %S %(mode) %%S/' -e '$bibtex=q/pbibtex %%O %%B/' -e '$biber=q/biber %%O --bblencoding=utf8 -u -U --output_safechars %%B/' -e '$makeindex=q/upmendex %%O -o %%D %%S/' -e '$dvipdf=q/dvipdfmx %%O -o %%D %%S/' -norc -gg -pdfdvi %t" TeX-run-TeX nil (latex-mode) :help "Run LatexMK-pLaTeX")))) + +(setq reftex-bibpath-environment-variables + '("~/Work/Bibtex")) +(setq reftex-use-external-file-finders t) +(setq reftex-external-file-finders + '(("tex" . "kpsewhich -format=.tex %f") + ("bib" . "kpsewhich -format=.bib %f"))) + +(setq reftex-bibliography-commands '("bibliography" "nobibliography" "addbibresource")) + + -- GitLab