[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex ca16d88 59/67: Update style/enumitem.el to packa
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex ca16d88 59/67: Update style/enumitem.el to package version 3.6 |
Date: |
Fri, 8 Feb 2019 11:40:40 -0500 (EST) |
branch: externals/auctex
commit ca16d88b58ba48f99a2e317824e50a8041e40f97
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Update style/enumitem.el to package version 3.6
* style/enumitem.el (LaTeX-enumitem-key-val-options): Update
key=val options to v3.6.
(LaTeX-enumitem-auto-cleanup): Use sharp-quote notation.
("enumitem"): Query for trivlist environment depending of package
option.
Add macro \Drawenumitemlabel and length \labelitem.
(LaTeX-enumitem-package-options): Update package options.
---
style/enumitem.el | 119 +++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 83 insertions(+), 36 deletions(-)
diff --git a/style/enumitem.el b/style/enumitem.el
index 647dbd9..06a44d2 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -1,4 +1,4 @@
-;;; enumitem.el --- AUCTeX style for `enumitem.sty' (v3.5.2)
+;;; enumitem.el --- AUCTeX style for `enumitem.sty' (v3.6)
;; Copyright (C) 2015, 2016, 2018 Free Software Foundation, Inc.
@@ -26,7 +26,7 @@
;;; Commentary:
-;; This file adds support for `enumitem.sty' (v3.5.2) from 2011/09/28.
+;; This file adds support for `enumitem.sty' (v3.6) from 2018/11/30.
;; `enumitem.sty' is part of TeXLive.
;; Tassilo Horn's `minted.el' was a major source of inspiration for
@@ -50,36 +50,66 @@
(keywords class))
(defvar LaTeX-enumitem-key-val-options
- '(;; Vertical Spacing
- ("topsep")
- ("partopsep")
- ("parsep")
- ("itemsep")
- ;; Horizontal Spacing
+ `(;; 3.1 Label and cross references format
+ ("label" ("\\alph*" "\\Alph*" "\\arabic*"
+ "\\roman*" "\\Roman*" "\\value*"))
+ ("label*" ("\\alph*" "\\Alph*" "\\arabic*"
+ "\\roman*" "\\Roman*" "\\value*"))
+ ("ref" ("\\alph*" "\\Alph*" "\\arabic*"
+ "\\roman*" "\\Roman*" "\\value*"))
+ ("font" ,(mapcar (lambda (mac)
+ (concat TeX-esc mac))
+ '(;; family
+ "rmfamily" "sffamily" "ttfamily"
+ ;; series
+ "mdseries" "bfseries"
+ ;; shape
+ "upshape" "itshape" "slshape" "scshape"
+ ;; size
+ "tiny" "scriptsize" "footnotesize"
+ "small" "normalsize" "large"
+ "Large" "LARGE" "huge" "Huge"
+ ;; reset macro
+ "normalfont")))
+ ("format" ,(mapcar (lambda (mac)
+ (concat TeX-esc mac))
+ '(;; family
+ "rmfamily" "sffamily" "ttfamily"
+ ;; series
+ "mdseries" "bfseries"
+ ;; shape
+ "upshape" "itshape" "slshape" "scshape"
+ ;; size
+ "tiny" "scriptsize" "footnotesize"
+ "small" "normalsize" "large"
+ "Large" "LARGE" "huge" "Huge"
+ ;; reset macro
+ "normalfont")))
+ ("align" ("left" "right" "parleft"))
+ ;; 3.2 Horizontal spacing of labels
+ ("labelindent" ("*" "!"))
+ ("left")
("leftmargin" ("*" "!"))
("itemindent" ("*" "!"))
("labelsep" ("*" "!"))
("labelwidth" ("*" "!"))
- ("labelindent" ("*" "!"))
- ("labelsep*")
- ("labelindent*")
("widest")
("widest*")
+ ("labelsep*")
+ ("labelindent*")
("rightmargin")
- ;; Labels and cross reference format
- ("label")
- ("label*")
- ("ref")
- ("font")
- ("format")
- ("align" ("left" "right" "parleft"))
- ;; Numbering, stopping, resuming
+ ;; Vertical Spacing
+ ("topsep")
+ ("partopsep")
+ ("parsep")
+ ("itemsep")
+ ;; 3.3 Numbering, stopping, and resuming
("start")
("resume")
("resume*")
- ;; Series
+ ;; 3.4 Series
("series")
- ;; Penalties
+ ;; 3.5 Penalties
("beginpenalty")
("midpenalty")
("endpenalty")
@@ -87,14 +117,16 @@
("before*")
("after")
("after*")
- ;; Description styles
- ("style" ("standard" "multiline" "nextline" "sameline" "unboxed"))
- ;; Compact lists
+ ("first")
+ ("first*")
+ ;; 3.6 Description styles
+ ("style" ("standard" "unboxed" "nextline" "sameline" "multiline"))
+ ;; 3.7 Compact lists
("noitemsep")
("nosep")
- ;; Wide lists
+ ;; 3.8 Wide lists
("wide")
- ;; Inline lists
+ ;; 4 Inline lists
("itemjoin")
("itemjoin*")
("afterlabel")
@@ -182,7 +214,7 @@ package.")
;; Now add the parsed env's to the local list.
(when (LaTeX-enumitem-newlist-list)
(setq LaTeX-enumitem-newlist-list-local
- (append (mapcar 'list (mapcar 'car (LaTeX-enumitem-newlist-list)))
+ (append (mapcar #'list (mapcar #'car (LaTeX-enumitem-newlist-list)))
LaTeX-enumitem-newlist-list-local))))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-enumitem-auto-prepare t)
@@ -282,7 +314,7 @@ in `enumitem'-completions."
(temp (copy-alist LaTeX-enumitem-key-val-options-local))
(opts (assq-delete-all (car (assoc key temp)) temp)))
(cl-pushnew (list key (TeX-delete-duplicate-strings (apply #'append
(list val) val-match)))
- opts :test #'equal)
+ opts :test #'equal)
(setq LaTeX-enumitem-key-val-options-local (copy-alist opts)))))
(TeX-add-style-hook
@@ -323,7 +355,7 @@ in `enumitem'-completions."
'("description*" LaTeX-enumitem-env-with-opts))
(add-to-list 'LaTeX-item-list '("description*" . LaTeX-item-argument)))
- ;; Cloning lists
+ ;; 7 Cloning the basic lists
(TeX-add-symbols
;; The easy way would be:
;; '("newlist"
@@ -370,8 +402,12 @@ in `enumitem'-completions."
[TeX-arg-eval mapconcat #'identity
(TeX-completing-read-multiple
(TeX-argument-prompt optional nil "Environment(s),
level(s)")
- `(,@LaTeX-enumitem-newlist-list-local
- ("1") ("2") ("3") ("4"))) ","]
+ (append
+ (when (LaTeX-provided-package-options-member "enumitem"
+
"includedisplayed")
+ '("trivlist"))
+ LaTeX-enumitem-newlist-list-local
+ '(("1") ("2") ("3") ("4")))) ","]
(TeX-arg-eval
(lambda ()
(LaTeX-enumitem-update-key-val-options)
@@ -383,8 +419,12 @@ in `enumitem'-completions."
[TeX-arg-eval mapconcat #'identity
(TeX-completing-read-multiple
(TeX-argument-prompt optional nil "Environment(s),
level(s)")
- `(,@LaTeX-enumitem-newlist-list-local
- ("1") ("2") ("3") ("4"))) ","]
+ (append
+ (when (LaTeX-provided-package-options-member "enumitem"
+
"includedisplayed")
+ '("trivlist"))
+ LaTeX-enumitem-newlist-list-local
+ '(("1") ("2") ("3") ("4")))) ","]
(TeX-arg-eval
(lambda ()
(LaTeX-enumitem-update-key-val-options)
@@ -425,8 +465,11 @@ in `enumitem'-completions."
;; "Key" will be parsed and added to key-val list.
'("SetEnumitemKey" LaTeX-arg-SetEnumitemKey)
- ;; "Key" and "Value" are added to our key-val list
- '("SetEnumitemValue" LaTeX-arg-SetEnumitemValue "Replacement"))
+ ;; "Key" and "Value" are added to our key-val list.
+ '("SetEnumitemValue" LaTeX-arg-SetEnumitemValue "Replacement")
+
+ ;; v3.6 has a macro for visual debugging.
+ '("DrawEnumitemLabel" 0))
;; Setting enumerate short label
(when (LaTeX-provided-package-options-member "enumitem" "shortlabels")
@@ -436,6 +479,9 @@ in `enumitem'-completions."
'(("A") ("a") ("I") ("i") ("1")))
"Replacement")))
+ ;; Add \labelindent to list of known lengths:
+ (LaTeX-add-lengths "labelitem")
+
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
@@ -454,7 +500,8 @@ in `enumitem'-completions."
LaTeX-dialect)
(defvar LaTeX-enumitem-package-options
- '("inline" "ignoredisplayed" "shortlabels" "loadonly")
+ '("inline" "shortlabels" "loadonly" "sizes"
+ "ignoredisplayed" "includedisplayed")
"Package options for the enumitem package.")
;;; enumitem.el ends here
- [elpa] externals/auctex de3b5f7 47/67: ; * doc/preview-latex.texi (preview-cache-preamble): Use @url{}., (continued)
- [elpa] externals/auctex de3b5f7 47/67: ; * doc/preview-latex.texi (preview-cache-preamble): Use @url{}., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 449ec06 43/67: ; Silence the compiler in styles for `reftex-compile-variables', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 761ffc3 27/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 33329c3 57/67: ; * doc/auctex.texi (Completion): Fix typo., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 2c73857 51/67: ; * style/pst-plot.el (LaTeX-pstplot-cleanup): Fix typo., Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3b5cea2 56/67: Improve completion for \url between url.el and hyperref.el, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex bbe53ed 53/67: Fix document, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 6e8aa67 41/67: ; Silence the compiler in styles for `font-latex-add-quotes', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 5147a27 48/67: Revise description about CJK support, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex f319b9f 60/67: Override some bindings in `TeX-mode-map' in Texinfo mode, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex ca16d88 59/67: Update style/enumitem.el to package version 3.6,
Tassilo Horn <=
- [elpa] externals/auctex 38d39a6 31/67: Remove compatibility face, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 9ae66cd 33/67: Remove TeX-replace-regexp-in-string, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 9d8369a 39/67: ; Silence the compiler in styles for `font-latex-update-font-lock', Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 5827aeb 34/67: Remove TeX-mark-active, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex c893152 50/67: Redefine support for \url in hyperref, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3ce90db 36/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 4cfd116 65/67: Add support for w and W column specifiers, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 49720ce 62/67: Remove compatibility code for older emacsen, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 3aef308 58/67: Skip macros and environments from pythontex, Tassilo Horn, 2019/02/08
- [elpa] externals/auctex 088e10c 45/67: ; Silence the compiler in styles for various functions and variables, Tassilo Horn, 2019/02/08