[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 3cd7a352d3 07/24: Add support for
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 3cd7a352d3 07/24: Add support for indent for environments with alignment |
Date: |
Mon, 21 Feb 2022 02:38:46 -0500 (EST) |
branch: externals/auctex
commit 3cd7a352d3445684015196371070895231e0bf39
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Add support for indent for environments with alignment
* latex.el (LaTeX-indent-environment-list): Move align, align* and
equation* environment to amsmath.el.
* style/amsmath.el ("amsmath"): Add amsmath environments with
alignment to local value of `LaTeX-indent-environment-list'.
Add smallmatrix environment to `LaTeX-item-list'.
* style/mathtools.el ("mathtools"): Add mathtools environments with
alignment to local value of `LaTeX-indent-environment-list'.
Add FIXME comment to `LaTeX-item-list' for spreadlines environment.
Update copyright year.
TODO: Add support for empheq environment as well. It would be
necessary to implement a new function which looks into the argument of
empheq environment and indents approapriately.
---
latex.el | 5 +----
style/amsmath.el | 27 ++++++++++++++++++++++++++-
style/mathtools.el | 28 +++++++++++++++++++++++++++-
3 files changed, 54 insertions(+), 6 deletions(-)
diff --git a/latex.el b/latex.el
index ad71d28c6e..e361c214ff 100644
--- a/latex.el
+++ b/latex.el
@@ -1,6 +1,6 @@
;;; latex.el --- Support for LaTeX documents. -*- lexical-binding: t; -*-
-;; Copyright (C) 1991, 1993-2021 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1993-2022 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Keywords: tex
@@ -3542,8 +3542,6 @@ consideration just as is in the non-commented source
code."
("filecontents*" current-indentation)
("tabular" LaTeX-indent-tabular)
("tabular*" LaTeX-indent-tabular)
- ("align" LaTeX-indent-tabular)
- ("align*" LaTeX-indent-tabular)
("array" LaTeX-indent-tabular)
("eqnarray" LaTeX-indent-tabular)
("eqnarray*" LaTeX-indent-tabular)
@@ -3551,7 +3549,6 @@ consideration just as is in the non-commented source
code."
;; Some other day.
("displaymath")
("equation")
- ("equation*")
("picture")
("tabbing"))
"Alist of environments with special indentation.
diff --git a/style/amsmath.el b/style/amsmath.el
index a2b7831fa3..e3cce752d7 100644
--- a/style/amsmath.el
+++ b/style/amsmath.el
@@ -1,6 +1,6 @@
;;; amsmath.el --- Style hook for the AMS-LaTeX amsmath package. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2002, 2005-2007, 2012-2014, 2017-2020
+;; Copyright (C) 2002, 2005-2007, 2012-2014, 2017-2020, 2022
;; Free Software Foundation, Inc.
;; FIXME: What about the copyright for <= 2001?
@@ -132,6 +132,7 @@
("Bmatrix" . LaTeX-item-equation)
("vmatrix" . LaTeX-item-equation)
("Vmatrix" . LaTeX-item-equation)
+ ("smallmatrix" . LaTeX-item-equation)
("subarray" . LaTeX-item-equation)
("cases" . LaTeX-item-equation))
LaTeX-item-list))
@@ -151,6 +152,30 @@
("flalign" . LaTeX-amsmath-label)
("gather" . LaTeX-amsmath-label))))
+ (setq-local LaTeX-indent-environment-list
+ (append LaTeX-indent-environment-list
+ '(("equation*")
+ ("align" LaTeX-indent-tabular)
+ ("align*" LaTeX-indent-tabular)
+ ("aligned" LaTeX-indent-tabular)
+ ("alignat" LaTeX-indent-tabular)
+ ("alignat*" LaTeX-indent-tabular)
+ ("alignedat" LaTeX-indent-tabular)
+ ("xalignat" LaTeX-indent-tabular)
+ ("xalignat*" LaTeX-indent-tabular)
+ ("xxalignat" LaTeX-indent-tabular)
+ ("flalign" LaTeX-indent-tabular)
+ ("flalign*" LaTeX-indent-tabular)
+ ("split" LaTeX-indent-tabular)
+ ("matrix" LaTeX-indent-tabular)
+ ("pmatrix" LaTeX-indent-tabular)
+ ("bmatrix" LaTeX-indent-tabular)
+ ("Bmatrix" LaTeX-indent-tabular)
+ ("vmatrix" LaTeX-indent-tabular)
+ ("Vmatrix" LaTeX-indent-tabular)
+ ("smallmatrix" LaTeX-indent-tabular)
+ ("cases" LaTeX-indent-tabular))))
+
(set (make-local-variable 'TeX-braces-association)
(append '(("\\lvert" . "\\rvert")
("\\lVert" . "\\rVert"))
diff --git a/style/mathtools.el b/style/mathtools.el
index 704e827103..d6b09881a4 100644
--- a/style/mathtools.el
+++ b/style/mathtools.el
@@ -1,6 +1,6 @@
;;; mathtools.el --- Style hook for the LaTeX package `mathtools'. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2011-2020 Free Software Foundation, Inc.
+;; Copyright (C) 2011-2020, 2022 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Created: 2011-02-13
@@ -438,6 +438,7 @@ Put line break macro on the last line. Next, insert an
ampersand."
(append '(("multlined" . LaTeX-item-equation)
("lgathered" . LaTeX-item-equation)
("rgathered" . LaTeX-item-equation)
+ ;; FIXME: The entry for spreadlines seems dubious.
("spreadlines" . LaTeX-item-equation)
("matrix*" . LaTeX-item-equation)
("pmatrix*" . LaTeX-item-equation)
@@ -460,6 +461,31 @@ Put line break macro on the last line. Next, insert an
ampersand."
("multlined" . LaTeX-amsmath-label))
LaTeX-label-alist))
+ (setq-local LaTeX-indent-environment-list
+ (append LaTeX-indent-environment-list
+ '(("matrix*" LaTeX-indent-tabular)
+ ("pmatrix*" LaTeX-indent-tabular)
+ ("bmatrix*" LaTeX-indent-tabular)
+ ("Bmatrix*" LaTeX-indent-tabular)
+ ("vmatrix*" LaTeX-indent-tabular)
+ ("Vmatrix*" LaTeX-indent-tabular)
+ ("smallmatrix*" LaTeX-indent-tabular)
+ ("psmallmatrix" LaTeX-indent-tabular)
+ ("psmallmatrix*" LaTeX-indent-tabular)
+ ("bsmallmatrix" LaTeX-indent-tabular)
+ ("bsmallmatrix*" LaTeX-indent-tabular)
+ ("vsmallmatrix" LaTeX-indent-tabular)
+ ("vsmallmatrix*" LaTeX-indent-tabular)
+ ("Vsmallmatrix" LaTeX-indent-tabular)
+ ("Vsmallmatrix*" LaTeX-indent-tabular)
+ ("dcases" LaTeX-indent-tabular)
+ ("dcases*" LaTeX-indent-tabular)
+ ("rcases" LaTeX-indent-tabular)
+ ("rcases*" LaTeX-indent-tabular)
+ ("drcases" LaTeX-indent-tabular)
+ ("drcases*" LaTeX-indent-tabular)
+ ("cases*" LaTeX-indent-tabular))))
+
;; RefTeX support: Add env's with `reftex-add-label-environments'
(when (fboundp 'reftex-add-label-environments)
(let ((envs '(("lgathered" ?e nil nil t)
- [AUCTeX-diffs] [elpa] externals/auctex updated (a24ec9d7cb -> 484df614d8), Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 0a2d9be447 01/24: ; Fix some documentations, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex bf03300296 09/24: Add M-RET support for smallmatrix variants, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex afd2691e56 19/24: Update style/ltxdoc.el to class version 2.1d, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 3cd7a352d3 07/24: Add support for indent for environments with alignment,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex ddb0f08ff1 10/24: Add default entries to LaTeX-indent-environment-list (bug#28405), Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 4ad82777c0 08/24: Add new test for indent, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 9073b5e117 03/24: * tex-ispell.el: Skip the arguments of stabular*? environments., Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex efb39c16c0 15/24: Add NEWS item, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 36a6d80e1b 11/24: Improve query for opt. arguments of \parbox and minipage, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 27c91a0336 14/24: Consider environments defined with newfloat package, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 2b91d0cf05 17/24: ; * style/footmisc.el: Fix year in last commit., Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex 0744b687b3 02/24: Add macros to skip from caption package, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex b89b8cdd44 18/24: Update footmisc package options to v6.0b, Tassilo Horn, 2022/02/21
- [AUCTeX-diffs] [elpa] externals/auctex c8a176ca7c 22/24: ; Release_13.1, Tassilo Horn, 2022/02/21