aboutsummaryrefslogtreecommitdiff
path: root/arabluatex_trans.lua
diff options
context:
space:
mode:
Diffstat (limited to 'arabluatex_trans.lua')
-rw-r--r--arabluatex_trans.lua56
1 files changed, 35 insertions, 21 deletions
diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua
index e7087c0..ef55a2b 100644
--- a/arabluatex_trans.lua
+++ b/arabluatex_trans.lua
@@ -95,6 +95,12 @@ hamzatrdmg = {
95 {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda 95 {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda
96 {a="(A)(')", b="%1ʾ"}, -- historic madda 96 {a="(A)(')", b="%1ʾ"}, -- historic madda
97 -- initial (needs both ^ and %W patterns) 97 -- initial (needs both ^ and %W patterns)
98 -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines)
99 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
100 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
101 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
102 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
103 -- then the 'initial' rules for the remaining cases
98 {a="^(')([ua])", b="ʾ%2"}, 104 {a="^(')([ua])", b="ʾ%2"},
99 {a="^(')(i)", b="ʾ%2"}, 105 {a="^(')(i)", b="ʾ%2"},
100 {a="(%W)(')([ua])", b="%1ʾ%3"}, 106 {a="(%W)(')([ua])", b="%1ʾ%3"},
@@ -127,6 +133,7 @@ hamzatrdmg = {
127} 133}
128 134
129tanwintrdmg = { 135tanwintrdmg = {
136 {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"},
130 {a="%-?uNU", b="\\arbup{un}"}, 137 {a="%-?uNU", b="\\arbup{un}"},
131 {a="%-?aNU", b="\\arbup{an}"}, 138 {a="%-?aNU", b="\\arbup{an}"},
132 {a="%-?iNU", b="\\arbup{in}"}, 139 {a="%-?iNU", b="\\arbup{in}"},
@@ -165,24 +172,29 @@ tanwintrdmg = {
165trigraphstrdmg = { -- trigraphs or more 172trigraphstrdmg = { -- trigraphs or more
166 -- 'llatI / 'llad_I 173 -- 'llatI / 'llad_I
167 {a="^'ll(a)([%_]?[dt])", b="'ll%1%2"}, 174 {a="^'ll(a)([%_]?[dt])", b="'ll%1%2"},
168 {a="([%p%s])'ll(a)([%_]?[dt])", b="%1'll%2%3"}, --p 175 {a="([%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1'll%2%3"}, --p
176 -- law: the diphthong is to be resoved into 'awi' (next 4 lines)
177 {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
178 {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
179 {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
180 {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
169 -- al- + lām 181 -- al- + lām
170 {a="^(a)l%-(l)", b="%1l-%2"}, 182 {a="^(a)l%-(l)", b="%1l-%2"},
171 {a="([%p%s%-])(a)l%-(l)", b="%1%2l-%3"}, --p 183 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1%2l-%3"}, --p
172 -- al- + solar consonant 184 -- al- + solar consonant
173 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2-%2"}, 185 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2-%2"},
174 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2%3-%3"}, --p 186 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2%3-%3"}, --p
175 -- assim. art. + solar consonant 187 -- assim. art. + solar consonant
176 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="%1%2-"}, 188 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="%1%2-"},
177 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1%2%3-"}, --p 189 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1%2%3-"}, --p
178 -- al- + initial unstable hamza 190 -- al- + initial unstable hamza
179 {a="^(a)l%-(\"?[uai])", b="%1l-%2"}, 191 {a="^(a)l%-(\"?[uai])", b="%1l-%2"},
180 {a="([%p%s%-])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p 192 {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p
181 -- li-/la- + art. + initial unstable hamza is a special orthography 193 -- li-/la- + art. + initial unstable hamza is a special orthography
182 {a="l([ai])%-l%-([uai])", b="l%1-l-%2"}, 194 {a="l([ai])%-l%-([uai])", b="l%1-l-%2"},
183 -- al- + lunar consonant (i.e. what remains) 195 -- al- + lunar consonant (i.e. what remains)
184 {a="^(a)l%-", b="%1l-"}, 196 {a="^(a)l%-", b="%1l-"},
185 {a="([%p%s%-])(a)l%-", b="%1%2l-"}, --p 197 {a="([%(%[%|%<%s%-])(a)l%-", b="%1%2l-"}, --p
186 -- diphthongs to be resolved before ʾalif conjunctionis 198 -- diphthongs to be resolved before ʾalif conjunctionis
187 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, 199 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
188 {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, 200 {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
@@ -231,14 +243,15 @@ digraphstrdmg = {
231 {a="(%W)(\"?[uai])", b="%1%2"}, -- initial alif without hamza 243 {a="(%W)(\"?[uai])", b="%1%2"}, -- initial alif without hamza
232 -- this is not necessary, take out for now: 244 -- this is not necessary, take out for now:
233-- {a="([%_]?[uaiUAIY])(%s)([uai])", b="%1%2'"}, -- initial alif without hamza 245-- {a="([%_]?[uaiUAIY])(%s)([uai])", b="%1%2'"}, -- initial alif without hamza
234 {a="(aW)(%s)(\"?[uai])", b="awu%2%3"}, 246 {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awu%2%3%4"}, --p
235 {a="([^%_][uai])(%s)(\"?[uai])", b="%1%2'"}, 247 {a="(UA)(%s)([%(%[%|%<]?)(\"?[uai])", b="u%2%3'"}, --p
236 {a="(%_A)(%s)(\"?[uai])", b="ạ%2'"}, 248 {a="([^%_][uai])(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2%3'"}, --p
237 {a="(Y)(%s)(\"?[uai])", b="ạ%2'"}, 249 {a="(%_A)(%s)([%(%[%|%<]?)(\"?[uai])", b="ạ%2%3'"}, --p
238 {a="(%_a)(%s)(\"?[uai])", b="a%2'"}, 250 {a="(Y)(%s)([%(%[%|%<]?)(\"?[uai])", b="ạ%2%3'"}, --p
239 {a="(A)(%s)(\"?[uai])", b="a%2'"}, 251 {a="(%_a)(%s)([%(%[%|%<]?)(\"?[uai])", b="a%2%3'"}, --p
240 {a="([%_]?[Uu])(%s)(\"?[uai])", b="u%2'"}, 252 {a="(A)(%s)([%(%[%|%<]?)(\"?[uai])", b="a%2%3'"}, --p
241 {a="([%_]?[Ii])(%s)(\"?[uai])", b="i%2'"}, 253 {a="([%_]?[Uu])(%s)([%(%[%|%<]?)(\"?[uai])", b="u%2%3'"}, --p
254 {a="([%_]?[Ii])(%s)([%(%[%|%<]?)(\"?[uai])", b="i%2%3'"}, --p
242 -- ʾiʿrāb hyphen (begin) 255 -- ʾiʿrāb hyphen (begin)
243 {a="(%-)(\"?[UI]na)(%p?%s)", b="\\arbup{%2}%3"}, 256 {a="(%-)(\"?[UI]na)(%p?%s)", b="\\arbup{%2}%3"},
244 {a="(%-)(\"?[UI]na)(%p?)$", b="\\arbup{%2}%3"}, 257 {a="(%-)(\"?[UI]na)(%p?)$", b="\\arbup{%2}%3"},
@@ -253,13 +266,14 @@ digraphstrdmg = {
253 -- ʾiʿrāb hyphen (end) 266 -- ʾiʿrāb hyphen (end)
254 -- shorten long vowels preceding ʾalif conjunctionis 267 -- shorten long vowels preceding ʾalif conjunctionis
255 {a="(U)(A)", b="U"}, 268 {a="(U)(A)", b="U"},
256 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"}, 269 --p (next 7 lines, just after %s)
257 {a="(%_a)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, 270 {a="(aW)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"},
258 {a="(%_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"}, 271 {a="(%_a)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"},
259 {a="(A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, 272 {a="(%_A)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"},
260 {a="(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"}, 273 {a="(A)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"},
261 {a="([%_]?[Uu])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="u%2%3"}, 274 {a="(Y)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"},
262 {a="([%_]?[Ii])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="i%2%3"}, 275 {a="([%_]?[Uu])(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="u%2%3"},
276 {a="([%_]?[Ii])(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="i%2%3"},
263 {a="%-%-", b=""}, 277 {a="%-%-", b=""},
264-- {a="T([^uai])", b="%1"}, 278-- {a="T([^uai])", b="%1"},
265 {a="T(%p?%s)", b="h%1"}, 279 {a="T(%p?%s)", b="h%1"},