aboutsummaryrefslogtreecommitdiff
path: root/arabluatex_trans.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex_trans.lua')
-rw-r--r--arabluatex_trans.lua82
1 files changed, 53 insertions, 29 deletions
diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua
index 838bccc..45fd3d5 100644
--- a/arabluatex_trans.lua
+++ b/arabluatex_trans.lua
@@ -127,24 +127,24 @@ hamzatrdmg = {
127} 127}
128 128
129tanwintrdmg = { 129tanwintrdmg = {
130 {a="uNU", b="\\arbup{un}"}, 130 {a="%-?uNU", b="\\arbup{un}"},
131 {a="aNU", b="\\arbup{an}"}, 131 {a="%-?aNU", b="\\arbup{an}"},
132 {a="iNU", b="\\arbup{in}"}, 132 {a="%-?iNU", b="\\arbup{in}"},
133 {a="iNI", b="i\\arbup{n}"}, 133 {a="%-?iNI", b="i\\arbup{n}"},
134 -- tanwīn preceding ʾalif conjunctionis 134 -- tanwīn preceding ʾalif conjunctionis
135 {a="(uN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{uni}%2%3"}, 135 {a="%-?(uN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{uni}%2%3"},
136 {a="(aN)(_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, 136 {a="%-?(aN)(_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"},
137 {a="(aN)(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, 137 {a="%-?(aN)(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"},
138 {a="(T)(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="t\\arbup{ani}%3%4"}, 138 {a="(T)%-?(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="t\\arbup{ani}%3%4"},
139 {a="([^TA])(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1\\arbup{ani}%3%4"}, 139 {a="([^TA])%-?(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1\\arbup{ani}%3%4"},
140 {a="(iN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{ini}%2%3"}, 140 {a="%-?(iN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{ini}%2%3"},
141 -- 141 --
142 {a="uN", b="\\arbup{un}"}, 142-- {a="uN", b="\\arbup{un}"}, (now included in last line in this table)
143 {a="(aN)(_A)", b="ạ\\arbup{n}"}, 143 {a="%-?(aN)(_A)", b="ạ\\arbup{n}"},
144 {a="(aN)(Y)", b="ạ\\arbup{n}"}, 144 {a="%-?(aN)(Y)", b="ạ\\arbup{n}"},
145 {a="(T)(\"?aN)", b="t\\arbup{an}"}, 145 {a="(T)%-?(\"?aN)", b="t\\arbup{an}"},
146 {a="([^TA])(\"?aN)", b="%1\\arbup{an}"}, 146 {a="([^TA])%-?(\"?aN)", b="%1\\arbup{an}"},
147 {a="iN", b="\\arbup{in}"} 147 {a="(%-?)(\"?A?t?)(%-?)([ui])(N)", b="\\arbup{%2%4n}"}
148} 148}
149 149
150trigraphstrdmg = { -- trigraphs or more 150trigraphstrdmg = { -- trigraphs or more
@@ -266,6 +266,18 @@ digraphstrdmg = {
266 {a="([%_]?[AYa])(%s)(\"?[uai])", b="a%2'"}, 266 {a="([%_]?[AYa])(%s)(\"?[uai])", b="a%2'"},
267 {a="([%_]?[Uu])(%s)(\"?[uai])", b="u%2'"}, 267 {a="([%_]?[Uu])(%s)(\"?[uai])", b="u%2'"},
268 {a="([%_]?[Ii])(%s)(\"?[uai])", b="i%2'"}, 268 {a="([%_]?[Ii])(%s)(\"?[uai])", b="i%2'"},
269 -- ʾiʿrāb hyphen (begin)
270 {a="(%-)(\"?[UI]na)(%p?%s)", b="\\arbup{%2}%3"},
271 {a="(%-)(\"?[UI]na)(%p?)$", b="\\arbup{%2}%3"},
272 {a="(%-)(\"?At[ui])(%p?%s)", b="\\arbup{%2}%3"},
273 {a="(%-)(\"?At[ui])(%p?)$", b="\\arbup{%2}%3"},
274 {a="(%-)(\"?Ani)(%p?%s)", b="\\arbup{%2}%3"},
275 {a="(%-)(\"?Ani)(%p?)$", b="\\arbup{%2}%3"},
276 {a="(%-)(\"?ayni)(%p?%s)", b="\\arbup{%2}%3"},
277 {a="(%-)(\"?ayni)(%p?)$", b="\\arbup{%2}%3"},
278 {a="(%-)(\"?[uai])(%p?%s)", b="\\arbup{%2}%3"},
279 {a="(%-)(\"?[uai])(%p?)$", b="\\arbup{%2}%3"},
280 -- ʾiʿrāb hyphen (end)
269 -- shorten long vowels preceding ʾalif conjunctionis 281 -- shorten long vowels preceding ʾalif conjunctionis
270 {a="(U)(A)", b="U"}, 282 {a="(U)(A)", b="U"},
271 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"}, 283 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"},
@@ -274,8 +286,8 @@ digraphstrdmg = {
274 {a="([%_]?[Ii])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="i%2%3"}, 286 {a="([%_]?[Ii])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="i%2%3"},
275 {a="%-%-", b=""}, 287 {a="%-%-", b=""},
276-- {a="T([^uai])", b="%1"}, 288-- {a="T([^uai])", b="%1"},
277 {a="T(%s)", b="%1"}, 289 {a="T(%p?%s)", b="%1"},
278 {a="T$", b=""}, 290 {a="T(%p?)$", b="%1"},
279 {a="_t", b="ṯ"}, 291 {a="_t", b="ṯ"},
280 {a="%^g", b="ǧ"}, 292 {a="%^g", b="ǧ"},
281 {a="%.h", b="ḥ"}, 293 {a="%.h", b="ḥ"},
@@ -410,15 +422,15 @@ hamzatrloc = {
410} 422}
411 423
412tanwintrloc = { 424tanwintrloc = {
413 {a="uNU", b="un"}, 425 {a="%-?uNU", b="un"},
414 {a="aNU", b="an"}, 426 {a="%-?aNU", b="an"},
415 {a="iNU", b="in"}, 427 {a="%-?iNU", b="in"},
416 {a="uN", b="un"}, 428 {a="%-?uN", b="un"},
417 {a="(aN)(_A)", b="an"}, 429-- {a="%-?(aN)(_A)", b="an"}, (now included in last line in this table)
418 {a="(aN)(Y)", b="an"}, 430 {a="%-?(aN)(Y)", b="an"},
419 {a="(T)(\"?aN)", b="tan"}, 431 {a="(T)%-?(\"?aN)", b="tan"},
420 {a="([^TA])(\"?aN)", b="%1an"}, 432 {a="([^TA])%-?(\"?aN)", b="%1an"},
421 {a="iN", b="in"} 433 {a="(%-?)(\"?A?t?)(%-?)([ui])(N)", b="%2%4n"},
422} 434}
423 435
424trigraphstrloc = { -- trigraphs or more 436trigraphstrloc = { -- trigraphs or more
@@ -472,8 +484,20 @@ trigraphstrloc = { -- trigraphs or more
472} 484}
473 485
474digraphstrloc = { 486digraphstrloc = {
475 {a="(%-)([uai])", b="%1%2"}, -- hyphen + initial alif without hamza 487 -- discard the ʾiʿrāb hyphen (begin)
476 {a="^([uai])", b="%1"}, -- initial alif without hamza 488 {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"},
489 {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"},
490 {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"},
491 {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"},
492 {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"},
493 {a="(%-)(\"?Ani)(%p?)$", b="%2%3"},
494 {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"},
495 {a="(%-)(\"?ayni)(%p?)$", b="%2%3"},
496 {a="(%-)([uai])(%p?%s)", b="%2%3"},
497 {a="(%-)([uai])(%p?)$", b="%2%3"},
498 -- discard the ʾiʿrāb hyphen (end)
499 {a="(%-)(\"?[uai])", b="%1%2"}, -- hyphen + initial alif without hamza
500 {a="^(\"?[uai])", b="%1"}, -- initial alif without hamza
477 {a="(%s)([uai])", b="%1%2"}, -- initial alif without hamza 501 {a="(%s)([uai])", b="%1%2"}, -- initial alif without hamza
478 {a="%-%-", b=""}, 502 {a="%-%-", b=""},
479 {a="uww", b="ūw"}, 503 {a="uww", b="ūw"},