aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arabluatex.dtx9
-rw-r--r--arabluatex_fullvoc.lua78
-rw-r--r--arabluatex_novoc.lua14
-rw-r--r--arabluatex_trans.lua56
-rw-r--r--arabluatex_voc.lua56
5 files changed, 140 insertions, 73 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 7128adf..c1633da 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -2973,17 +2973,20 @@ wa-ya.sIru ta.hta 'l-jild-i
2973\newlength{\al@bayt@width} 2973\newlength{\al@bayt@width}
2974\setlength{\al@bayt@width}{.3\textwidth} 2974\setlength{\al@bayt@width}{.3\textwidth}
2975\define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}} 2975\define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}}
2976\define@key[al]{verse}{metre}{#1} 2976\define@key[al]{verse}{metre}{\arb{#1}}
2977\define@boolkey[al]{verse}{utf}[true]{} 2977\define@boolkey[al]{verse}{utf}[true]{}
2978\define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, 2978\define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc,
2979 trans}{\def\al@mode{#1}} 2979 trans}{\def\al@mode{#1}}
2980\presetkeys[al]{verse}{utf=false}{} 2980\presetkeys[al]{verse}{utf=false}{}
2981\NewDocumentEnvironment{arbverse}{O{} O{}}% 2981\NewDocumentEnvironment{arbverse}{O{} O{}}%
2982{\par\bgroup\setkeys[al]{verse}[metre]{#1}% 2982{\bgroup\setkeys[al]{verse}[metre]{#1}%
2983 \ifx\al@mode\al@mode@trans% 2983 \ifx\al@mode\al@mode@trans%
2984 \ifal@verse@utf\setRL\else\setLR\fi% 2984 \ifal@verse@utf\setRL\else\setLR\fi%
2985 \else\setRL\fi% 2985 \else\setRL\fi%
2986}{\newline\null\hfill\setkeys[al]{verse}[width,utf,mode]{#1}\egroup\par} 2986 \begin{center}
2987}%
2988{\end{center}%
2989\hfill\setkeys[al]{verse}[width,utf,mode]{#1}\egroup\par}
2987% \end{macrocode} 2990% \end{macrocode}
2988% \end{environment} 2991% \end{environment}
2989% \begin{macro}{\abjad} \cs{abjad}\marg{number} expresses its argument 2992% \begin{macro}{\abjad} \cs{abjad}\marg{number} expresses its argument
diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua
index bb928e4..efe26c0 100644
--- a/arabluatex_fullvoc.lua
+++ b/arabluatex_fullvoc.lua
@@ -66,6 +66,12 @@ hamzafv = {
66 {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda 66 {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda
67 {a="(A)(')", b="aآء"}, -- historic madda 67 {a="(A)(')", b="aآء"}, -- historic madda
68 -- initial (needs both ^ and %W patterns) 68 -- initial (needs both ^ and %W patterns)
69 -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines)
70 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
71 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
72 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
73 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
74 -- then the 'initial' rules for the remaining cases
69 {a="^(')([ua])", b="أ%2"}, 75 {a="^(')([ua])", b="أ%2"},
70 {a="^(')(i)", b="إ%2"}, 76 {a="^(')(i)", b="إ%2"},
71 {a="(%W)(')([ua])", b="%1أ%3"}, 77 {a="(%W)(')([ua])", b="%1أ%3"},
@@ -166,6 +172,12 @@ hamzafveasy = { -- differences marked below with 'easy'
166 {a="(A)(')", b="aاء"}, -- historic madda 172 {a="(A)(')", b="aاء"}, -- historic madda
167 --easy (end) 173 --easy (end)
168 -- initial (needs both ^ and %W patterns) 174 -- initial (needs both ^ and %W patterns)
175 -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines)
176 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
177 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
178 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
179 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
180 -- then the 'initial' rules for the remaining cases
169 {a="^(')([ua])", b="أ%2"}, 181 {a="^(')([ua])", b="أ%2"},
170 {a="^(')(i)", b="إ%2"}, 182 {a="^(')(i)", b="إ%2"},
171 {a="(%W)(')([ua])", b="%1أ%3"}, 183 {a="(%W)(')([ua])", b="%1أ%3"},
@@ -220,7 +232,10 @@ hamzafveasy = { -- differences marked below with 'easy'
220 {a="(i)(')([^uaiUAI])", b="%1ئْ%3"} 232 {a="(i)(')([^uaiUAI])", b="%1ئْ%3"}
221} 233}
222 234
223tanwinfv = { 235tanwinfv = { -- with assimilations (\SetArbDflt*)
236 {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"},
237 {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"},
238 {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"},
224 {a="%-?uNU", b="ٌو"}, 239 {a="%-?uNU", b="ٌو"},
225 {a="%-?aNU", b="ًوا"}, 240 {a="%-?aNU", b="ًوا"},
226 {a="%-?iNU", b="ٍو"}, 241 {a="%-?iNU", b="ٍو"},
@@ -256,6 +271,9 @@ tanwinfv = {
256} 271}
257 272
258tanwinfveasy = { -- no assimilations (see below) 273tanwinfveasy = { -- no assimilations (see below)
274 {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"},
275 {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"},
276 {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"},
259 {a="%-?uNU", b="ٌو"}, 277 {a="%-?uNU", b="ٌو"},
260 {a="%-?aNU", b="ًوا"}, 278 {a="%-?aNU", b="ًوا"},
261 {a="%-?iNU", b="ٍو"}, 279 {a="%-?iNU", b="ٍو"},
@@ -293,24 +311,29 @@ tanwinfveasy = { -- no assimilations (see below)
293trigraphsfv = { -- trigraphs or more 311trigraphsfv = { -- trigraphs or more
294 -- 'llatI / 'llad_I 312 -- 'llatI / 'llad_I
295 {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, 313 {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"},
296 {a="([%p%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p 314 {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p
315 -- law: the diphthong is to be resoved into 'awi' (next 4 lines)
316 {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
317 {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
318 {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
319 {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
297 -- al- + lām 320 -- al- + lām
298 {a="^(a)l%-(l)", b="ا%1ل%2%2"}, 321 {a="^(a)l%-(l)", b="ا%1ل%2%2"},
299 {a="([%p%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p 322 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p
300 -- al- + solar consonant 323 -- al- + solar consonant
301 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, 324 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"},
302 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p 325 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p
303 -- assim. art. + solar consonant 326 -- assim. art. + solar consonant
304 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, 327 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"},
305 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p 328 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p
306 -- al- + initial unstable hamza 329 -- al- + initial unstable hamza
307 {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, 330 {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"},
308 {a="([%p%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p 331 {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p
309 -- li-/la + art. + initial unstable hamza is a special orthography 332 -- li-/la + art. + initial unstable hamza is a special orthography
310 {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, 333 {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"},
311 -- al- + lunar consonant (i.e. what remains) 334 -- al- + lunar consonant (i.e. what remains)
312 {a="^(a)l%-", b="ا%1لْ"}, 335 {a="^(a)l%-", b="ا%1لْ"},
313 {a="([%p%s%-])(a)l%-", b="%1ا%2لْ"}, --p 336 {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p
314 -- diphthongs to be resolved before ʾalif conjunctionis 337 -- diphthongs to be resolved before ʾalif conjunctionis
315 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, 338 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
316 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, 339 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
@@ -350,24 +373,29 @@ trigraphsfv = { -- trigraphs or more
350trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) 373trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs)
351 -- 'llatI / 'llad_I 374 -- 'llatI / 'llad_I
352 {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, 375 {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"},
353 {a="([%p%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p 376 {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p
377 -- law: the diphthong is to be resoved into 'awi' (next 4 lines)
378 {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
379 {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
380 {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
381 {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
354 -- al- + lām 382 -- al- + lām
355 {a="^(a)l%-(l)", b="ا%1ل%2%2"}, 383 {a="^(a)l%-(l)", b="ا%1ل%2%2"},
356 {a="([%p%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p 384 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p
357 -- al- + solar consonant 385 -- al- + solar consonant
358 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, 386 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"},
359 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p 387 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p
360 -- assim. art. + solar consonant 388 -- assim. art. + solar consonant
361 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, 389 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"},
362 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p 390 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p
363 -- al- + initial unstable hamza 391 -- al- + initial unstable hamza
364 {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, 392 {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"},
365 {a="([%p%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p 393 {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p
366 -- li-/la + art. + initial unstable hamza is a special orthography 394 -- li-/la + art. + initial unstable hamza is a special orthography
367 {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, 395 {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"},
368 -- al- + lunar consonant (i.e. what remains) 396 -- al- + lunar consonant (i.e. what remains)
369 {a="^(a)l%-", b="ا%1لْ"}, 397 {a="^(a)l%-", b="ا%1لْ"},
370 {a="([%p%s%-])(a)l%-", b="%1ا%2لْ"}, --p 398 {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p
371 -- diphthongs to be resolved before ʾalif conjunctionis 399 -- diphthongs to be resolved before ʾalif conjunctionis
372 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, 400 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
373 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, 401 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
@@ -416,16 +444,16 @@ digraphsfvidgham = {
416 -- ʾiʿrāb (end) 444 -- ʾiʿrāb (end)
417 -- initial straight double quote gives a connective ʾalif 445 -- initial straight double quote gives a connective ʾalif
418 {a="^\"[uai]", b="ٱ"}, 446 {a="^\"[uai]", b="ٱ"},
419 {a="([%p%s%-])\"[uai]", b="%1ٱ"}, --p 447 {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
420 -- diphthongs to be resolved before ʾalif conjunctionis 448 -- diphthongs to be resolved before ʾalif conjunctionis
421 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, 449 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"},
422 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, 450 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"},
423 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, 451 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"},
424 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza 452 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza
425 -- initial alif without hamza 453 -- initial alif without hamza
426 {a="([%_]?[uaiUAIY])(%s)(\"?[uai])", b="%1%2ٱ"}, 454 {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
427 {a="^([uai])", b="ا%1"}, -- initial alif without hamza 455 {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p
428 {a="([%p%s])([uai])", b="%1ا%2"}, -- initial alif without hamza --p 456 {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p
429 {a="%-%-", b="ـ"}, 457 {a="%-%-", b="ـ"},
430 {a="ؤؤ", b="ؤّ"}, 458 {a="ؤؤ", b="ؤّ"},
431 {a="أأ", b="أّ"}, 459 {a="أأ", b="أّ"},
@@ -518,16 +546,16 @@ digraphsfv = {
518 -- ʾiʿrāb (end) 546 -- ʾiʿrāb (end)
519 -- initial straight double quote gives a connective ʾalif 547 -- initial straight double quote gives a connective ʾalif
520 {a="^\"[uai]", b="ٱ"}, 548 {a="^\"[uai]", b="ٱ"},
521 {a="([%p%s%-])\"[uai]", b="%1ٱ"}, --p 549 {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
522 -- diphthongs to be resolved before ʾalif conjunctionis 550 -- diphthongs to be resolved before ʾalif conjunctionis
523 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, 551 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"},
524 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, 552 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"},
525 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, 553 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"},
526 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza 554 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza
527 -- initial alif without hamza 555 -- initial alif without hamza
528 {a="([%_]?[uaiUAIY])(%s)(\"?[uai])", b="%1%2ٱ"}, 556 {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
529 {a="^([uai])", b="ا%1"}, -- initial alif without hamza 557 {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p
530 {a="([%p%s])([uai])", b="%1ا%2"}, -- initial alif without hamza --p 558 {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p
531 {a="%-%-", b="ـ"}, 559 {a="%-%-", b="ـ"},
532 {a="ؤؤ", b="ؤّ"}, 560 {a="ؤؤ", b="ؤّ"},
533 {a="أأ", b="أّ"}, 561 {a="أأ", b="أّ"},
@@ -620,16 +648,16 @@ digraphsfveasy = { -- see the differences under 'easy' marker below
620 -- ʾiʿrāb (end) 648 -- ʾiʿrāb (end)
621 -- initial straight double quote gives a connective ʾalif 649 -- initial straight double quote gives a connective ʾalif
622 {a="^\"[uai]", b="ٱ"}, 650 {a="^\"[uai]", b="ٱ"},
623 {a="([%p%s%-])\"[uai]", b="%1ٱ"}, --p 651 {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
624 -- diphthongs to be resolved before ʾalif conjunctionis 652 -- diphthongs to be resolved before ʾalif conjunctionis
625 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, 653 {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"},
626 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, 654 {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"},
627 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, 655 {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"},
628 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza 656 {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza
629 -- initial alif without hamza 657 -- initial alif without hamza
630 {a="([%_]?[uaiUAIY])(%s)(\"?[uai])", b="%1%2ٱ"}, 658 {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p
631 {a="^([uai])", b="ا%1"}, -- initial alif without hamza 659 {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p
632 {a="([%p%s])([uai])", b="%1ا%2"}, -- initial alif without hamza --p 660 {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p
633 {a="%-%-", b="ـ"}, 661 {a="%-%-", b="ـ"},
634 {a="ؤؤ", b="ؤّ"}, 662 {a="ؤؤ", b="ؤّ"},
635 {a="أأ", b="أّ"}, 663 {a="أأ", b="أّ"},
diff --git a/arabluatex_novoc.lua b/arabluatex_novoc.lua
index b88eaf2..f2b6a6a 100644
--- a/arabluatex_novoc.lua
+++ b/arabluatex_novoc.lua
@@ -64,27 +64,27 @@ trigraphsnv = { -- trigraphs or more
64 {a="l%-l_ah", b="l-ll_ah"}, 64 {a="l%-l_ah", b="l-ll_ah"},
65 -- 'llatI / 'llad_I 65 -- 'llatI / 'llad_I
66 {a="^'ll(a)([%_]?[dt])", b="ال%1%2"}, 66 {a="^'ll(a)([%_]?[dt])", b="ال%1%2"},
67 {a="([%p%s%-])'ll(a)([%_]?[dt])", b="%1ال%2%3"}, --p 67 {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ال%2%3"}, --p
68 -- al- + lām 68 -- al- + lām
69 {a="^(a)l%-(l)", b="ا%1ل%2"}, 69 {a="^(a)l%-(l)", b="ا%1ل%2"},
70 {a="([%p%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p 70 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p
71 -- al- + solar consonant 71 -- al- + solar consonant
72 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"}, 72 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"},
73 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p 73 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p
74 -- assim. art. + solar consonant 74 -- assim. art. + solar consonant
75 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"}, 75 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"},
76 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p 76 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p
77 -- al- + initial unstable hamza 77 -- al- + initial unstable hamza
78 {a="^(a)l%-(\")([uai])", b="ا%1لٱ%3"}, 78 {a="^(a)l%-(\")([uai])", b="ا%1لٱ%3"},
79 {a="([%p%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"}, --p 79 {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"}, --p
80 {a="^(a)l%-([uai])", b="ا%1لا%2"}, 80 {a="^(a)l%-([uai])", b="ا%1لا%2"},
81 {a="([%p%s%-])(a)l%-([uai])", b="%1ا%2لا%3"}, --p 81 {a="([%(%[%|%<%s%-])(a)l%-([uai])", b="%1ا%2لا%3"}, --p
82 -- li-/la- + art. + initial unstable hamza is a special orthography 82 -- li-/la- + art. + initial unstable hamza is a special orthography
83 {a="l([ai])%-l%-(\")([uai])", b="ل%1لٱ%3"}, 83 {a="l([ai])%-l%-(\")([uai])", b="ل%1لٱ%3"},
84 {a="l([ai])%-l%-([uai])", b="ل%1لا%2"}, 84 {a="l([ai])%-l%-([uai])", b="ل%1لا%2"},
85 -- al- + lunar consonant (i.e. what remains) 85 -- al- + lunar consonant (i.e. what remains)
86 {a="^(a)l%-", b="ا%1ل"}, 86 {a="^(a)l%-", b="ا%1ل"},
87 {a="([%p%s%-])(a)l%-", b="%1ا%2ل"}, --p 87 {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p
88 -- art. with waṣla + lām 88 -- art. with waṣla + lām
89 {a="'l%-(l)", b="ال%1"}, 89 {a="'l%-(l)", b="ال%1"},
90 -- art. with waṣla + solar consonant 90 -- art. with waṣla + solar consonant
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"},
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index 61e4c4a..02c3feb 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -201,6 +201,12 @@ hamza = {
201 {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda 201 {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda
202 {a="(A)(')", b="aآء"}, -- historic madda 202 {a="(A)(')", b="aآء"}, -- historic madda
203 -- initial (needs both ^ and %W patterns) 203 -- initial (needs both ^ and %W patterns)
204 -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines)
205 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
206 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
207 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
208 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
209 -- then the 'initial' rules for the remaining cases
204 {a="^(')([ua])", b="أ%2"}, 210 {a="^(')([ua])", b="أ%2"},
205 {a="^(')(i)", b="إ%2"}, 211 {a="^(')(i)", b="إ%2"},
206 {a="(%W)(')([ua])", b="%1أ%3"}, 212 {a="(%W)(')([ua])", b="%1أ%3"},
@@ -292,6 +298,12 @@ hamzaeasy = { -- differences marked below with 'easy'
292 {a="(A)(')", b="aاء"}, -- historic madda 298 {a="(A)(')", b="aاء"}, -- historic madda
293 --easy (end) 299 --easy (end)
294 -- initial (needs both ^ and %W patterns) 300 -- initial (needs both ^ and %W patterns)
301 -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines)
302 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
303 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
304 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
305 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
306 -- then the 'initial' rules for the remaining cases
295 {a="^(')([ua])", b="أ%2"}, 307 {a="^(')([ua])", b="أ%2"},
296 {a="^(')(i)", b="إ%2"}, 308 {a="^(')(i)", b="إ%2"},
297 {a="(%W)(')([ua])", b="%1أ%3"}, 309 {a="(%W)(')([ua])", b="%1أ%3"},
@@ -415,27 +427,32 @@ tanwineasy = { -- 'easy' requires some lines to be taken out:
415trigraphs = { -- trigraphs or more 427trigraphs = { -- trigraphs or more
416 -- 'llatI / 'llad_I 428 -- 'llatI / 'llad_I
417 {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, 429 {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"},
418 {a="([%p%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p 430 {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p
431 -- law: the diphthong is to be resoved into 'awi' (next 4 lines)
432 {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
433 {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
434 {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
435 {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
419 -- al- + lām 436 -- al- + lām
420 {a="^(a)l%-(l)", b="ا%1ل%2%2"}, 437 {a="^(a)l%-(l)", b="ا%1ل%2%2"},
421 {a="([%p%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p 438 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p
422 -- al- + solar consonant 439 -- al- + solar consonant
423 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, 440 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"},
424 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p 441 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p
425 -- assim. art. + solar consonant 442 -- assim. art. + solar consonant
426 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, 443 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"},
427 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p 444 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p
428 -- al- + initial unstable hamza 445 -- al- + initial unstable hamza
429 {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, 446 {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"},
430 {a="([%p%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p 447 {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p
431 {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, 448 {a="^(a)l%-([uai])", b="ا%1ل%2ا"},
432 {a="([%p%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p 449 {a="([%(%[%|%<%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p
433 -- li-/la- + art. + initial unstable hamza is a special orthography 450 -- li-/la- + art. + initial unstable hamza is a special orthography
434 {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, 451 {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"},
435 {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, 452 {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"},
436 -- al- + lunar consonant (i.e. what remains) 453 -- al- + lunar consonant (i.e. what remains)
437 {a="^(a)l%-", b="ا%1ل"}, 454 {a="^(a)l%-", b="ا%1ل"},
438 {a="([%p%s%-])(a)l%-", b="%1ا%2ل"}, --p 455 {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p
439 -- diphthongs to be resolved before ʾalif conjunctionis 456 -- diphthongs to be resolved before ʾalif conjunctionis
440 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, 457 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
441 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, 458 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
@@ -480,27 +497,32 @@ trigraphseasy = { -- differences marked below with 'easy'
480 {a="l%-l_ah", b="l-ll_ah"}, 497 {a="l%-l_ah", b="l-ll_ah"},
481 -- 'llatI / 'llad_I 498 -- 'llatI / 'llad_I
482 {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, 499 {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"},
483 {a="([%p%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p 500 {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p
501 -- law: the diphthong is to be resoved into 'awi' (next 4 lines)
502 {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
503 {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
504 {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"},
505 {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"},
484 -- al- + lām (easy) 506 -- al- + lām (easy)
485 {a="^(a)l%-(l)", b="ا%1ل%2"}, 507 {a="^(a)l%-(l)", b="ا%1ل%2"},
486 {a="([%p%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p 508 {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p
487 -- al- + solar consonant (easy) 509 -- al- + solar consonant (easy)
488 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"}, 510 {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"},
489 {a="([%p%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p 511 {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p
490 -- assim. art. + solar consonant (easy) 512 -- assim. art. + solar consonant (easy)
491 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"}, 513 {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"},
492 {a="([%p%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p 514 {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p
493 -- al- + initial unstable hamza 515 -- al- + initial unstable hamza
494 {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, 516 {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"},
495 {a="([%p%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p 517 {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p
496 {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, 518 {a="^(a)l%-([uai])", b="ا%1ل%2ا"},
497 {a="([%p%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p 519 {a="([%(%[%|%<%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p
498 -- li-/la- + art. + initial unstable hamza is a special orthography 520 -- li-/la- + art. + initial unstable hamza is a special orthography
499 {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, 521 {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"},
500 {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, 522 {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"},
501 -- al- + lunar consonant (i.e. what remains) 523 -- al- + lunar consonant (i.e. what remains)
502 {a="^(a)l%-", b="ا%1ل"}, 524 {a="^(a)l%-", b="ا%1ل"},
503 {a="([%p%s%-])(a)l%-", b="%1ا%2ل"}, --p 525 {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p
504 -- diphthongs to be resolved before ʾalif conjunctionis 526 -- diphthongs to be resolved before ʾalif conjunctionis
505 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, 527 {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"},
506 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, 528 {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"},
@@ -550,12 +572,12 @@ digraphs = {
550 -- ʾiʿrāb (end) 572 -- ʾiʿrāb (end)
551 -- initial straight double quote gives a connective ʾalif 573 -- initial straight double quote gives a connective ʾalif
552 {a="^\"[uai]", b="ٱ"}, 574 {a="^\"[uai]", b="ٱ"},
553 {a="([%p%s%-])\"[uai]", b="%1ٱ"}, --p 575 {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p
554 {a="(aW)(%s)([uai])", b="awuا%2%3"}, 576 {a="(aW)(%s)([uai])", b="awuا%2%3"},
555 -- hyphen + initial alif without hamza: 577 -- hyphen + initial alif without hamza:
556 {a="(%-)([uai])([%^%_%.%`]?)(%a)", b="%1ا%3%4"}, 578 {a="(%-)([uai])([%^%_%.%`]?)(%a)", b="%1ا%3%4"},
557 {a="^([uai])", b="ا%1"}, -- initial alif without hamza 579 {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p
558 {a="([%p%s])([uai])", b="%1ا"}, -- initial alif without hamza --p 580 {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا"}, -- initial alif without hamza --p
559 {a="%-%-", b="ـ"}, 581 {a="%-%-", b="ـ"},
560 {a="ؤؤ", b="ؤّ"}, 582 {a="ؤؤ", b="ؤّ"},
561 {a="أأ", b="أّ"}, 583 {a="أأ", b="أّ"},