AUCTeX Sync -- New Style Files
[packages] / xemacs-packages / auctex / style / erewhon.el
1 ;;; erewhon.el --- AUCTeX style for `erewhon.sty' (v1.04)
2
3 ;; Copyright (C) 2014, 2015 Free Software Foundation, Inc.
4
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2014-11-18
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 `erewhon.sty' (v1.04) from 2015/04/07.
30 ;; `erewhon.sty' is part of TeXLive.
31
32 ;;; Code:
33
34 (TeX-add-style-hook
35  "erewhon"
36  (lambda ()
37
38    ;; Run style hook for various packages loaded by erewhon
39    (TeX-run-style-hooks "textcomp" "fontaxes")
40
41    ;; New symbols
42    (TeX-add-symbols
43
44     ;; Only preamble commands
45     '("useosf"  0)
46     '("useproportional" 0)
47
48     ;; Text commands
49     '("lfstyle"   -1)   ; lf declaration
50     '("tlfstyle"  -1)   ; tlf declaration
51     '("osfstyle"  -1)   ; osf declaration
52     '("tosfstyle" -1)   ; tosf declaration
53     '("sufigures" -1)   ; superior figures declaration
54     '("textlf"     t)   ; proportional lining figures
55     '("texttlf"    t)   ; tabular lining figures
56     '("textosf"    t)   ; proportional oldstyle figures
57     '("texttosf"   t)   ; tabular oldstyle figures
58     '("textsu"     t)   ; superior figures
59     '("textin"     t)   ; inferior figures
60     '("textnu"     t)   ; numerator figures
61     '("textde"     t)   ; denominator figures
62     '("textfrac" "Numerator" "Denominator"))
63
64    ;; Fontification
65    (when (and (featurep 'font-latex)
66               (eq TeX-install-font-lock 'font-latex-setup))
67      (font-latex-add-keywords '(("textlf"    "{")
68                                 ("texttlf"   "{")
69                                 ("textosf"   "{")
70                                 ("texttosf"  "{")
71                                 ("textsu"    "{")
72                                 ("textin"    "{")
73                                 ("textnu"    "{")
74                                 ("textde"    "{"))
75                               'type-command)
76      (font-latex-add-keywords '(("lfstyle"   "")
77                                 ("tlfstyle"  "")
78                                 ("osfstyle"  "")
79                                 ("tosfstyle" "")
80                                 ("sufigures" ""))
81                               'type-declaration)
82      (font-latex-add-keywords '(("textfrac"  "{{"))
83                               'textual)))
84  LaTeX-dialect)
85
86 (defvar LaTeX-erewhon-package-options
87   '("lining" "lf" "oldstyle" "osf" "tabular" "p" "proportional"
88     "scale" "scaled" "scosf" "space" "sups")
89   "Package options for the erewhon package.")
90
91 ;;; erewhon.el ends here