[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 45747b9 42/48: Add \eqref to RefTeX's reference
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 45747b9 42/48: Add \eqref to RefTeX's reference styles |
Date: |
Sun, 16 Sep 2018 01:47:27 -0400 (EDT) |
branch: externals/auctex
commit 45747b9b4390371fe138a53751e2c80cac4f8e21
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Add \eqref to RefTeX's reference styles
* style/amsmath.el ("amsmath"): Add \eqref to
`reftex-ref-style-alist' when RefTeX is loaded and activate the
reference style.
---
style/amsmath.el | 77 +++++++++++++++++++++++++++++++++-----------------------
1 file changed, 46 insertions(+), 31 deletions(-)
diff --git a/style/amsmath.el b/style/amsmath.el
index 7495d67..4a2a399 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -98,36 +98,35 @@
'("lvert" TeX-arg-insert-right-brace-maybe)
'("lVert" TeX-arg-insert-right-brace-maybe)
"rvert" "rVert"
- "iint" "iiint" "iiiint" "idotsint"
- )
+ "iint" "iiint" "iiiint" "idotsint")
- (setq LaTeX-item-list
- (append '(("split" . LaTeX-item-equation)
- ("multline" . LaTeX-item-equation)
- ("multline*" . LaTeX-item-equation)
- ("gather" . LaTeX-item-equation)
- ("gather*" . LaTeX-item-equation)
- ("gathered" . LaTeX-item-equation)
- ("align" . LaTeX-item-equation)
- ("align*" . LaTeX-item-equation)
- ("aligned" . LaTeX-item-equation)
- ("alignat" . LaTeX-item-equation-alignat)
- ("alignat*" . LaTeX-item-equation-alignat)
- ("xalignat" . LaTeX-item-equation-alignat)
- ("xalignat*" . LaTeX-item-equation-alignat)
- ("xxalignat" . LaTeX-item-equation-alignat)
- ("alignedat" . LaTeX-item-equation-alignat)
- ("flalign" . LaTeX-item-equation)
- ("flalign*" . 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)
- ("subarray" . LaTeX-item-equation)
- ("cases" . LaTeX-item-equation))
- LaTeX-item-list))
+ (setq LaTeX-item-list
+ (append '(("split" . LaTeX-item-equation)
+ ("multline" . LaTeX-item-equation)
+ ("multline*" . LaTeX-item-equation)
+ ("gather" . LaTeX-item-equation)
+ ("gather*" . LaTeX-item-equation)
+ ("gathered" . LaTeX-item-equation)
+ ("align" . LaTeX-item-equation)
+ ("align*" . LaTeX-item-equation)
+ ("aligned" . LaTeX-item-equation)
+ ("alignat" . LaTeX-item-equation-alignat)
+ ("alignat*" . LaTeX-item-equation-alignat)
+ ("xalignat" . LaTeX-item-equation-alignat)
+ ("xalignat*" . LaTeX-item-equation-alignat)
+ ("xxalignat" . LaTeX-item-equation-alignat)
+ ("alignedat" . LaTeX-item-equation-alignat)
+ ("flalign" . LaTeX-item-equation)
+ ("flalign*" . 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)
+ ("subarray" . LaTeX-item-equation)
+ ("cases" . LaTeX-item-equation))
+ LaTeX-item-list))
;; When `LaTeX-amsmath-label' is nil, use value of LaTeX-equation-label:
(unless LaTeX-amsmath-label
@@ -156,9 +155,25 @@
;; So we run their hooks, too.
(TeX-run-style-hooks "amstext" "amsbsy" "amsopn")
- ;; If RefTeX is loaded, make it recognize the amsmath environments.
+ ;; RefTeX support: Tell RefTeX about amsmath environments.
(when (fboundp 'reftex-add-to-label-alist)
- (reftex-add-to-label-alist '(AMSTeX)))))
+ (reftex-add-to-label-alist '(AMSTeX)))
+
+ ;; Add \eqref to `reftex-ref-style-alist' and associate it to `e'
+ (when (and (boundp 'reftex-ref-style-alist)
+ ;; check if Emacs is already equipped with this
+ (not (assoc "AMSmath" reftex-ref-style-alist)))
+ ;; Append it to a local version in order to avoid a clash with
+ ;; user settings
+ (add-to-list (make-local-variable 'reftex-ref-style-alist)
+ '("AMSmath" "amsmath" (("\\eqref" ?e)))
+ t))
+
+ ;; Activate `AMSmath' when `LaTeX-reftex-ref-style-auto-activate'
+ ;; is non-nil
+ (and LaTeX-reftex-ref-style-auto-activate
+ (fboundp 'reftex-ref-style-activate)
+ (reftex-ref-style-activate "AMSmath"))))
LaTeX-dialect)
(defun LaTeX-amsmath-env-alignat (env)
- [elpa] externals/auctex 5ce08ab 33/48: Raise robustness of call of dvipng command, (continued)
- [elpa] externals/auctex 5ce08ab 33/48: Raise robustness of call of dvipng command, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 3741b8c 26/48: Prepare for UTF-8 with BOM, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 4816092 36/48: Fix possible endless loop, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 74c4843 40/48: Add new style/thmtools.el and style/thm-restate.el, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex ff8f183 39/48: ; * style/floatrow.el (LaTeX-floatrow-update-key-val-options): Use `setq' inside the loop., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex e0caf59 25/48: Drop compatibility code for older emacsen in preview-latex, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 1fef01c 45/48: Update style/lettrine.el to package version 2.01, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex cff843b 17/48: Remove obsolete option related to Japanese TeX, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a59c754 35/48: Adjust test for known emacs bug, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 0d5c1c0 41/48: ; Fix last commit and push missing Makefile.in., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 45747b9 42/48: Add \eqref to RefTeX's reference styles,
Tassilo Horn <=
- [elpa] externals/auctex a8ea127 29/48: Accept non-ascii file name in accord with change in TL 2018, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 48325a7 20/48: Update URLs further, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 8d30dc1 37/48: Add new style/marginnote.el, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 5df288d 44/48: ; Remove unwanted spaces., Tassilo Horn, 2018/09/16
- [elpa] externals/auctex a7cde09 47/48: Update style/lettrine.el to package version 2.21, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 31ee142 38/48: Fix regression of `TeX-view', Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 80bcd0a 46/48: Update style/lettrine.el to package version 2.1, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 168a4a1 19/48: Update URLs, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex c3cf39e 34/48: Make preamble caching robust to LuaLaTeX and (u)pLaTeX, Tassilo Horn, 2018/09/16
- [elpa] externals/auctex 03ba1fa 43/48: Add new style/ocg-p.el and style/ocgx.el, Tassilo Horn, 2018/09/16