From b2f9aeb0044c47fc03364029cd093718d6eaf9be Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 24 Jan 2017 09:40:30 +0100 Subject: added 'arabluatex.el', an AUCTeX style file for 'arabluatex.sty' --- arabluatex.el | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ makefile | 8 ++++-- 2 files changed, 95 insertions(+), 2 deletions(-) create mode 100644 arabluatex.el diff --git a/arabluatex.el b/arabluatex.el new file mode 100644 index 0000000..e06c685 --- /dev/null +++ b/arabluatex.el @@ -0,0 +1,89 @@ +;;; arabluatex.el --- AUCTeX style for `arabluatex.sty' +;; This file is part of the `arabluatex' package + +;; ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX +;; Copyright (C) 2016--2017 Robert Alessi + +;; Please send error reports and suggestions for improvements to Robert +;; Alessi + +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . + +(defvar LaTeX-arabluatex-package-options + '("voc" "fullvoc" "novoc" "trans") + "Package options for the arabluatex package") + +(defvar LaTeX-arabluatex-mode-options + '(;; + ("voc") + ("fullvoc") + ("novoc") + ("trans") + ) + "Global or local options") + +(defvar LaTeX-arabluatex-key-val-options + '(;; + ("mode" ("voc" "fullvoc" "novoc" "trans")) + ("width") + ("gutter") + ("metre") + ("delim" ("true" "false")) + ("utf" ("true" "false"))) + "Key=value options for arabverse environment.") + +(TeX-add-style-hook + "arabluatex" + (lambda () + (TeX-add-symbols + "aemph" + "SetInputScheme" + '("SetArbEasy" 0) + '("SetArbDflt" 0) + '("SetArbEasy*" 0) + '("SetArbDflt*" 0) + "SetTranslitFont" + "SetTranslitStyle" + "SetTranslitConvention" + "arbup" + '("ArbUpDflt" 0) + '("NoArbUp" 0) + '("SetArbUp" 0) + "cap" + "txarb" + '("arb" [ (TeX-arg-eval completing-read "mode: " + LaTeX-arabluatex-mode-options) ] t) + "SetHemistichDelim" + '("bayt" 2) + "abjad" + "arbnull" + "abraces" + "LRmarginpar" + "LRfootnote" + "RLfootnote" + "FixArbFtnmk" + '("setRL" 0) + '("setLR" 0)) + (LaTeX-add-environments + '("arab" LaTeX-env-args + [ (TeX-arg-eval completing-read "mode: " + LaTeX-arabluatex-mode-options) ] 0) + "txarab" + '("arabverse" LaTeX-env-args + [ TeX-arg-key-val LaTeX-arabluatex-key-val-options ] 0)) + ) + :latex) + +;;; arabluatex.el ends here diff --git a/makefile b/makefile index 39e4e23..37b179c 100644 --- a/makefile +++ b/makefile @@ -19,6 +19,10 @@ local: clean sty mkdir -p ~/texmf/tex/lualatex/arabluatex; \ fi cp $(pkg)*.{sty,lua} ~/texmf/tex/lualatex/arabluatex + if [ ! -d "~/.emacs.d/auctex/auto" ]; then \ + mkdif -p ~/.emacs.d/auctex/auto; \ + fi + cp $(pkg)*.el ~/.emacs.d/auctex/auto package: clean all mkdir arabluatex @@ -26,7 +30,7 @@ package: clean all mkdir -p tex/lualatex/arabluatex/ cp *.lua *.sty tex/lualatex/arabluatex/ mkdir -p doc/lualatex/arabluatex/ - cp *.pdf doc/lualatex/arabluatex/ + cp *.{pdf,el} doc/lualatex/arabluatex/ mkdir -p source/lualatex/arabluatex/ cp *.ins *.dtx *.tex source/lualatex/arabluatex/ # .bib is in dtx zip -r arabluatex.tds.zip tex doc source @@ -38,7 +42,7 @@ clean: rm -rf arabluatex/ rm -rf saved/ mkdir saved - cp *.{lua,ins,dtx,tex} makefile saved # .bib is in dtx + cp *.{lua,ins,dtx,tex,el} makefile saved # .bib is in dtx rm *.* cp saved/* . rm -rf saved/ -- cgit v1.2.3