diff options
author | Karl Berry <karl@freefriends.org> | 2016-12-25 22:22:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-12-25 22:22:57 +0000 |
commit | 3eee810d8e3e8ed9915a59948cb4502cbf9a34e0 (patch) | |
tree | 2b1fca73cfa7ba2093eb02881c4d67b6ad1d8182 /Master/texmf-dist/tex/lualatex | |
parent | 6959c55b1060f5c323f5c5429657597a398de7a1 (diff) |
arabluatex (25dec16)
git-svn-id: svn://tug.org/texlive/trunk@42791 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
6 files changed, 278 insertions, 83 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index 07968c07180..3b552b6749e 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -128,6 +128,26 @@ local function indnum(str) return str end +local function processdiscretionary(str) + str = string.gsub(str, "\\%-", "\\-{}") + return str +end + +local function processarbnull(str, scheme) + if scheme == "buckwalter" then + str = string.gsub(str, "(\\arbnull.?)(%b{})", function(tag, body) + body = string.sub(body, 2, -2) + return string.format("P%sP", body) + end) + else + str = string.gsub(str, "(\\arbnull.?)(%b{})", function(tag, body) + body = string.sub(body, 2, -2) + return string.format("o%so", body) + end) + end + return str +end + local function takeoutabjad(str) str = string.gsub(str, "(\\abjad.?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) @@ -487,6 +507,7 @@ end function processvoc(str, rules, scheme) str = "\\arb{".. str.."}" + str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) @@ -505,6 +526,7 @@ end function processfullvoc(str, rules, scheme) str = "\\arb{".. str.."}" + str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) @@ -525,6 +547,7 @@ end function processnovoc(str, rules, scheme) str = "\\arb{".. str.."}" + str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) @@ -543,6 +566,8 @@ end function processtrans(str, mode, rules, scheme) str = "\\arb{".. str.."}" + str = processdiscretionary(str) + str = processarbnull(str, scheme) str = takeoutabjad(str) str = protectarb(str) str = breakcmd(str) diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty index 61dffc53d38..cc194e834cf 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty @@ -41,7 +41,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabluatex}% -[2016/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX] +[2016/12/24 v1.7 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -230,6 +230,7 @@ \NewDocumentCommand{\abjad}{m}% {\luadirect{tex.sprint(abjadify(#1))}} \fi} +\NewDocumentCommand{\arbnull}{m}{\relax} \NewDocumentCommand{\abraces}{+m}{% \luadirect{tex.sprint(abraces(\luastringN{#1}))}} \DeclareDocumentCommand{\LRmarginpar}{m}{\marginpar{\textdir TLT #1}} diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua index efe26c0ba93..31956a65db5 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -66,7 +66,11 @@ hamzafv = { {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda {a="(A)(')", b="aآء"}, -- historic madda -- initial (needs both ^ and %W patterns) - -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -172,7 +176,11 @@ hamzafveasy = { -- differences marked below with 'easy' {a="(A)(')", b="aاء"}, -- historic madda --easy (end) -- initial (needs both ^ and %W patterns) - -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -233,6 +241,11 @@ hamzafveasy = { -- differences marked below with 'easy' } tanwinfv = { -- with assimilations (\SetArbDflt*) + -- assimilations (begin) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, + {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, + -- assimilations (end) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="ٱ"}, {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -243,6 +256,8 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, + {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -250,6 +265,8 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) + {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="ٱ"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -271,6 +288,11 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) } tanwinfveasy = { -- no assimilations (see below) + -- assimilations (begin) +--easy {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +--easy {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, + -- assimilations (end) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="ٱ"}, {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -281,6 +303,8 @@ tanwinfveasy = { -- no assimilations (see below) {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) --easy {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, +--easy {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, +--easy {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, --easy {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, --easy {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, --easy {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -288,6 +312,8 @@ tanwinfveasy = { -- no assimilations (see below) --easy {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, --easy {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) + {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="ٱ"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -312,29 +338,36 @@ trigraphsfv = { -- trigraphs or more -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p - -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + -- law: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, - {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p -- li-/la + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1لْ"}, - {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, + {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, + {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -374,29 +407,36 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p - -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + -- law: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, - {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p -- li-/la + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1لْ"}, - {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, + {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, + {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -446,14 +486,20 @@ digraphsfvidgham = { {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, - {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, - {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, - {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza - -- initial alif without hamza + {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p + {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p + {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p + -- hyphen + initial alif without hamza + -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, + {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)(%a)", b="%1ٱ%3%4"}, + -- initial alif without hamza (next 4 lines) + {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p - {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p - {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p + {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p + {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -548,14 +594,20 @@ digraphsfv = { {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, - {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, - {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, - {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza - -- initial alif without hamza + {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p + {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p + {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p + -- hyphen + initial alif without hamza + -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, + {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)(%a)", b="%1ٱ%3%4"}, + -- initial alif without hamza (next 4 lines) + {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p - {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p - {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p + {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p + {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -650,14 +702,20 @@ digraphsfveasy = { -- see the differences under 'easy' marker below {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(%s)(\"?[uai])", b="awuا%2ٱ"}, - {a="(aw)(%s)(\"?[uai])", b="%1u%2ٱ"}, - {a="(ay)(%s)(\"?[uai])", b="%1i%2ٱ"}, - {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, -- hyphen + initial alif without hamza - -- initial alif without hamza + {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p + {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p + {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p + -- hyphen + initial alif without hamza + -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, + {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)(%a)", b="%1ٱ%3%4"}, + -- initial alif without hamza (next 4 lines) + {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p - {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p - {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا%3"}, -- initial alif without hamza --p + {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p + {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua index f2b6a6ac6bf..a79be821028 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua @@ -23,11 +23,17 @@ along with this program. If not, see --]] tanwinnv = { + -- assimilations (begin). These are good but may not apply here. +-- {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +-- {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, + -- assimilations (end) {a="%-?uNU", b="و"}, {a="%-?aNU", b="وا"}, {a="%-?iNU", b="و"}, -- assimilations (begin). These are good but may not apply here. -- {a="%-?(uN)(%s)([rlmnwy])", b="|%2%3%3"}, +-- {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, +-- {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, -- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ى%3%4%4"}, -- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ى%3%4%4"}, -- {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1%3%4%4"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index ef55a2b131c..c420f6f62ee 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua @@ -30,7 +30,8 @@ punctuationtr = { } nulltr = { - {a="%|", b=""} + {a="%|", b=""}, + {a="o[%S]-o", b=""} } -- cap @@ -95,11 +96,15 @@ hamzatrdmg = { {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda {a="(A)(')", b="%1ʾ"}, -- historic madda -- initial (needs both ^ and %W patterns) - -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, - {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, - {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, + {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="ʾ%2"}, {a="^(')(i)", b="ʾ%2"}, @@ -133,12 +138,20 @@ hamzatrdmg = { } tanwintrdmg = { + {a="%-?([uai]NU)(o)([ui])([%S]-o)", b="\\arbup{un%3}"}, {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"}, + {a="(o[%S]-)([uai]N[UI])(o)(\"?[ui])", b="'"}, {a="%-?uNU", b="\\arbup{un}"}, {a="%-?aNU", b="\\arbup{an}"}, {a="%-?iNU", b="\\arbup{in}"}, {a="%-?iNI", b="i\\arbup{n}"}, -- tanwīn preceding ʾalif conjunctionis + {a="%-?(uN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="\\arbup{uni}"}, + {a="%-?(aN)(_A)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ\\arbup{ni}"}, + {a="%-?(aN)(Y)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ\\arbup{ni}"}, + {a="(T)%-?(aN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="t\\arbup{ani}"}, + {a="([^TA])%-?(aN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1\\arbup{ani}"}, + {a="%-?(iN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="\\arbup{ini}"}, {a="%-?(uN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{uni}%2%3"}, {a="%-?(aN)(_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, {a="%-?(aN)(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, @@ -146,6 +159,12 @@ tanwintrdmg = { {a="([^TA])%-?(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1\\arbup{ani}%3%4"}, {a="%-?(iN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{ini}%2%3"}, -- tanwīn preceding 'lla_dI/'llatI + {a="%-?(uN)(o)('lla[%_]?[dt])([%S]-o)", b="\\arbup{uni}"}, + {a="%-?(aN)(_A)(o)('lla[%_]?[dt])([%S]-o)", b="ạ\\arbup{ni}"}, + {a="%-?(aN)(Y)(o)('lla[%_]?[dt])([%S]-o)", b="ạ\\arbup{ni}"}, + {a="(T)%-?(aN)(o)('lla[%_]?[dt])([%S]-o)", b="t\\arbup{ani}"}, + {a="([^TA])%-?(aN)(o)('lla[%_]?[dt])([%S]-o)", b="%1\\arbup{ani}"}, + {a="%-?(iN)(o)('lla[%_]?[dt])([%S]-o)", b="\\arbup{ini}"}, {a="%-?(uN)(%s)('lla[%_]?[dt])", b="\\arbup{uni}%2%3"}, {a="%-?(aN)(_A)(%s)('lla[%_]?[dt])", b="ạ\\arbup{ni}%3%4"}, {a="%-?(aN)(Y)(%s)('lla[%_]?[dt])", b="ạ\\arbup{ni}%3%4"}, @@ -153,12 +172,19 @@ tanwintrdmg = { {a="([^TA])%-?(aN)(%s)('lla[%_]?[dt])", b="%1\\arbup{ani}%3%4"}, {a="%-?(iN)(%s)('lla[%_]?[dt])", b="\\arbup{ini}%2%3"}, -- tanwīn + alif without hamza and kasra (ibn) or dhamma (uhrub) + {a="%-?(uN)(o)([ui])([%S]-o)", b="\\arbup{un%3}"}, + {a="%-?(aN)(_A)(o)([ui])([%S]-o)", b="ạ\\arbup{n%4}"}, + {a="%-?(aN)(Y)(o)([ui])([%S]-o)", b="ạ\\arbup{n%4}"}, + {a="(T)%-?(aN)(o)([ui])([%S]-o)", b="t\\arbup{an%4}"}, + {a="([^TA])%-?(aN)(o)([ui])([%S]-o)", b="%1\\arbup{an%4}"}, + {a="%-?(iN)(o)([ui])([%S]-o)", b="\\arbup{in%3}"}, + {a="(o[%S]-)([uai]N)(o)(\"?[ui])", b="'"}, {a="%-?(uN)(%s)([ui])", b="\\arbup{un%3}%2'"}, - {a="%-?(aN)(_A)(%s)([ui])", b="ạ\\arbup{n%4}%3%'"}, - {a="%-?(aN)(Y)(%s)([ui])", b="ạ\\arbup{n%4}%3%'"}, - {a="(T)%-?(aN)(%s)([ui])", b="t\\arbup{an%4}%3%'"}, - {a="([^TA])%-?(aN)(%s)([ui])", b="%1\\arbup{an%4}%3%'"}, - {a="%-?(iN)(%s)([ui])", b="\\arbup{in%3}%2%'"}, + {a="%-?(aN)(_A)(%s)([ui])", b="ạ\\arbup{n%4}%3'"}, + {a="%-?(aN)(Y)(%s)([ui])", b="ạ\\arbup{n%4}%3'"}, + {a="(T)%-?(aN)(%s)([ui])", b="t\\arbup{an%4}%3'"}, + {a="([^TA])%-?(aN)(%s)([ui])", b="%1\\arbup{an%4}%3'"}, + {a="%-?(iN)(%s)([ui])", b="\\arbup{in%3}%2'"}, -- -- {a="uN", b="\\arbup{un}"}, (now included in the last line of this table) {a="%-?(\"?At)%-?([ui])N", b="\\arbup{%1%2n}"}, @@ -173,29 +199,35 @@ trigraphstrdmg = { -- trigraphs or more -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="'ll%1%2"}, {a="([%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1'll%2%3"}, --p - -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + -- law: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, - {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, - {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, + {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām {a="^(a)l%-(l)", b="%1l-%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1%2l-%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1%2l-%3"}, --p -- al- + solar consonant {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2-%2"}, - {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2%3-%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2%3-%3"}, --p -- assim. art. + solar consonant {a="^(a)([%_%^%.]?[tdrzsn])%-", b="%1%2-"}, - {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1%2%3-"}, --p + {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsn])%-", b="%1%2%3-"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="%1l-%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-([uai])", b="l%1-l-%2"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="%1l-"}, - {a="([%(%[%|%<%s%-])(a)l%-", b="%1%2l-"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-", b="%1%2l-"}, --p -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, + {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, -- art. with waṣla + lām @@ -229,8 +261,9 @@ trigraphstrdmg = { -- trigraphs or more idghamtrdmg = { -- assimilations - {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"} -} + {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"}, + {a="(n)(}?)(o)([rlmnwy])([%S]-o)", b="%4%2"} +} digraphstrdmg = { {a="([uai]%-)(\"?[uai])", b="%1'"}, -- hyphen + initial alif without hamza @@ -243,6 +276,19 @@ digraphstrdmg = { {a="(%W)(\"?[uai])", b="%1%2"}, -- initial alif without hamza -- this is not necessary, take out for now: -- {a="([%_]?[uaiUAIY])(%s)([uai])", b="%1%2'"}, -- initial alif without hamza + {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3'"}, --p + {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3'"}, --p + {a="(aW)(o)(\"?[uai])([%S]-o)", b="awu"}, + {a="(UA)(o)(\"?[uai])([%S]-o)", b="u"}, + {a="(%_A)(o)(\"?[uai])([%S]-o)", b="ạ"}, + {a="(Y)(o)(\"?[uai])([%S]-o)", b="ạ"}, + {a="(%_a)(o)(\"?[uai])([%S]-o)", b="a"}, + {a="(A)(o)(\"?[uai])([%S]-o)", b="a"}, + {a="([%_]?[Uu])(o)(\"?[uai])([%S]-o)", b="u"}, + {a="([%_]?[Ii])(o)(\"?[uai])([%S]-o)", b="i"}, + {a="(o[%S]-)([UAIYWuaiyw])(o)(\"?[uai])", b="'"}, {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awu%2%3%4"}, --p {a="(UA)(%s)([%(%[%|%<]?)(\"?[uai])", b="u%2%3'"}, --p {a="([^%_][uai])(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2%3'"}, --p @@ -266,6 +312,13 @@ digraphstrdmg = { -- ʾiʿrāb hyphen (end) -- shorten long vowels preceding ʾalif conjunctionis {a="(U)(A)", b="U"}, + {a="(aW)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awu"}, + {a="(%_a)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="a"}, + {a="(%_A)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ"}, + {a="(A)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="a"}, + {a="(Y)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ"}, + {a="([%_]?[Uu])(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="u"}, + {a="([%_]?[Ii])(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="i"}, --p (next 7 lines, just after %s) {a="(aW)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"}, {a="(%_a)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 02c3febe93c..6be30d12f99 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -161,6 +161,7 @@ buckwalter = { {a="F", b="aN"}, {a="K", b="iN"}, {a="o", b="\""}, + {a="P", b="o"}, -- pass on to \arbnull -- hard-coded connective alif {a="%[", b="ٱ"}, {a="L", b="ٱ"} -- BW safe @@ -201,11 +202,15 @@ hamza = { {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda {a="(A)(')", b="aآء"}, -- historic madda -- initial (needs both ^ and %W patterns) - -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, - {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, - {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, + {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, @@ -298,7 +303,11 @@ hamzaeasy = { -- differences marked below with 'easy' {a="(A)(')", b="aاء"}, -- historic madda --easy (end) -- initial (needs both ^ and %W patterns) - -- 'aw: the diphthong is to be resoved into 'awi' (next 4 lines) + -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -359,11 +368,18 @@ hamzaeasy = { -- differences marked below with 'easy' } tanwin = { + -- assimilations (begin) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, + {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, + -- assimilations (end) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="%4"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, -- assimilations (begin) {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, + {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -371,6 +387,8 @@ tanwin = { {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) + {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="%5"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="%5"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -392,11 +410,18 @@ tanwin = { } tanwineasy = { -- 'easy' requires some lines to be taken out: + -- assimilations (begin) +-- {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +-- {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, + -- assimilations (end) + {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="%4"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, -- assimilations (begin) -- {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, +-- {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, +-- {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, -- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, -- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, -- {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -404,6 +429,8 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: -- {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, -- {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) + {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="%5"}, + {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="%5"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -428,32 +455,39 @@ trigraphs = { -- trigraphs or more -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p - -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + -- law: the diphthong is to be resolved into 'awi' (next 8 lines) + {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, - {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, - {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, + {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, - {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%(%[%|%<%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, + {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, + {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -489,7 +523,8 @@ trigraphs = { -- trigraphs or more idgham = { -- assimilations - {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"} + {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}, + {a="(n)(o)([rlmnwy])([%S]-o)", b="%3"} } trigraphseasy = { -- differences marked below with 'easy' @@ -498,32 +533,39 @@ trigraphseasy = { -- differences marked below with 'easy' -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p - -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + -- law: the diphthong is to be resloved into 'awi' (next 8 lines) + {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, + {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, - {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, - {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, + {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p + {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām (easy) {a="^(a)l%-(l)", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3"}, --p -- al- + solar consonant (easy) {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p -- assim. art. + solar consonant (easy) {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, - {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%(%[%|%<%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, + {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, + {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -573,11 +615,20 @@ digraphs = { -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p - {a="(aW)(%s)([uai])", b="awuا%2%3"}, + -- diphthongs to be resolved before ʾalif conjunctionis + {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(%s)([%(%[%|%<]?)([uai])", b="awuا%2%3%4"}, --p + {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ا"}, --p + {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ا"}, --p -- hyphen + initial alif without hamza: - {a="(%-)([uai])([%^%_%.%`]?)(%a)", b="%1ا%3%4"}, - {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p - {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا"}, -- initial alif without hamza --p + {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)(%a)", b="%1ا%3%4"}, + -- initial alif without hamza + {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p + -- initial alif without hamza + {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ا"}, + {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا"}, --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -715,5 +766,6 @@ punctuation = { null = { {a="%|", b=""}, - {a="([^0-9])(%-)", b="%1"} + {a="([^0-9])(%-)", b="%1"}, + {a="o[%S]-o", b=""} } |