CVSROOT: /cvsroot/auctex Module name: auctex Changes by: Ralf Angeli <angeli> 13/01/06 17:37:21
Index: style/mathtools.el =================================================================== RCS file: /cvsroot/auctex/auctex/style/mathtools.el,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- style/mathtools.el 26 Dec 2012 10:45:47 -0000 1.1 +++ style/mathtools.el 6 Jan 2013 17:37:21 -0000 1.2 @@ -36,6 +36,12 @@ ;;; Code: +;; amsmath options which can be passed directly to mathtools are +;; appended in the style hook below +(defvar LaTeX-mathtools-package-options + '("fixamsmath" "donotfixamsmathbugs" "allowspaces" "disallowspaces") + "Package options for the mathtools package.") + (defvar LaTeX-mathtools-key-val-options "Options for the \\mathtoolsset command" '(("showonlyrefs") @@ -52,12 +58,15 @@ (TeX-add-style-hook "mathtools" - (function (lambda () ;; mathtools requires amsmath, as some bugs in amsmath are fixed (TeX-run-style-hooks "amsmath") + (setq LaTeX-mathtools-package-options + (append LaTeX-mathtools-package-options + LaTeX-amsmath-package-options)) + (LaTeX-add-environments '("lgathered" LaTeX-amsmath-env-aligned) '("rgathered" LaTeX-amsmath-env-aligned) @@ -158,7 +167,7 @@ (append '(("lgathered" . LaTeX-amsmath-label) ("rgathered" . LaTeX-amsmath-label) ("multlined" . LaTeX-amsmath-label) - LaTeX-label-alist)))))) + LaTeX-label-alist))))) (defun LaTeX-mathtools-env-matrix-starred (env) (let ((where (read-string "(optional) Vertical placement of columns: "))) @@ -188,10 +197,4 @@ (LaTeX-insert-environment env extra) (newline-and-indent))) -;; amsmath options can also be passed directly to mathtools -(defvar LaTeX-mathtools-package-options - (append '("fixamsmath" "donotfixamsmathbugs" - "allowspaces" "disallowspaces") LaTeX-amsmath-package-options) - "Package options for the mathtools package.") - ;;; mathtools.el ends here. _______________________________________________ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs