[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 1f6e9e7e58 10/48: Update style/XCharter.el to pa
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 1f6e9e7e58 10/48: Update style/XCharter.el to package version 1.24 |
Date: |
Fri, 18 Nov 2022 14:27:42 -0500 (EST) |
branch: externals/auctex
commit 1f6e9e7e58d929689f08e276fa58ab6377c890bb
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Update style/XCharter.el to package version 1.24
* style/XCharter.el ("XCharter"): Add support for new macros
incl. fontification.
(LaTeX-XCharter-package-options): Turn variable into a function
which reads key=val package options.
---
style/XCharter.el | 116 +++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 92 insertions(+), 24 deletions(-)
diff --git a/style/XCharter.el b/style/XCharter.el
index 6f35b36933..4edb5a37ef 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -1,6 +1,6 @@
-;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094) -*-
lexical-binding: t; -*-
+;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.24) -*-
lexical-binding: t; -*-
-;; Copyright (C) 2014, 2017, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -26,12 +26,13 @@
;;; Commentary:
-;; This file adds support for `XCharter.sty' (v1.094) from 2017/08/08.
+;; This file adds support for `XCharter.sty' (v1.24) from 2022/04/16.
;; `XCharter.sty' is part of TeXLive.
;;; Code:
(require 'tex)
+(require 'latex)
;; Silence the compiler:
(declare-function font-latex-add-keywords
@@ -43,7 +44,9 @@
(lambda ()
;; Run style hook for various packages loaded by XCharter
- (TeX-run-style-hooks "textcomp" "fontaxes")
+ (if (memq TeX-engine '(xetex luatex))
+ (TeX-run-style-hooks "fontspec")
+ (TeX-run-style-hooks "textcomp" "fontaxes"))
;; New symbols
(TeX-add-symbols
@@ -51,47 +54,112 @@
;; Only preamble commands
'("useosf" 0)
'("useosfI" 0)
+ '("useproportional" 0)
;; Text commands
- '("textsu" t) ; superior figures
- '("sustyle" -1) ;
- '("textin" t) ; inferior figures
- '("instyle" -1) ;
'("textlf" t) ; lining figures
'("lfstyle" -1) ;
'("textosf" t) ; oldstyle figures
'("textosfI" t) ; oldstyle figures alternate
'("osfstyle" -1) ; whatever oldstyle option is in force
+ '("texttlf" t)
+ '("tlfstyle" -1)
+ '("texttosf" t)
+ '("tosfstyle" -1)
+
+ '("liningnums" -1)
+ '("tabularnums" -1)
+ '("oldstylenums" -1)
+ '("proportionalnums" -1)
+
+ '("textsu" t) ; superior figures
+ '("sustyle" -1) ;
+ '("textinf" t) ; inferior figures
+ '("instyle" -1) ;
+
'("textnumerator" t) ; numerators
- '("textnu" t) ;
+ '("textnum" t)
'("textdenominator" t) ; denominators
'("textde" t) ;
- '("textfrac" 2))
+ '("textfrac" ["Number"] "Numerator" "Denominator")
+ '("textsfrac" ["Number"] "Numerator" "Denominator")
+
+ '("textth" t)
+ '("textthit" t)
+ '("thfamily" -1))
+
+ ;; \textnu isn't available with 'notextnu' package option
+ (unless (LaTeX-provided-package-options-member "xcharter" "notextnu")
+ (TeX-add-symbols '("textnu" t))
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("textnu" "{"))
+ 'type-command)))
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '(("textsu" "{")
- ("textin" "{")
- ("textlf" "{")
+ (font-latex-add-keywords '(("textlf" "{")
("textosf" "{")
("textosfI" "{")
+ ("texttlf" "{")
+ ("texttosf" "{")
+ ("textsu" "{")
+ ("textinf" "{")
("textnumerator" "{")
- ("textnu" "{")
+ ("textnum" "{")
("textdenominator" "{")
("textde" "{")
- ("textfrac" "{{"))
+ ("textth" "{")
+ ("textthit" "{"))
'type-command)
- (font-latex-add-keywords '(("sustyle" "")
- ("instyle" "")
- ("lfstyle" "")
- ("osfstyle" ""))
- 'type-declaration)))
+ (font-latex-add-keywords '(("lfstyle" "")
+ ("osfstyle" "")
+ ("tlfstyle" "")
+ ("tosfstyle" "")
+ ("liningnums" "")
+ ("tabularnums" "")
+ ("oldstylenums" "")
+ ("proportionalnums" "")
+ ("sustyle" "")
+ ("instyle" "")
+ ("thfamily" ""))
+ 'type-declaration)
+ (font-latex-add-keywords '(("useosf" "")
+ ("useosfI" "")
+ ("useproportional" ""))
+ 'function)
+ (font-latex-add-keywords '(("textfrac" "[{{")
+ ("textsfrac" "[{{"))
+ 'textual)))
TeX-dialect)
-(defvar LaTeX-XCharter-package-options
- '("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
- "scaled" "sups" "scosf")
- "Package options for the XCharter package.")
+(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")))))
;;; XCharter.el ends here
- [elpa] externals/auctex 487c91fddb 04/48: ; Pacify compiler warning: Unused lexical argument `ignored', (continued)
- [elpa] externals/auctex 487c91fddb 04/48: ; Pacify compiler warning: Unused lexical argument `ignored', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex ce15e3fd87 24/48: Extend Japanese TeX support, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 52a7f4050f 27/48: ; * doc/auctex.texi (Adding Environments): Adjust indentation., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 42150568f1 06/48: Allow user to insert "$" (bug#57626), Tassilo Horn, 2022/11/18
- [elpa] externals/auctex cdf57fba58 11/48: * latex.el (TeX-arg-conditional): Declare 'indent'., Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 4eaed332ba 26/48: Add new hooks for inserting environments with arguments, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d7e6fa0d41 05/48: Cleanup `TeX-insert-dollar', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 21e624026a 28/48: Improve support for TikZ, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex e53bb19a90 37/48: ; Recognize large arguments with many lines, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 9b365b7419 18/48: Simplify implementation of style/textpos.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 1f6e9e7e58 10/48: Update style/XCharter.el to package version 1.24,
Tassilo Horn <=
- [elpa] externals/auctex 05cd0440c5 02/48: Use `TeX-arg-completing-read-multiple', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 0c482642cc 32/48: Simplify implementation of style/currvita.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 615e12f650 42/48: Simplify implementation of style/tcolorbox.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex b9548da54a 38/48: Simplify implementation of style/tcolorboxlib-theorems.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8e3137f641 15/48: Simplify implementation of style/titlesec.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 20cabef81f 20/48: ; Delete unnecessary `TeX-arg-string', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 49987f08dd 19/48: Provide completion candidates for `TeX-arg-length', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 52738d11b2 39/48: Remove entry in `LaTeX-completion-function-map-alist-keyval', Tassilo Horn, 2022/11/18
- [elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of style/ulem.el, Tassilo Horn, 2022/11/18
- [elpa] externals/auctex d5ff42e0bd 34/48: Simplify implementation of style/enumitem.el, Tassilo Horn, 2022/11/18