AUCTeX Sync -- New Style Files
[packages] / xemacs-packages / auctex / style / XCharter.el
1 ;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094)
2
3 ;; Copyright (C) 2014, 2017 Free Software Foundation, Inc.
4
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2014-10-30
8 ;; Keywords: tex
9
10 ;; This file is part of AUCTeX.
11
12 ;; AUCTeX is free software; you can redistribute it and/or modify it
13 ;; under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 3, or (at your option)
15 ;; any later version.
16
17 ;; AUCTeX is distributed in the hope that it will be useful, but
18 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 ;; General Public License for more details.
21
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with AUCTeX; see the file COPYING.  If not, write to the Free
24 ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 ;; 02110-1301, USA.
26
27 ;;; Commentary:
28
29 ;; This file adds support for `XCharter.sty' (v1.094) from 2017/08/08.
30 ;; `XCharter.sty' is part of TeXLive.
31
32 ;;; Code:
33
34 (TeX-add-style-hook
35  "XCharter"
36  (lambda ()
37
38    ;; Run style hook for various packages loaded by XCharter
39    (TeX-run-style-hooks "textcomp" "fontaxes")
40
41    ;; New symbols
42    (TeX-add-symbols
43
44     ;; Only preamble commands
45     '("useosf"  0)
46     '("useosfI" 0)
47
48     ;; Text commands
49     '("textsu"     t)   ; superior figures
50     '("sustyle"   -1)   ;
51     '("textin"     t)   ; inferior figures
52     '("instyle"   -1)   ;
53     '("textlf"     t)   ; lining figures
54     '("lfstyle"   -1)   ;
55     '("textosf"    t)   ; oldstyle figures
56     '("textosfI"   t)   ; oldstyle figures alternate
57     '("osfstyle"  -1)   ; whatever oldstyle option is in force
58     '("textnumerator"   t) ; numerators
59     '("textnu"          t) ;
60     '("textdenominator" t) ; denominators
61     '("textde"          t) ;
62     '("textfrac"        2))
63
64    ;; Fontification
65    (when (and (featurep 'font-latex)
66               (eq TeX-install-font-lock 'font-latex-setup))
67      (font-latex-add-keywords '(("textsu"    "{")
68                                 ("textin"    "{")
69                                 ("textlf"    "{")
70                                 ("textosf"   "{")
71                                 ("textosfI"  "{")
72                                 ("textnumerator"   "{")
73                                 ("textnu"          "{")
74                                 ("textdenominator" "{")
75                                 ("textde"          "{")
76                                 ("textfrac"        "{{"))
77                               'type-command)
78      (font-latex-add-keywords '(("sustyle"   "")
79                                 ("instyle"   "")
80                                 ("lfstyle"   "")
81                                 ("osfstyle"  ""))
82                               'type-declaration)))
83  LaTeX-dialect)
84
85 (defvar LaTeX-XCharter-package-options
86   '("lining" "lf" "oldstyle" "osf" "oldstyleI" "osfI"
87     "scaled" "sups" "scosf")
88   "Package options for the XCharter package.")
89
90 ;;; XCharter.el ends here