[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 28aa6b99: Harmonize provisioning of package options
From: |
Arash Esbati |
Subject: |
master 28aa6b99: Harmonize provisioning of package options |
Date: |
Tue, 9 May 2023 15:31:59 -0400 (EDT) |
branch: master
commit 28aa6b99e4df3cf80867673d73460aff9ad95d38
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Harmonize provisioning of package options
* style/XCharter.el:
* style/algpseudocodex.el:
* style/babel.el:
* style/bicaption.el:
* style/caption.el:
* style/changes.el:
* style/csquotes.el:
* style/expl3.el:
* style/geometry.el:
* style/mdsymbol.el:
* style/microtype.el:
* style/newfloat.el:
* style/parskip.el:
* style/siunitx.el:
* style/subcaption.el:
* style/xparse.el: Carve out the package options into a variable
of the form `LaTeX-<package>-package-options-list' for static
options or a function of the same form for dynamic options. Use
the variable or function when prompting for the options in the
function `LaTeX-<package>-package-options'.
---
style/XCharter.el | 58 ++++++++++----------
style/algpseudocodex.el | 28 +++++-----
style/babel.el | 64 +++++++++++-----------
style/bicaption.el | 28 +++++-----
style/caption.el | 27 +++++-----
style/changes.el | 65 ++++++++++++-----------
style/csquotes.el | 138 +++++++++++++++++++++++++-----------------------
style/expl3.el | 20 ++++---
style/geometry.el | 11 ++--
style/mdsymbol.el | 9 ++--
style/microtype.el | 13 +++--
style/newfloat.el | 15 +++---
style/parskip.el | 19 ++++---
style/siunitx.el | 12 +++--
style/subcaption.el | 12 +++--
style/xparse.el | 6 ++-
16 files changed, 286 insertions(+), 239 deletions(-)
diff --git a/style/XCharter.el b/style/XCharter.el
index 4edb5a37..8838d292 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -1,6 +1,6 @@
;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.24) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -134,32 +134,36 @@
'textual)))
TeX-dialect)
+(defun LaTeX-XCharter-package-options-list ()
+ "Return an alist of package options for XCharter package."
+ (append
+ (when (memq TeX-engine '(xetex luatex))
+ '(("nofontspec" ("true" "false"))
+ ("type1text" ("true" "false"))
+ ("type1" ("true" "false"))
+ ("defaultfeatures")))
+ '(("scaled")
+ ("scale")
+ ("lining" ("true" "false"))
+ ("lf" ("true" "false"))
+ ("oldstyle" ("true" "false"))
+ ("osf" ("true" "false"))
+ ("proportional" ("true" "false"))
+ ("p" ("true" "false"))
+ ("tabular" ("true" "false"))
+ ("t" ("true" "false"))
+ ("oldstyleI" ("true" "false"))
+ ("osfI" ("true" "false"))
+ ("sups")
+ ("scosf")
+ ("serbianc")
+ ("theoremfont")
+ ("thmlining")
+ ("oldSS")
+ ("notextnu"))))
+
(defun LaTeX-XCharter-package-options ()
- "Read the XCharter package options."
- (TeX-read-key-val t (append
- (when (memq TeX-engine '(xetex luatex))
- '(("nofontspec" ("true" "false"))
- ("type1text" ("true" "false"))
- ("type1" ("true" "false"))
- ("defaultfeatures")))
- '(("scaled")
- ("scale")
- ("lining" ("true" "false"))
- ("lf" ("true" "false"))
- ("oldstyle" ("true" "false"))
- ("osf" ("true" "false"))
- ("proportional" ("true" "false"))
- ("p" ("true" "false"))
- ("tabular" ("true" "false"))
- ("t" ("true" "false"))
- ("oldstyleI" ("true" "false"))
- ("osfI" ("true" "false"))
- ("sups")
- ("scosf")
- ("serbianc")
- ("theoremfont")
- ("thmlining")
- ("oldSS")
- ("notextnu")))))
+ "Prompt for package options for the XCharter package."
+ (TeX-read-key-val t (LaTeX-XCharter-package-options-list)))
;;; XCharter.el ends here
diff --git a/style/algpseudocodex.el b/style/algpseudocodex.el
index d2b9848d..6b64b7b9 100644
--- a/style/algpseudocodex.el
+++ b/style/algpseudocodex.el
@@ -1,6 +1,6 @@
;;; algpseudocodex.el --- AUCTeX style for `algpseudocodex.sty' (v1.0.2) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2022 Free Software Foundation, Inc.
+;; Copyright (C) 2022--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Created: 2022-10-10
@@ -200,17 +200,21 @@ the number of arguments."
'function)))
TeX-dialect)
+(defvar LaTeX-algpseudocodex-package-options-list
+ '(("noEnd" ("true" "false"))
+ ("indLines" ("true" "false"))
+ ("spaceRequire" ("true" "false"))
+ ("italicComments" ("true" "false"))
+ ("rightComments" ("true" "false"))
+ ("commentColor")
+ ("beginComment")
+ ("endComment")
+ ("beginLComment")
+ ("endLComment"))
+ "Package options for the algpseudocodex package.")
+
(defun LaTeX-algpseudocodex-package-options ()
- "Package options for the algpseudocodex package."
- (TeX-read-key-val t '(("noEnd" ("true" "false"))
- ("indLines" ("true" "false"))
- ("spaceRequire" ("true" "false"))
- ("italicComments" ("true" "false"))
- ("rightComments" ("true" "false"))
- ("commentColor")
- ("beginComment")
- ("endComment")
- ("beginLComment")
- ("endLComment"))))
+ "Prompt for package options for the algpseudocodex package."
+ (TeX-read-key-val t LaTeX-algpseudocodex-package-options-list))
;;; algpseudocodex.el ends here
diff --git a/style/babel.el b/style/babel.el
index 964ff0cf..2483b73b 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -397,37 +397,41 @@
'variable)))
TeX-dialect)
+(defvar LaTeX-babel-package-options-list
+ (progn
+ (TeX-load-style "fontenc")
+ (append
+ `(("KeepShorthandsActive")
+ ("activeacute")
+ ("activegrave")
+ ("shorthands" ("off"))
+ ("safe" ("none" "ref" "bib"))
+ ("math" ("active" "normal"))
+ ("config")
+ ("main" ,LaTeX-babel-language-list)
+ ("headfoot" ,LaTeX-babel-language-list)
+ ("noconfigs")
+ ("nocase")
+ ("silent")
+ ("showlanguages")
+ ("nocase")
+ ("silent")
+ ("strings" ,(append
+ LaTeX-fontenc-package-options
+ '("generic" "unicode" "encoded")))
+ ("hyphenmap" ("off" "first" "select"
+ "other" "other*"))
+ ("bidi" ("default" "basic" "basic-r"
+ "bidi-l" "bidi-r"))
+ ("layout" ("sectioning" "counters" "lists"
+ "contents" "footnotes" "captions"
+ "columns" "graphics" "extras"))
+ ("base"))
+ (mapcar #'list LaTeX-babel-language-list)))
+ "Package options for the babel package.")
+
(defun LaTeX-babel-package-options ()
"Prompt for package options for the babel package."
- (TeX-read-key-val t (progn
- (TeX-load-style "fontenc")
- (append
- `(("KeepShorthandsActive")
- ("activeacute")
- ("activegrave")
- ("shorthands" ("off"))
- ("safe" ("none" "ref" "bib"))
- ("math" ("active" "normal"))
- ("config")
- ("main" ,LaTeX-babel-language-list)
- ("headfoot" ,LaTeX-babel-language-list)
- ("noconfigs")
- ("nocase")
- ("silent")
- ("showlanguages")
- ("nocase")
- ("silent")
- ("strings" ,(append
- LaTeX-fontenc-package-options
- '("generic" "unicode" "encoded")))
- ("hyphenmap" ("off" "first" "select"
- "other" "other*"))
- ("bidi" ("default" "basic" "basic-r"
- "bidi-l" "bidi-r"))
- ("layout" ("sectioning" "counters" "lists"
- "contents" "footnotes" "captions"
- "columns" "graphics" "extras"))
- ("base"))
- (mapcar #'list LaTeX-babel-language-list)))))
+ (TeX-read-key-val t LaTeX-babel-package-options-list))
;;; babel.el ends here
diff --git a/style/bicaption.el b/style/bicaption.el
index 94c12913..c0ed9773 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -187,20 +187,22 @@ square brackets."
'textual)))
TeX-dialect)
+(defun LaTeX-bicaption-package-options-list ()
+ "Return an alist of package options for bicaption package."
+ (TeX-load-style "caption")
+ (append `(,(list "language"
+ (cond ((and (member "babel" (TeX-style-list))
+ (LaTeX-babel-active-languages))
+ (butlast (LaTeX-babel-active-languages)))
+ ((and (member "polyglossia" (TeX-style-list))
+ (LaTeX-polyglossia-active-languages))
+ (butlast (LaTeX-babel-active-languages)))
+ (t nil))))
+ LaTeX-bicaption-key-val-options
+ LaTeX-caption-key-val-options))
+
(defun LaTeX-bicaption-package-options ()
"Prompt for package options for the bicaption package."
- (TeX-read-key-val t (progn
- (TeX-load-style "caption")
- (append
- `(,(list "language"
- (cond ((and (member "babel" (TeX-style-list))
- (LaTeX-babel-active-languages))
- (butlast
(LaTeX-babel-active-languages)))
- ((and (member "polyglossia"
(TeX-style-list))
-
(LaTeX-polyglossia-active-languages))
- (butlast
(LaTeX-babel-active-languages)))
- (t nil))))
- LaTeX-bicaption-key-val-options
- LaTeX-caption-key-val-options))))
+ (TeX-read-key-val t (LaTeX-bicaption-package-options-list)))
;;; bicaption.el ends here
diff --git a/style/caption.el b/style/caption.el
index 073dff4e..db745142 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -1,6 +1,6 @@
;;; caption.el --- AUCTeX style for `caption.sty' (v3.4a) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -384,16 +384,16 @@ STAR is non-nil, do not query for a short-caption and a
label."
'("captionsetup"
(TeX-arg-conditional (member "bicaption" (TeX-style-list))
- ([LaTeX-arg-bicaption-captionsetup])
- ([TeX-arg-completing-read
- LaTeX-caption-supported-float-types "Float
type"]))
+ ([LaTeX-arg-bicaption-captionsetup])
+ ([TeX-arg-completing-read
+ LaTeX-caption-supported-float-types "Float type"]))
(TeX-arg-key-val (LaTeX-caption-key-val-options)))
'("captionsetup*"
(TeX-arg-conditional (member "bicaption" (TeX-style-list))
- ([LaTeX-arg-bicaption-captionsetup])
- ([TeX-arg-completing-read
- LaTeX-caption-supported-float-types "Float
type"]))
+ ([LaTeX-arg-bicaption-captionsetup])
+ ([TeX-arg-completing-read
+ LaTeX-caption-supported-float-types "Float type"]))
(TeX-arg-key-val (LaTeX-caption-key-val-options)))
'("clearcaptionsetup"
@@ -476,12 +476,15 @@ STAR is non-nil, do not query for a short-caption and a
label."
'function)) )
TeX-dialect)
+(defvar LaTeX-caption-package-options-list
+ (append '(("compatibility" ("true" "false"))
+ ("figureposition" ("top" "above" "bottom" "below"))
+ ("tableposition" ("top" "above" "bottom" "below")))
+ LaTeX-caption-key-val-options)
+ "Package options for the caption package.")
+
(defun LaTeX-caption-package-options ()
"Prompt for package options for the caption package."
- (TeX-read-key-val t
- (append '(("compatibility" ("true" "false")))
- '(("figureposition" ("top" "above" "bottom"
"below")))
- '(("tableposition" ("top" "above" "bottom"
"below")))
- LaTeX-caption-key-val-options)))
+ (TeX-read-key-val t LaTeX-caption-package-options-list))
;;; caption.el ends here
diff --git a/style/changes.el b/style/changes.el
index 9e43f194..96ca2c23 100644
--- a/style/changes.el
+++ b/style/changes.el
@@ -172,38 +172,41 @@
'reference)))
TeX-dialect)
+(defun LaTeX-changes-package-options-list ()
+ "Return an alist of package options for changes package."
+ (TeX-load-style "xcolor")
+ (TeX-load-style "truncate")
+ (TeX-load-style "ulem")
+ (append
+ `(("defaultcolor"
+ ,(if (and (fboundp 'LaTeX-xcolor-definecolor-list)
+ (LaTeX-xcolor-definecolor-list))
+ (mapcar #'car (LaTeX-xcolor-definecolor-list))
+ LaTeX-xcolor-base-colors)))
+ `(("draft")
+ ("final")
+ ("commandnameprefix" ("none" "ifneeded" "always"))
+ ("markup" ("default" "underlined" "bfit" "nocolor"))
+ ("addedmarkup" ("colored" "uline" "uuline" "uwave"
+ "dashuline" "dotuline"
+ "bf" "it" "sl" "em"))
+ ("deletedmarkup" ("sout" "xout" "colored"
+ "uline" "uuline" "uwave"
+ "dashuline" "dotuline"
+ "bf" "it" "sl" "em"))
+ ("highlightmarkup" ("background" "uuline" "uwave"))
+ ("commentmarkup" ("todo" "margin" "footnote" "uwave"))
+ ("authormarkup" ("superscript" "subscript" "brackets"
+ "footnote" "none"))
+ ("authormarkupposition" ("right" "left"))
+ ("authormarkuptext" ("id" "name"))
+ ("todonotes")
+ ("truncate" ,LaTeX-truncate-package-options)
+ ("ulem" ,LaTeX-ulem-package-options)
+ ("xcolor" ,LaTeX-xcolor-package-options))))
+
(defun LaTeX-changes-package-options ()
"Prompt for package options for the changes package."
- (TeX-read-key-val t (progn
- (TeX-load-style "xcolor")
- (TeX-load-style "truncate")
- (TeX-load-style "ulem")
- (append
- `(("defaultcolor"
- ,(if (and (fboundp 'LaTeX-xcolor-definecolor-list)
- (LaTeX-xcolor-definecolor-list))
- (mapcar #'car (LaTeX-xcolor-definecolor-list))
- LaTeX-xcolor-base-colors)))
- `(("draft")
- ("final")
- ("commandnameprefix" ("none" "ifneeded" "always"))
- ("markup" ("default" "underlined" "bfit" "nocolor"))
- ("addedmarkup" ("colored" "uline" "uuline" "uwave"
- "dashuline" "dotuline"
- "bf" "it" "sl" "em"))
- ("deletedmarkup" ("sout" "xout" "colored"
- "uline" "uuline" "uwave"
- "dashuline" "dotuline"
- "bf" "it" "sl" "em"))
- ("highlightmarkup" ("background" "uuline" "uwave"))
- ("commentmarkup" ("todo" "margin" "footnote"
"uwave"))
- ("authormarkup" ("superscript" "subscript"
"brackets"
- "footnote" "none"))
- ("authormarkupposition" ("right" "left"))
- ("authormarkuptext" ("id" "name"))
- ("todonotes")
- ("truncate" ,LaTeX-truncate-package-options)
- ("ulem" ,LaTeX-ulem-package-options)
- ("xcolor" ,LaTeX-xcolor-package-options))))))
+ (TeX-read-key-val t (LaTeX-changes-package-options-list)))
;;; changes.el ends here
diff --git a/style/csquotes.el b/style/csquotes.el
index 9caf2a3b..a736f2e5 100644
--- a/style/csquotes.el
+++ b/style/csquotes.el
@@ -1,6 +1,6 @@
;;; csquotes.el --- AUCTeX style for `csquotes.sty' (v5.2j) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2004--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2004--2023 Free Software Foundation, Inc.
;; Author: Ralf Angeli <angeli@caeruleus.net>
;; Maintainer: auctex-devel@gnu.org
@@ -342,73 +342,77 @@ retrieve the active languages."
'variable))))
TeX-dialect)
+(defvar LaTeX-csquotes-package-options-list
+ '(("strict" ("true" "false"))
+ ("style" ("american"
+ "australian"
+ "austrian"
+ "brazil"
+ "brazilian"
+ "british"
+ "canadian"
+ "croatian"
+ "czech"
+ "danish"
+ "dutch"
+ "english"
+ "finnish"
+ "french"
+ "german"
+ "greek"
+ "italian"
+ "mexican"
+ "naustrian"
+ "newzealand"
+ "ngerman"
+ "norsk"
+ "norwegian"
+ "nswissgerman"
+ "nynorsk"
+ "portuges"
+ "portuguese"
+ "russian"
+ "serbian"
+ "spanish"
+ "swedish"
+ "swiss"
+ "swissgerman"
+ "UKenglish"
+ "USenglish"))
+ ("autostyle" ("true" "false" "try" "once" "tryonce"))
+ ("austrian" ("quotes" "guillemets"))
+ ("croatian" ("quotes" "guillemets" "guillemets*"))
+ ("czech" ("quotes" "guillemets"))
+ ("danish" ("quotes" "guillemets" "topquotes"))
+ ("english" ("american" "british"))
+ ("estonian")
+ ("french" ("quotes" "quotes*" "guillemets" "guillemets*"))
+ ("galician" ("quotes" "guillemets"))
+ ("german" ("quotes" "guillemets" "swiss"))
+ ("hungarian")
+ ("italian" ("guillemets" "quotes"))
+ ("latvian")
+ ("norwegian" ("guillemets" "quotes"))
+ ("polish" ("guillemets" "guillemets*"))
+ ("portuguese" ("portuguese" "brazilian"))
+ ("serbian" ("quotes" "guillemets" "german"))
+ ("spanish" ("spanish" "mexican"))
+ ("swedish" ("quotes" "guillemets" "guillemets*"))
+ ("maxlevel")
+ ("autopunct" ("true" "false"))
+ ("threshold")
+ ("thresholdtype" ("lines" "words"))
+ ("parthreshold" ("true" "false"))
+ ("splitcomp" ("true" "false"))
+ ("csdisplay" ("true" "false"))
+ ("debug" ("true" "false"))
+ ;; "babel" key is deprecated, replaced by "autostyle":
+ ;; ("babel" ("true" "false" "try" "once" "tryonce"))
+ ("version" ("4.4" "3.6" "3.0")))
+ "Package options for the csquotes package.")
+
(defun LaTeX-csquotes-package-options ()
"Prompt for package options for the csquotes package."
- (TeX-read-key-val t '(("strict" ("true" "false"))
- ("style" ("american"
- "australian"
- "austrian"
- "brazil"
- "brazilian"
- "british"
- "canadian"
- "croatian"
- "czech"
- "danish"
- "dutch"
- "english"
- "finnish"
- "french"
- "german"
- "greek"
- "italian"
- "mexican"
- "naustrian"
- "newzealand"
- "ngerman"
- "norsk"
- "norwegian"
- "nswissgerman"
- "nynorsk"
- "portuges"
- "portuguese"
- "russian"
- "serbian"
- "spanish"
- "swedish"
- "swiss"
- "swissgerman"
- "UKenglish"
- "USenglish"))
- ("autostyle" ("true" "false" "try" "once" "tryonce"))
- ("austrian" ("quotes" "guillemets"))
- ("croatian" ("quotes" "guillemets" "guillemets*"))
- ("czech" ("quotes" "guillemets"))
- ("danish" ("quotes" "guillemets" "topquotes"))
- ("english" ("american" "british"))
- ("estonian")
- ("french" ("quotes" "quotes*" "guillemets"
"guillemets*"))
- ("galician" ("quotes" "guillemets"))
- ("german" ("quotes" "guillemets" "swiss"))
- ("hungarian")
- ("italian" ("guillemets" "quotes"))
- ("latvian")
- ("norwegian" ("guillemets" "quotes"))
- ("polish" ("guillemets" "guillemets*"))
- ("portuguese" ("portuguese" "brazilian"))
- ("serbian" ("quotes" "guillemets" "german"))
- ("spanish" ("spanish" "mexican"))
- ("swedish" ("quotes" "guillemets" "guillemets*"))
- ("maxlevel")
- ("autopunct" ("true" "false"))
- ("threshold")
- ("thresholdtype" ("lines" "words"))
- ("parthreshold" ("true" "false"))
- ("splitcomp" ("true" "false"))
- ("csdisplay" ("true" "false"))
- ("debug" ("true" "false"))
- ;; "babel" key is deprecated, replaced by "autostyle":
- ;; ("babel" ("true" "false" "try" "once" "tryonce"))
- ("version" ("4.4" "3.6" "3.0")))))
+ (TeX-read-key-val t LaTeX-csquotes-package-options-list))
;;; csquotes.el ends here
diff --git a/style/expl3.el b/style/expl3.el
index 51250bd8..4326f95b 100644
--- a/style/expl3.el
+++ b/style/expl3.el
@@ -83,14 +83,18 @@
'function)))
TeX-dialect)
+(defvar LaTeX-expl3-package-options-list
+ '(("check-declarations" ("true" "false"))
+ ("log-functions" ("true" "false"))
+ ("enable-debug" ("true" "false"))
+ ("backend" ("dvips" "dvipdfmx"
+ "dvisvgm" "luatex"
+ "pdftex" "xetex"))
+ ("suppress-backend-headers" ("true" "false")))
+ "Package options for the expl3 package.")
+
(defun LaTeX-expl3-package-options ()
- "Read the expl3 package options from the user."
- (TeX-read-key-val t '(("check-declarations" ("true" "false"))
- ("log-functions" ("true" "false"))
- ("enable-debug" ("true" "false"))
- ("backend" ("dvips" "dvipdfmx"
- "dvisvgm" "luatex"
- "pdftex" "xetex"))
- ("suppress-backend-headers" ("true" "false")))))
+ "Prompt for package options for the expl3 package."
+ (TeX-read-key-val t LaTeX-expl3-package-options-list))
;;; expl3.el ends here
diff --git a/style/geometry.el b/style/geometry.el
index f1cab730..aa169ce8 100644
--- a/style/geometry.el
+++ b/style/geometry.el
@@ -1,6 +1,6 @@
;;; geometry.el --- AUCTeX style for `geometry.sty' (v5.6) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -148,10 +148,13 @@ package.")
(setq TeX-PDF-from-DVI "Dvipdfmx")))
TeX-dialect)
+(defvar LaTeX-geometry-package-options-list
+ (append LaTeX-geometry-preamble-key-val-options
+ LaTeX-geometry-always-key-val-options)
+ "Package options for the geometry package.")
+
(defun LaTeX-geometry-package-options ()
"Prompt for package options for the geometry package."
- (TeX-read-key-val t
- (append LaTeX-geometry-preamble-key-val-options
- LaTeX-geometry-always-key-val-options)))
+ (TeX-read-key-val t LaTeX-geometry-package-options-list))
;;; geometry.el ends here
diff --git a/style/mdsymbol.el b/style/mdsymbol.el
index d82f87ee..dfc89e9f 100644
--- a/style/mdsymbol.el
+++ b/style/mdsymbol.el
@@ -1,6 +1,6 @@
;;; mdsymbol.el --- AUCTeX style for `mdsymbol.sty' (v0.5) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2014, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -85,9 +85,8 @@
'("lambdaslash"))))
TeX-dialect)
-(defvar LaTeX-mdsymbol-package-options
- '(;;
- ("normalweight" ("Light" "Regular" "autolight" "autoregular"))
+(defvar LaTeX-mdsymbol-package-options-list
+ '(("normalweight" ("Light" "Regular" "autolight" "autoregular"))
("boldweight" ("Semibold" "Bold" "autosemibold"))
("onlysansmath" ("true" "false"))
("retainmissing" ("true" "false"))
@@ -97,6 +96,6 @@
(defun LaTeX-mdsymbol-package-options nil
"Prompt for package options for the mdsymbol package."
- (TeX-read-key-val t LaTeX-mdsymbol-package-options))
+ (TeX-read-key-val t LaTeX-mdsymbol-package-options-list))
;;; mdsymbol.el ends here
diff --git a/style/microtype.el b/style/microtype.el
index 9287ccaa..528ad5a2 100644
--- a/style/microtype.el
+++ b/style/microtype.el
@@ -1,6 +1,6 @@
;;; microtype.el --- AUCTeX style for `microtype.sty' -*- lexical-binding: t;
-*-
-;; Copyright (C) 2022 Free Software Foundation, Inc.
+;; Copyright (C) 2022--2023 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -231,10 +231,13 @@
'type-declaration)))
TeX-dialect)
+(defvar LaTeX-microtype-package-options-list
+ (append '((config))
+ LaTeX-microtype-key-val-options)
+ "Package options for the microtype package.")
+
(defun LaTeX-microtype-package-options ()
- "Read the microtype package options from the user."
- (TeX-read-key-val t (append
- '((config))
- LaTeX-microtype-key-val-options)))
+ "Prompt for package options for the microtype package."
+ (TeX-read-key-val t LaTeX-microtype-package-options-list))
;;; microtype.el ends here
diff --git a/style/newfloat.el b/style/newfloat.el
index 50b0a4e0..f90b6148 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -200,14 +200,15 @@ If `caption.el' is loaded, add the new floating
environment to
'function)))
TeX-dialect)
+(defun LaTeX-newfloat-package-options-list ()
+ "Return an alist of package options for the newfloat package."
+ (append '(("chapterlistsgap"))
+ (if (< (LaTeX-largest-level) 2)
+ '(("within" ("chapter" "section" "none")))
+ '(("within" ("section" "none"))))))
+
(defun LaTeX-newfloat-package-options ()
"Prompt for package options for the newfloat package."
- (TeX-read-key-val
- t
- (append
- '(("chapterlistsgap"))
- (if (< (LaTeX-largest-level) 2)
- '(("within" ("chapter" "section" "none")))
- '(("within" ("section" "none")))))))
+ (TeX-read-key-val t (LaTeX-newfloat-package-options-list)))
;;; newfloat.el ends here
diff --git a/style/parskip.el b/style/parskip.el
index ca077be9..cafca0cb 100644
--- a/style/parskip.el
+++ b/style/parskip.el
@@ -37,15 +37,18 @@
(require 'tex)
(require 'latex)
+(defun LaTeX-parskip-package-options-list ()
+ "Return an alist of package options for the parskip package."
+ (let ((len (mapcar (lambda (x)
+ (concat TeX-esc (car x)))
+ (LaTeX-length-list))))
+ `(("skip" ,len)
+ ("tocskip" ,len)
+ ("indent" ,len)
+ ("parfill" ,len))))
+
(defun LaTeX-parskip-package-options ()
"Prompt for package options for the parskip package."
- (TeX-read-key-val t (progn
- (let ((len (mapcar (lambda (x)
- (concat TeX-esc (car x)))
- (LaTeX-length-list))))
- `(("skip" ,len)
- ("tocskip" ,len)
- ("indent" ,len)
- ("parfill" ,len))))))
+ (TeX-read-key-val t (LaTeX-parskip-package-options-list)))
;;; parskip.el ends here
diff --git a/style/siunitx.el b/style/siunitx.el
index da09a7e3..cec13b59 100644
--- a/style/siunitx.el
+++ b/style/siunitx.el
@@ -1,6 +1,6 @@
;;; siunitx.el --- AUCTeX style for `siunitx.sty' version 3.3.36. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2023 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <mose@gnu.org>
@@ -512,11 +512,13 @@ string."
'function)))))
TeX-dialect)
+(defvar LaTeX-siunitx-package-options-list
+ (append '(("table-column-type")) ; 'table-column-type' is a preamble only
+ LaTeX-siunitx-package-options)
+ "Package options for the siunitx package.")
+
(defun LaTeX-siunitx-package-options nil
"Prompt for package options for the siunitx package."
- (TeX-read-key-val t (append
- ;; 'table-column-type' is a preamble only:
- '(("table-column-type"))
- LaTeX-siunitx-package-options)))
+ (TeX-read-key-val t LaTeX-siunitx-package-options-list))
;; siunitx.el ends here
diff --git a/style/subcaption.el b/style/subcaption.el
index d0dd49a4..67b96e4f 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -196,11 +196,15 @@ caption, insert only a caption."
'function)) )
TeX-dialect)
+(defvar LaTeX-subcaption-package-options-list
+ (progn
+ (TeX-load-style "caption")
+ (append LaTeX-subcaption-key-val-options
+ LaTeX-caption-key-val-options))
+ "Package options for the subcaption package.")
+
(defun LaTeX-subcaption-package-options ()
"Prompt for package options for the subcaption package."
- (TeX-read-key-val t (progn
- (TeX-load-style "caption")
- (append LaTeX-subcaption-key-val-options
- LaTeX-caption-key-val-options))))
+ (TeX-read-key-val t LaTeX-subcaption-package-options-list))
;;; subcaption.el ends here
diff --git a/style/xparse.el b/style/xparse.el
index 9961cc6a..e71e456d 100644
--- a/style/xparse.el
+++ b/style/xparse.el
@@ -351,8 +351,12 @@ TYPE is one of the symbols mac or env."
'function)))
TeX-dialect)
+(defvar LaTeX-xparse-package-options-list
+ '(("log-declarations" ("true" "false")))
+ "Package options for the xparse package.")
+
(defun LaTeX-xparse-package-options ()
"Read the xparse package options from the user."
- (TeX-read-key-val t '(("log-declarations" ("true" "false")))))
+ (TeX-read-key-val t LaTeX-xparse-package-options-list))
;;; xparse.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 28aa6b99: Harmonize provisioning of package options,
Arash Esbati <=