AUCTeX Sync -- New Style Files
[packages] / xemacs-packages / auctex / style / mdsymbol.el
1 ;;; mdsymbol.el --- AUCTeX style for `mdsymbol.sty' (v0.5)
2
3 ;; Copyright (C) 2014 Free Software Foundation, Inc.
4
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
7 ;; Created: 2014-10-25
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 `mdsymbol.sty' (v0.5) from 2012/11/18.
30 ;; The latest version of is available from <https://www.github.com/sebschub>.
31 ;; `mdsymbol.sty' is part of TeXLive.
32
33 ;;; Code:
34
35 (TeX-add-style-hook
36  "mdsymbol"
37  (lambda ()
38
39    ;; Run style hook for various packages loaded by mdsymbol
40    (TeX-run-style-hooks "textcomp" "amsmath")
41
42    ;; New symbols
43    (TeX-add-symbols
44
45     ;; These macros take one argument; we follow latex.el and use the
46     ;; t specifier for the argument; over- and underbrace and sqrt are
47     ;; already available
48     '("overgroup"  t)
49     '("undergroup" t)
50     '("overlinesegment"  t)
51     '("overleftharpoon"  t)
52     '("overrightharpoon" t)
53     '("underlinesegment" t)
54     ;;
55     '("widehat"       t)
56     '("widetilde"     t)
57     '("wideparen"     t)
58     '("vec"           t)
59     '("middlebar"     t)
60     '("middleslash"   t)
61     '("strokethrough" t)
62     ;;
63     '("overlining"    t))
64
65    ;; The following macros are usually defined, since retainmissing
66    ;; defaults to false
67    (unless (or (LaTeX-provided-package-options-member "mdsymbol" "retainmissing=true")
68                (LaTeX-provided-package-options-member "mdsymbol" "retainmissing"))
69      (TeX-add-symbols
70       '("dagger")
71       '("ddagger")
72       '("mathparagraph")
73       '("mathsection")
74       '("mathdollar")
75       '("mathsterling")
76       '("yen")
77       '("hbar")
78       '("hslash")
79       '("circledR")
80       '("circledS")
81       '("lambdabar")
82       '("lambdaslash"))))
83  LaTeX-dialect)
84
85 (defvar LaTeX-mdsymbol-package-options
86   '(;;
87     ("normalweight"  ("Light" "Regular" "autolight" "autoregular"))
88     ("boldweight"    ("Semibold" "Bold" "autosemibold"))
89     ("onlysansmath"  ("true" "false"))
90     ("retainmissing" ("true" "false"))
91     ("scale")
92     ("largedelims"   ("true" "false")))
93   "Package options for the mdsymbol package.")
94
95 (defun LaTeX-mdsymbol-package-options nil
96   "Prompt for package options for the mdsymbol package."
97   (TeX-read-key-val t LaTeX-mdsymbol-package-options))
98
99 ;;; mdsymbol.el ends here