AUCTeX Sync -- New Style Files
[packages] / xemacs-packages / auctex / style / newpxtext.el
1 ;;; newpxtext.el --- AUCTeX style for `newpxtext.sty' (v1.232)
2
3 ;; Copyright (C) 2015 Free Software Foundation, Inc.
4
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2015-05-02
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 `newpxtext.sty' (v1.232) from 2015/04/15.
30 ;; `newpxtext.sty' is part of TeXLive.
31
32 ;;; Code:
33
34 (TeX-add-style-hook
35  "newpxtext"
36  (lambda ()
37
38    ;; Run style hook for various packages loaded by newpxtext
39    (TeX-run-style-hooks "textcomp" "fontaxes")
40
41    ;; New symbols
42    (TeX-add-symbols
43     '("useosf"          0)  ; Only preamble command
44     '("useproportional" 0)  ; Only preamble command
45     '("lfstyle"        -1)  ; lf declaration
46     '("tlfstyle"       -1)  ; tlf declaration
47     '("osfstyle"       -1)  ; osf declaration
48     '("tosfstyle"      -1)  ; tosf declaration
49     '("sustyle"        -1)  ; sup style declaration
50     '("textlf"          t)  ; lf command
51     '("texttlf"         t)  ; tlf command
52     '("textosf"         t)  ; osf command
53     '("texttosf"        t)  ; tosf command
54     '("textsu"          t)) ; sup style command
55
56    ;; Fontification
57    (when (and (featurep 'font-latex)
58               (eq TeX-install-font-lock 'font-latex-setup))
59      (font-latex-add-keywords '(("textlf"    "{")
60                                 ("texttlf"   "{")
61                                 ("textosf"   "{")
62                                 ("texttosf"  "{")
63                                 ("textsu"    "{"))
64                               'type-command)
65      (font-latex-add-keywords '(("lfstyle"   "")
66                                 ("tlfstyle"  "")
67                                 ("osfstyle"  "")
68                                 ("tosfstyle" "")
69                                 ("sustyle"   ""))
70                               'type-declaration)))
71  LaTeX-dialect)
72
73 (defvar LaTeX-newpxtext-package-options
74   '("defaultsups" "scosf" "largesc"
75     "scaled" "helvratio"
76     "tighter" "looser" "spacing" "stretch" "shrink"
77     "lining" "lf" "oldstyle" "osf" "tabular"
78     "p" "proportional" "theoremfont")
79   "Package options for the newpxtext package.")
80
81 ;;; newpxtext.el ends here