Created
September 5, 2011 19:34
-
-
Save anonymous/1195737 to your computer and use it in GitHub Desktop.
Enabling math specific syntax highlighting/prettifying in auctex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Code from Phil Hirschhorn's suggestion | |
(add-hook 'LaTeX-mode-hook 'add-my-latex-environments) | |
(defun add-my-latex-environments () | |
(LaTeX-add-environments | |
'("dmath" LaTeX-env-label))) | |
;; Code I added to make syntax highlighting work in Auctex | |
(custom-set-variables | |
'(font-latex-math-environments (quote | |
("display" "displaymath" "equation" "eqnarray" "gather" "multline" | |
"align" "alignat" "xalignat" "dmath"))) | |
'(TeX-insert-braces nil)) ;;Stops putting {} on argumentless commands to "save" whitespace | |
;; Additionally, reftex code to recognize this environment as an equation | |
(setq reftex-label-alist | |
'(("dmath" ?e nil nil t))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment