arabluatex.el 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ;;; arabluatex.el --- AUCTeX style for `arabluatex.sty'
  2. ;; This file is part of the `arabluatex' package
  3. ;; ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
  4. ;; Copyright (C) 2016--2018 Robert Alessi
  5. ;; Please send error reports and suggestions for improvements to Robert
  6. ;; Alessi <alessi@robertalessi.net>
  7. ;; This program is free software: you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; This program is distributed in the hope that it will be useful, but
  12. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. ;; General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with this program. If not, see
  17. ;; <http://www.gnu.org/licenses/>.
  18. (defvar LaTeX-arabluatex-package-options
  19. '("voc" "fullvoc" "novoc" "trans")
  20. "Package options for the arabluatex package.")
  21. (defvar LaTeX-arabluatex-mode-options
  22. '(;;
  23. ("voc")
  24. ("fullvoc")
  25. ("novoc")
  26. ("trans")
  27. ("export")
  28. )
  29. "Global or local options.")
  30. (defvar LaTeX-arabluatex-key-val-options
  31. '(;;
  32. ("mode" ("voc" "fullvoc" "novoc" "trans"))
  33. ("width")
  34. ("gutter")
  35. ("metre")
  36. ("color")
  37. ("delim" ("true" "false"))
  38. ("utf" ("true" "false"))
  39. ("export"))
  40. "Key=value options for arabverse environment.")
  41. (defvar LaTeX-arabluatex-color-options
  42. '(()))
  43. (defvar LaTeX-arabluatex-outfile-options
  44. '(;;
  45. (newline))
  46. "Option for outfile command.")
  47. (defvar LaTeX-arabluatex-arbmark-options
  48. '(;;
  49. (rl)
  50. (lr))
  51. "Option for arbmark command.")
  52. (TeX-add-style-hook
  53. "arabluatex"
  54. (lambda ()
  55. ;; This package relies on lualatex, so check for it:
  56. (TeX-check-engine-add-engines 'luatex)
  57. (TeX-add-symbols
  58. "aemph"
  59. "SetInputScheme"
  60. '("SetArbEasy" 0)
  61. '("SetArbDflt" 0)
  62. '("SetArbEasy*" 0)
  63. '("SetArbDflt*" 0)
  64. "SetTranslitFont"
  65. "SetTranslitStyle"
  66. "SetTranslitConvention"
  67. "SetArbOutSuffix"
  68. "arbup"
  69. '("ArbUpDflt" 0)
  70. '("NoArbUp" 0)
  71. "SetArbUp"
  72. "uc"
  73. "prname"
  74. "txarb"
  75. '("arb" [ (TeX-arg-eval completing-read "Mode: "
  76. LaTeX-arabluatex-mode-options) ]
  77. t)
  78. '("arbcolor" [ (TeX-arg-eval completing-read "Color: "
  79. LaTeX-arabluatex-color-options) ]
  80. t)
  81. '("arbmark" [ (TeX-arg-eval completing-read "Option: "
  82. LaTeX-arabluatex-arbmark-options) ]
  83. t)
  84. '("ArbOutFile" [ (TeX-arg-eval completing-read "Color: "
  85. LaTeX-arabluatex-outfile-options) ]
  86. t)
  87. '("ArbOutFile*" [ (TeX-arg-eval completing-read "Option: "
  88. LaTeX-arabluatex-outfile-options) ]
  89. t)
  90. "SetHemistichDelim"
  91. '("bayt" 2)
  92. "abjad"
  93. "arbnull"
  94. "abraces"
  95. "LR"
  96. "RL"
  97. "LRmarginpar"
  98. "LRfootnote"
  99. "RLfootnote"
  100. "FixArbFtnmk"
  101. "MkArbBreak"
  102. '("newarbmark" 3)
  103. '("setRL" 0)
  104. '("setLR" 0))
  105. (LaTeX-add-environments
  106. '("arab" LaTeX-env-args
  107. [ (TeX-arg-eval completing-read "Mode: "
  108. LaTeX-arabluatex-mode-options) ]
  109. 0)
  110. "txarab"
  111. "arabexport"
  112. '("arabverse" LaTeX-env-args
  113. [ TeX-arg-key-val LaTeX-arabluatex-key-val-options ] 0))
  114. )
  115. LaTeX-dialect)
  116. ;;; arabluatex.el ends here