1 ;;; arabxetex.el --- AUCTeX style for `arabxetex.sty' (v1.2.1)
3 ;; Copyright (C) 2017 Free Software Foundation, Inc.
5 ;; Author: Arash Esbati <arash@gnu.org>
6 ;; Maintainer: auctex-devel@gnu.org
10 ;; This file is part of AUCTeX.
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)
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.
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
29 ;; This file adds support for `arabxetex.sty' (v1.2.1) from 2015/09/04.
30 ;; `arabxetex.sty' is part of TeXLive.
38 ;; Run the style hooks for packages required by arabxetex:
39 (TeX-run-style-hooks "amsmath" "fontspec" "bidi")
41 ;; We need xelatex, so check for the engine here:
42 (TeX-check-engine-add-engines 'xetex)
44 ;; New macros & environments:
55 ;; Add \text<language>[option]{...}
56 (mapc #'TeX-add-symbols
60 [ TeX-arg-eval completing-read
61 (TeX-argument-prompt optional nil "Mode")
62 LaTeX-arabxetex-package-options ]
64 (mapcar (lambda (lang) (concat "text" lang)) langs)))
66 ;; Add \begin{<language>}[option] ... \end{<language>}
67 (mapc #'LaTeX-add-environments
72 [ TeX-arg-eval completing-read
73 (TeX-argument-prompt optional nil "Mode")
74 LaTeX-arabxetex-package-options ]))
78 (when (and (featurep 'font-latex)
79 (eq TeX-install-font-lock 'font-latex-setup))
80 (font-latex-add-keywords (mapcar (lambda (lang)
81 (list (concat "text" lang) "[{"))
90 ;; 3.3 Transliteration
91 '("SetTranslitConvention"
92 (TeX-arg-eval completing-read
93 (TeX-argument-prompt optional nil "Mapping")
95 '("SetTranslitStyle" "Style"))
98 (when (and (featurep 'font-latex)
99 (eq TeX-install-font-lock 'font-latex-setup))
100 (font-latex-add-keywords '(("textLR" "{"))
102 (font-latex-add-keywords '(("aemph" "{"))
104 (font-latex-add-keywords '(("SetTranslitConvention" "{")
105 ("SetTranslitStyle" "{"))
109 (defvar LaTeX-arabxetex-package-options
110 '("novoc" "voc" "fullvoc" "trans" "utf")
111 "Package options for the arabxetex package.")
113 ;;; arabxetex.el ends here