The Revolver’s Notepad

Emacs configurations — AucTeX

Posted in Quick References by Vincent on September 10, 2010

Here is the setting for working with Emacs and AucTeX under MS Windows.

;;; auctex
;; (add-to-list 'load-path "~/.emacs.d/site-lisp/auctex-11.85")
(load "auctex.el" nil t t)
(require 'latex)
(require 'tex-site)
(require 'tex-mik)

;; Set the default PDF reader to SumatraPDF. The executable should be in PATH
(setq TeX-view-style (quote (("^epsf$" "SumatraPDF.exe %f") ("." "yap -1 %dS %d"))))

(setq TeX-output-view-style 
       (("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$" "dvips %d -o && start %f") 
        ("^dvi$" "." "yap -1 %dS %d") 
        ("^pdf$" "." "SumatraPDF.exe -reuse-instance %o") 
        ("^html?$" "." "start %o"))))

;; Some helpful settings
(setq TeX-auto-untabify t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(setq TeX-electric-escape t)
(setq-default TeX-PDF-mode t)

(add-to-list 'LaTeX-indent-environment-list '("tikzpicture"))
(add-to-list 'LaTeX-verbatim-environments "comment")

;; Start RefTeX
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(add-hook 'latex-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)

Tagged with: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: