[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 20/299: * style/mathtools.el ("mathtools"): Append amsmath option
From: |
Stefan Monnier |
Subject: |
[elpa] 20/299: * style/mathtools.el ("mathtools"): Append amsmath options to mathtools option after the amsmath style file has been loaded. Remove `function' wrapper. |
Date: |
Sun, 02 Nov 2014 03:09:56 +0000 |
monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 8908e1f1eb1a7d25d5179f5b133e798039ca9bd7
Author: Ralf Angeli <address@hidden>
Date: Sun Jan 6 17:37:21 2013 +0000
* style/mathtools.el ("mathtools"): Append amsmath options to
mathtools option after the amsmath style file has been loaded.
Remove `function' wrapper.
---
ChangeLog | 6 ++
style/mathtools.el | 229 ++++++++++++++++++++++++++--------------------------
2 files changed, 122 insertions(+), 113 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ea8c45c..c1250eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-06 Ralf Angeli <address@hidden>
+
+ * style/mathtools.el ("mathtools"): Append amsmath options to
+ mathtools option after the amsmath style file has been loaded.
+ Remove `function' wrapper.
+
2013-01-05 Ralf Angeli <address@hidden>
* Makefile.in (STYLESRC): Activate new style files.
diff --git a/style/mathtools.el b/style/mathtools.el
index 082d7e1..102e25d 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -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,113 +58,116 @@
(TeX-add-style-hook
"mathtools"
- (function
- (lambda ()
-
- ;; mathtools requires amsmath, as some bugs in amsmath are fixed
- (TeX-run-style-hooks "amsmath")
-
- (LaTeX-add-environments
- '("lgathered" LaTeX-amsmath-env-aligned)
- '("rgathered" LaTeX-amsmath-env-aligned)
- '("multlined" LaTeX-mathtools-env-multlined)
- '("matrix*" LaTeX-mathtools-env-matrix-starred)
- '("pmatrix*" LaTeX-mathtools-env-matrix-starred)
- '("bmatrix*" LaTeX-mathtools-env-matrix-starred)
- '("Bmatrix*" LaTeX-mathtools-env-matrix-starred)
- '("vmatrix*" LaTeX-mathtools-env-matrix-starred)
- '("Vmatrix*" LaTeX-mathtools-env-matrix-starred)
- '("spreadlines" LaTeX-mathtools-env-spreadlines)
- "dcases" "dcases*")
-
- (TeX-add-symbols
- '("mathtoolsset" (TeX-arg-key-val LaTeX-mathtools-key-val))
- '("mathclap" 1)
- '("mathllap" ["Mathstyle"] t)
- '("mathrlap" ["Mathstyle"] t)
- '("mathclap" ["Mathstyle"] t)
- '("mathmakebox" [TeX-arg-size] [ TeX-arg-size ] 1)
- '("clap" 1)
- '("mathmbox" 1)
- '("cramped" 1)
- '("crampedllap" [ "Mathstye" ] t)
- '("crampedrlap" [ "Mathstyle" ] t)
- '("crampedclap" [ "Mathstyle" ] t)
- '("smashoperator" [ "Position (l, r or lr (default)" ] 2)
- ;; 3.1.4 Adjusting the limits of operators
- ;; explicit argument encapsulation does not seem to be required
- '("adjustlimits" 4)
- ;; 3.2 Controlling tags
- '("newtagform" "Name" ["Inner format"] "Left" "Right")
- '("renewtagform" "Name" ["Inner format"] "Left" "Right")
- '("usetagform" "Name")
- '("xleftrightarrow" ["Below"] "Above")
- '("xLeftarrow" ["Below"] "Above")
- '("xRightarrow" ["Below"] "Above")
- '("xLeftrightarrow" ["Below"] "Above")
- '("xhookleftarrow" ["Below"] "Above")
- '("xhookrightarrow" ["Below"] "Above")
- '("xmapsto" ["Below"] "Above")
- '("xrightharpoondown" ["Below"] "Above")
- '("xrightharpoonup" ["Below"] "Above")
- '("xleftharpoondown" ["Below"] "Above")
- '("xleftharpoonup" ["Below"] "Above")
- '("xrightleftharpoons" ["Below"] "Above")
- '("xleftrightharpoons" ["Below"] "Above")
- '("underbracket" [ "Rule thickness" ] [ "Bracket height" ] t)
- '("overbracket" [ "Rule thickness" ] [ "Bracket height" ] t)
- '("underbrace" 1)
- '("overbrace" 1)
- '("LaTeXunderbrace" 1)
- '("LaTeXoverbrace" 1)
- ;; 3.4.2
- '("shoveleft" [ TeX-arg-size ] 1)
- '("shoveright" [ TeX-arg-size ] 1)
- ;; don't understand t, but intertext in amsmath.el uses it
- '("shortintertext" t)
- '("DeclarePairedDelimeter" TeX-arg-macro "Left delimeter" "Right
delimeter")
- ;; 3.4.4
- '("MoveEqLeft" [ "Number" ])
- '("ArrowBetweenLines" [ TeX-arg-macro ] )
- '("ArrowBetweenLines*" [ TeX-arg-macro ] )
- ;; colon operators
- "vcentcolon" "ordinarycolon" "coloneqq" "Coloneqq"
- "coloneq" "Coloneq" "eqqcolon" "Eqqcolon" "eqcolon"
- "Eqcolon" "colonapprox" "Colonapprox" "colonsim" "Colonsim"
- ;; 3.7.1
- "lparen" "rparen"
- ;; left sub/superscripts
- '("prescript" "Below" "Above" t)
- ;; Declaring math sizes; this command doesn't seem so relevant, but
- ;; for completion, it's included
- '("DeclareMathSizes" 4)
- ;; Gathered envionments
- '("newgather" "Name" "Pre-line" "Post-line" "After")
- '("renewgather" "Name" "Pre-line" "Post-line" "After")
- ;; Split fractions
- '("splitfrac" 2)
- '("splitdfrac" 2))
-
- (setq LaTeX-item-list
- (append '(("multlined" . LaTeX-item-equation)
- ("lgathered" . LaTeX-item-equation)
- ("rgathered" . LaTeX-item-equation)
- ("spreadlines" . LaTeX-item-equation)
- ("matrix*" . LaTeX-item-equation)
- ("pmatrix*" . LaTeX-item-equation)
- ("bmatrix*" . LaTeX-item-equation)
- ("Bmatrix*" . LaTeX-item-equation)
- ("vmatrix*" . LaTeX-item-equation)
- ("Vmatrix*" . LaTeX-item-equation)
- ("dcases" . LaTeX-item-equation)
- ("dcases*" . LaTeX-item-equation))
- LaTeX-item-list))
-
- (setq LaTeX-label-alist
- (append '(("lgathered" . LaTeX-amsmath-label)
- ("rgathered" . LaTeX-amsmath-label)
- ("multlined" . LaTeX-amsmath-label)
- LaTeX-label-alist))))))
+ (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)
+ '("multlined" LaTeX-mathtools-env-multlined)
+ '("matrix*" LaTeX-mathtools-env-matrix-starred)
+ '("pmatrix*" LaTeX-mathtools-env-matrix-starred)
+ '("bmatrix*" LaTeX-mathtools-env-matrix-starred)
+ '("Bmatrix*" LaTeX-mathtools-env-matrix-starred)
+ '("vmatrix*" LaTeX-mathtools-env-matrix-starred)
+ '("Vmatrix*" LaTeX-mathtools-env-matrix-starred)
+ '("spreadlines" LaTeX-mathtools-env-spreadlines)
+ "dcases" "dcases*")
+
+ (TeX-add-symbols
+ '("mathtoolsset" (TeX-arg-key-val LaTeX-mathtools-key-val))
+ '("mathclap" 1)
+ '("mathllap" ["Mathstyle"] t)
+ '("mathrlap" ["Mathstyle"] t)
+ '("mathclap" ["Mathstyle"] t)
+ '("mathmakebox" [TeX-arg-size] [ TeX-arg-size ] 1)
+ '("clap" 1)
+ '("mathmbox" 1)
+ '("cramped" 1)
+ '("crampedllap" [ "Mathstye" ] t)
+ '("crampedrlap" [ "Mathstyle" ] t)
+ '("crampedclap" [ "Mathstyle" ] t)
+ '("smashoperator" [ "Position (l, r or lr (default)" ] 2)
+ ;; 3.1.4 Adjusting the limits of operators
+ ;; explicit argument encapsulation does not seem to be required
+ '("adjustlimits" 4)
+ ;; 3.2 Controlling tags
+ '("newtagform" "Name" ["Inner format"] "Left" "Right")
+ '("renewtagform" "Name" ["Inner format"] "Left" "Right")
+ '("usetagform" "Name")
+ '("xleftrightarrow" ["Below"] "Above")
+ '("xLeftarrow" ["Below"] "Above")
+ '("xRightarrow" ["Below"] "Above")
+ '("xLeftrightarrow" ["Below"] "Above")
+ '("xhookleftarrow" ["Below"] "Above")
+ '("xhookrightarrow" ["Below"] "Above")
+ '("xmapsto" ["Below"] "Above")
+ '("xrightharpoondown" ["Below"] "Above")
+ '("xrightharpoonup" ["Below"] "Above")
+ '("xleftharpoondown" ["Below"] "Above")
+ '("xleftharpoonup" ["Below"] "Above")
+ '("xrightleftharpoons" ["Below"] "Above")
+ '("xleftrightharpoons" ["Below"] "Above")
+ '("underbracket" [ "Rule thickness" ] [ "Bracket height" ] t)
+ '("overbracket" [ "Rule thickness" ] [ "Bracket height" ] t)
+ '("underbrace" 1)
+ '("overbrace" 1)
+ '("LaTeXunderbrace" 1)
+ '("LaTeXoverbrace" 1)
+ ;; 3.4.2
+ '("shoveleft" [ TeX-arg-size ] 1)
+ '("shoveright" [ TeX-arg-size ] 1)
+ ;; don't understand t, but intertext in amsmath.el uses it
+ '("shortintertext" t)
+ '("DeclarePairedDelimeter" TeX-arg-macro "Left delimeter" "Right
delimeter")
+ ;; 3.4.4
+ '("MoveEqLeft" [ "Number" ])
+ '("ArrowBetweenLines" [ TeX-arg-macro ] )
+ '("ArrowBetweenLines*" [ TeX-arg-macro ] )
+ ;; colon operators
+ "vcentcolon" "ordinarycolon" "coloneqq" "Coloneqq"
+ "coloneq" "Coloneq" "eqqcolon" "Eqqcolon" "eqcolon"
+ "Eqcolon" "colonapprox" "Colonapprox" "colonsim" "Colonsim"
+ ;; 3.7.1
+ "lparen" "rparen"
+ ;; left sub/superscripts
+ '("prescript" "Below" "Above" t)
+ ;; Declaring math sizes; this command doesn't seem so relevant, but
+ ;; for completion, it's included
+ '("DeclareMathSizes" 4)
+ ;; Gathered envionments
+ '("newgather" "Name" "Pre-line" "Post-line" "After")
+ '("renewgather" "Name" "Pre-line" "Post-line" "After")
+ ;; Split fractions
+ '("splitfrac" 2)
+ '("splitdfrac" 2))
+
+ (setq LaTeX-item-list
+ (append '(("multlined" . LaTeX-item-equation)
+ ("lgathered" . LaTeX-item-equation)
+ ("rgathered" . LaTeX-item-equation)
+ ("spreadlines" . LaTeX-item-equation)
+ ("matrix*" . LaTeX-item-equation)
+ ("pmatrix*" . LaTeX-item-equation)
+ ("bmatrix*" . LaTeX-item-equation)
+ ("Bmatrix*" . LaTeX-item-equation)
+ ("vmatrix*" . LaTeX-item-equation)
+ ("Vmatrix*" . LaTeX-item-equation)
+ ("dcases" . LaTeX-item-equation)
+ ("dcases*" . LaTeX-item-equation))
+ LaTeX-item-list))
+
+ (setq LaTeX-label-alist
+ (append '(("lgathered" . LaTeX-amsmath-label)
+ ("rgathered" . LaTeX-amsmath-label)
+ ("multlined" . LaTeX-amsmath-label)
+ 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.
- [elpa] 05/299: * style/footmisc.el: New style by Mads Jensen <address@hidden>., (continued)
- [elpa] 05/299: * style/footmisc.el: New style by Mads Jensen <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 17/299: * style/everysel.el: Fix typos., Stefan Monnier, 2014/11/01
- [elpa] 18/299: * style/afterpage.el: New style by Mads Jensen <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 10/299: * amsmath.el ("amsmath"): Add support for the alignedat and subarray environments. Also, add support for the shoveright and shoveleft macros. * font-latex.el (font-latex-math-environments): Add "xxalignat" and "flalign"., Stefan Monnier, 2014/11/01
- [elpa] 08/299: * style/ragged2e.el: New style by Mads Jensen <address@hidden>. * style/mathtools.el: Ditto. * style/everysel.el: Ditto. * style/bigstrut.el: Ditto. * style/bigdelim.el: Ditto., Stefan Monnier, 2014/11/01
- [elpa] 19/299: * ChangeLog: Move name of style file contributors to head of ChangLog entries., Stefan Monnier, 2014/11/01
- [elpa] 21/299: * style/footmisc.el ("footmisc"): Remove fontification settings for length macros., Stefan Monnier, 2014/11/01
- [elpa] 06/299: * latex.el (LaTeX-math-default): Added unicode character position to some entries and "mathring" entry. (LaTeX-common-initialization): Added support for accent macros \hat, \dot etc and \textasteriskcentered., Stefan Monnier, 2014/11/01
- [elpa] 16/299: * latex.el (LaTeX-pagestyle-list): New variable. (TeX-arg-pagestyle): Use it. * style/imakeidx.el: New style by Mosè Giordano <address@hidden>., Stefan Monnier, 2014/11/01
- [elpa] 22/299: * style/epigraph.el ("epigraph"): Do not quote list entries for `font-latex-add-keywords'., Stefan Monnier, 2014/11/01
- [elpa] 20/299: * style/mathtools.el ("mathtools"): Append amsmath options to mathtools option after the amsmath style file has been loaded. Remove `function' wrapper.,
Stefan Monnier <=
- [elpa] 12/299: * style/siunitx.el (LaTeX-siunitx-package-options): New variable. ("siunitx"): Use it. * style/hyperref.el (LaTeX-hyperref-href-options): New variable. (LaTeX-hyperref-package-options, "hyperref"): Use it., Stefan Monnier, 2014/11/01
- [elpa] 04/299: * style/bm.el: New style by Mosè Giordano <address@hidden>. * style/siunitx.el: Ditto., Stefan Monnier, 2014/11/01
- [elpa] 03/299: * tex-bar.el (TeX-bar-LaTeX-buttons, TeX-bar-LaTeX-button-alist): Also add spell button., Stefan Monnier, 2014/11/01
- [elpa] 27/299: * latex.el (TeX-arg-environment): Fix typo., Stefan Monnier, 2014/11/01
- [elpa] 25/299: * tex.el (TeX-command-list): Add command to run ChkTeX., Stefan Monnier, 2014/11/01
- [elpa] 23/299: * latex.el (LaTeX-env-document): Only insert \documentclass in case the document does not already contain one., Stefan Monnier, 2014/11/01
- [elpa] 26/299: * latex.el: Update copyright range. (LaTeX-auto-pagestyle-regexp-list): New variable. (LaTeX-auto-regexp-list): Use `LaTeX-auto-pagestyle-regexp-list'. ("pagestyle"): New type for the parser. (LaTeX-pagestyle-list): Remove. (TeX-arg-pagestyle): Use `LaTeX-pagestyle-list' function for completing. (LaTeX-common-initialization): Initialize pagestyles. * style/imakeidx.el: Use `LaTeX-pagestyle-list' function to set `firstpagestyle' option values., Stefan Monnier, 2014/11/01
- [elpa] 24/299: * Makefile.in (STYLESRC): Add new style files kantlipsum.el, lipsum.el, and longtable.el. * style/kantlipsum.el: New style. * style/lipsum.el: Ditto. * style/longtable.el: Ditto, Stefan Monnier, 2014/11/01
- [elpa] 29/299: * style/pstricks.el (LaTeX-pstricks-package-options): New variable., Stefan Monnier, 2014/11/01
- [elpa] 28/299: * Makefile.in (STYLESRC): Enable memoir.el style. * style/memoir.el: New style., Stefan Monnier, 2014/11/01