arabluatex.el 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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--2019 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-preamble-options
  19. '(;;
  20. ("voc")
  21. ("fullvoc")
  22. ("novoc")
  23. ("trans")
  24. ("export" ("true" "false")))
  25. "Package options for the arabluatex package.")
  26. (defun LaTeX-arabluatex-package-options ()
  27. "Prompt for package options for arabluatex package."
  28. (TeX-read-key-val t
  29. (append LaTeX-arabluatex-preamble-options)))
  30. (defvar LaTeX-arabluatex-mode-options
  31. '(;;
  32. ("voc")
  33. ("fullvoc")
  34. ("novoc")
  35. ("trans")
  36. )
  37. "Local options.")
  38. (defvar LaTeX-arabluatex-key-val-options
  39. '(;;
  40. ("mode" ("voc" "fullvoc" "novoc" "trans"))
  41. ("width")
  42. ("gutter")
  43. ("metre")
  44. ("color")
  45. ("delim" ("true" "false"))
  46. ("utf" ("true" "false"))
  47. ("export" ("true" "false")))
  48. "Key=value options for arabverse environment.")
  49. (defvar LaTeX-arabluatex-color-options
  50. '(()))
  51. (defvar LaTeX-arabluatex-outfile-options
  52. '(;;
  53. ("newline"))
  54. "Option for outfile command.")
  55. (defvar LaTeX-arabluatex-arbmark-options
  56. '(;;
  57. ("rl")
  58. ("lr"))
  59. "Option for arbmark command.")
  60. (TeX-add-style-hook
  61. "arabluatex"
  62. (lambda ()
  63. ;; This package relies on lualatex, so check for it:
  64. (TeX-check-engine-add-engines 'luatex)
  65. (TeX-add-symbols
  66. "aemph"
  67. "SetInputScheme"
  68. '("SetArbEasy" 0)
  69. '("SetArbDflt" 0)
  70. '("SetArbEasy*" 0)
  71. '("SetArbDflt*" 0)
  72. "SetTranslitFont"
  73. "SetTranslitStyle"
  74. "SetTranslitConvention"
  75. "SetArbOutSuffix"
  76. "arbup"
  77. '("ArbUpDflt" 0)
  78. '("NoArbUp" 0)
  79. "SetArbUp"
  80. "uc"
  81. "prname"
  82. "txarb"
  83. '("arb" [ (TeX-arg-eval completing-read "Mode: "
  84. LaTeX-arabluatex-mode-options) ]
  85. t)
  86. '("arbcolor" [ (TeX-arg-eval completing-read "Color: "
  87. LaTeX-arabluatex-color-options) ]
  88. t)
  89. '("arbmark" [ (TeX-arg-eval completing-read "Option: "
  90. LaTeX-arabluatex-arbmark-options) ]
  91. t)
  92. '("ArbOutFile" [ (TeX-arg-eval completing-read "Color: "
  93. LaTeX-arabluatex-outfile-options) ]
  94. t)
  95. '("ArbOutFile*" [ (TeX-arg-eval completing-read "Option: "
  96. LaTeX-arabluatex-outfile-options) ]
  97. t)
  98. "SetHemistichDelim"
  99. '("bayt" 2)
  100. "abjad"
  101. "arbnull"
  102. "abraces"
  103. "LR"
  104. "RL"
  105. "LRmarginpar"
  106. "LRfootnote"
  107. "RLfootnote"
  108. "FixArbFtnmk"
  109. "MkArbBreak"
  110. '("newarbmark" 3)
  111. '("setRL" 0)
  112. '("setLR" 0))
  113. (LaTeX-add-environments
  114. '("arab" LaTeX-env-args
  115. [ (TeX-arg-eval completing-read "Mode: "
  116. LaTeX-arabluatex-mode-options) ]
  117. 0)
  118. "txarab"
  119. "arabexport"
  120. '("arabverse" LaTeX-env-args
  121. [ TeX-arg-key-val LaTeX-arabluatex-key-val-options ] 0))
  122. )
  123. LaTeX-dialect)
  124. ;;; arabluatex.el ends here