diff options
author | Robert Alessi <alessi@robertalessi.net> | 2017-01-24 09:40:30 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2017-01-24 09:40:30 +0100 |
commit | b2f9aeb0044c47fc03364029cd093718d6eaf9be (patch) | |
tree | 7851f597a270cc747dc01951e70e9740e76fb60b | |
parent | 61a7054eeaa8b034209629c111d2c95ca7e24a19 (diff) | |
download | arabluatex-b2f9aeb0044c47fc03364029cd093718d6eaf9be.tar.gz |
added 'arabluatex.el', an AUCTeX style file for 'arabluatex.sty'
-rw-r--r-- | arabluatex.el | 89 | ||||
-rw-r--r-- | makefile | 8 |
2 files changed, 95 insertions, 2 deletions
diff --git a/arabluatex.el b/arabluatex.el new file mode 100644 index 0000000..e06c685 --- /dev/null +++ b/arabluatex.el | |||
@@ -0,0 +1,89 @@ | |||
1 | ;;; arabluatex.el --- AUCTeX style for `arabluatex.sty' | ||
2 | ;; This file is part of the `arabluatex' package | ||
3 | |||
4 | ;; ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX | ||
5 | ;; Copyright (C) 2016--2017 Robert Alessi | ||
6 | |||
7 | ;; Please send error reports and suggestions for improvements to Robert | ||
8 | ;; Alessi <alessi@robertalessi.net> | ||
9 | |||
10 | ;; This program is free software: you can redistribute it and/or modify | ||
11 | ;; it under the terms of the GNU General Public License as published by | ||
12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
13 | ;; (at your option) any later version. | ||
14 | |||
15 | ;; This program is distributed in the hope that it will be useful, but | ||
16 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | ;; General Public License for more details. | ||
19 | |||
20 | ;; You should have received a copy of the GNU General Public License | ||
21 | ;; along with this program. If not, see | ||
22 | ;; <http://www.gnu.org/licenses/>. | ||
23 | |||
24 | (defvar LaTeX-arabluatex-package-options | ||
25 | '("voc" "fullvoc" "novoc" "trans") | ||
26 | "Package options for the arabluatex package") | ||
27 | |||
28 | (defvar LaTeX-arabluatex-mode-options | ||
29 | '(;; | ||
30 | ("voc") | ||
31 | ("fullvoc") | ||
32 | ("novoc") | ||
33 | ("trans") | ||
34 | ) | ||
35 | "Global or local options") | ||
36 | |||
37 | (defvar LaTeX-arabluatex-key-val-options | ||
38 | '(;; | ||
39 | ("mode" ("voc" "fullvoc" "novoc" "trans")) | ||
40 | ("width") | ||
41 | ("gutter") | ||
42 | ("metre") | ||
43 | ("delim" ("true" "false")) | ||
44 | ("utf" ("true" "false"))) | ||
45 | "Key=value options for arabverse environment.") | ||
46 | |||
47 | (TeX-add-style-hook | ||
48 | "arabluatex" | ||
49 | (lambda () | ||
50 | (TeX-add-symbols | ||
51 | "aemph" | ||
52 | "SetInputScheme" | ||
53 | '("SetArbEasy" 0) | ||
54 | '("SetArbDflt" 0) | ||
55 | '("SetArbEasy*" 0) | ||
56 | '("SetArbDflt*" 0) | ||
57 | "SetTranslitFont" | ||
58 | "SetTranslitStyle" | ||
59 | "SetTranslitConvention" | ||
60 | "arbup" | ||
61 | '("ArbUpDflt" 0) | ||
62 | '("NoArbUp" 0) | ||
63 | '("SetArbUp" 0) | ||
64 | "cap" | ||
65 | "txarb" | ||
66 | '("arb" [ (TeX-arg-eval completing-read "mode: " | ||
67 | LaTeX-arabluatex-mode-options) ] t) | ||
68 | "SetHemistichDelim" | ||
69 | '("bayt" 2) | ||
70 | "abjad" | ||
71 | "arbnull" | ||
72 | "abraces" | ||
73 | "LRmarginpar" | ||
74 | "LRfootnote" | ||
75 | "RLfootnote" | ||
76 | "FixArbFtnmk" | ||
77 | '("setRL" 0) | ||
78 | '("setLR" 0)) | ||
79 | (LaTeX-add-environments | ||
80 | '("arab" LaTeX-env-args | ||
81 | [ (TeX-arg-eval completing-read "mode: " | ||
82 | LaTeX-arabluatex-mode-options) ] 0) | ||
83 | "txarab" | ||
84 | '("arabverse" LaTeX-env-args | ||
85 | [ TeX-arg-key-val LaTeX-arabluatex-key-val-options ] 0)) | ||
86 | ) | ||
87 | :latex) | ||
88 | |||
89 | ;;; arabluatex.el ends here | ||
@@ -19,6 +19,10 @@ local: clean sty | |||
19 | mkdir -p ~/texmf/tex/lualatex/arabluatex; \ | 19 | mkdir -p ~/texmf/tex/lualatex/arabluatex; \ |
20 | fi | 20 | fi |
21 | cp $(pkg)*.{sty,lua} ~/texmf/tex/lualatex/arabluatex | 21 | cp $(pkg)*.{sty,lua} ~/texmf/tex/lualatex/arabluatex |
22 | if [ ! -d "~/.emacs.d/auctex/auto" ]; then \ | ||
23 | mkdif -p ~/.emacs.d/auctex/auto; \ | ||
24 | fi | ||
25 | cp $(pkg)*.el ~/.emacs.d/auctex/auto | ||
22 | 26 | ||
23 | package: clean all | 27 | package: clean all |
24 | mkdir arabluatex | 28 | mkdir arabluatex |
@@ -26,7 +30,7 @@ package: clean all | |||
26 | mkdir -p tex/lualatex/arabluatex/ | 30 | mkdir -p tex/lualatex/arabluatex/ |
27 | cp *.lua *.sty tex/lualatex/arabluatex/ | 31 | cp *.lua *.sty tex/lualatex/arabluatex/ |
28 | mkdir -p doc/lualatex/arabluatex/ | 32 | mkdir -p doc/lualatex/arabluatex/ |
29 | cp *.pdf doc/lualatex/arabluatex/ | 33 | cp *.{pdf,el} doc/lualatex/arabluatex/ |
30 | mkdir -p source/lualatex/arabluatex/ | 34 | mkdir -p source/lualatex/arabluatex/ |
31 | cp *.ins *.dtx *.tex source/lualatex/arabluatex/ # .bib is in dtx | 35 | cp *.ins *.dtx *.tex source/lualatex/arabluatex/ # .bib is in dtx |
32 | zip -r arabluatex.tds.zip tex doc source | 36 | zip -r arabluatex.tds.zip tex doc source |
@@ -38,7 +42,7 @@ clean: | |||
38 | rm -rf arabluatex/ | 42 | rm -rf arabluatex/ |
39 | rm -rf saved/ | 43 | rm -rf saved/ |
40 | mkdir saved | 44 | mkdir saved |
41 | cp *.{lua,ins,dtx,tex} makefile saved # .bib is in dtx | 45 | cp *.{lua,ins,dtx,tex,el} makefile saved # .bib is in dtx |
42 | rm *.* | 46 | rm *.* |
43 | cp saved/* . | 47 | cp saved/* . |
44 | rm -rf saved/ | 48 | rm -rf saved/ |