diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-05 21:09:03 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-05 21:09:03 +0000 |
commit | ef1531fb8bdf4a1e28e97cc10e3aacd9228e7d0c (patch) | |
tree | ffb320f47bca9a18c20a5f9436dc0c73f737ad64 /Master/texmf-dist/tex/lualatex | |
parent | 1481c02c171fb8ab30680dc4f3fbc5b872f2de16 (diff) |
arabluatex (5jul17)
git-svn-id: svn://tug.org/texlive/trunk@44754 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
5 files changed, 170 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index 86445887daf..48e59871033 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -46,7 +46,33 @@ local function unprotectarb(str) return str end +brkcmds = {} + +function mkarbbreak(str) + str = str .."," + str = string.gsub(str, "%s+", "") + local fieldstart = 1 + repeat + local nexti = string.find(str, "%,", fieldstart) + table.insert(brkcmds, string.sub(str, fieldstart, nexti-1)) + fieldstart = nexti +1 + until fieldstart > string.len(str) + return brkcmds +end + local function breakcmd(str) + -- user commands + if next(brkcmds) == nil then + -- nothing to do + else + for i = 1,#brkcmds do + str = string.gsub(str, "\\"..brkcmds[i].."%s?(%b{})", + function(body) + body = string.sub(body, 2, -2) + return string.format("}\\"..brkcmds[i].."{%s}\\arb{", body) + end) + end + end -- process \item[], then \item[] str = string.gsub(str, "\\(item.?)(%b[])", function(tag, body) @@ -73,6 +99,13 @@ local function breakcmd(str) body = string.sub(body, 2, -2) return string.format("}\\%s{%s}\\arb{", tag, body) end) + -- \textcolor + str = string.gsub(str, "\\(textcolor.?)(%b{})(%b{})", + function(tag, bodycolor, bodytext) + bodycolor = string.sub(bodycolor, 2, -2) + bodytext = string.sub(bodytext, 2, -2) + return string.format("}\\%s{%s}{\\arb{%s}}\\arb{", tag, bodycolor, bodytext) + end) -- Footnote str = string.gsub(str, "\\(Footnote.-)(%b{})", function(tag, body) @@ -328,8 +361,14 @@ local function fullvoceasy(str, rules) inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) end end - for i = 1,#singlefveasy do - inside = string.gsub(inside, singlefveasy[i].a, singlefveasy[i].b) + if rules == "nosukun" then + for i = 1,#singlefveasy do + inside = string.gsub(inside, singlefveasy[i].a, singlefveasy[i].b) + end + else + for i = 1,#singlefv do + inside = string.gsub(inside, singlefv[i].a, singlefv[i].b) + end end for i = 1,#longv do inside = string.gsub(inside, longv[i].a, longv[i].b) diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty index 57ea04b745a..8914c3115b5 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}% -[2017/06/20 v1.8.5 An ArabTeX-like interface for LuaLaTeX] +[2017/07/05 v1.9 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -84,6 +84,8 @@ \AtBeginDocument{\ifdef{\RL}% {\RenewDocumentCommand{\RL}{m}{\bgroup\textdir TRT\rmfamily#1\egroup}} {\NewDocumentCommand{\RL}{m}{\bgroup\textdir TRT#1\rmfamily\egroup}}} +\DeclareDocumentCommand{\MkArbBreak}{m}{% + \luadirect{mkarbbreak(\luastringN{#1})}} \AtBeginDocument{\ifdef{\aemph}% {\RenewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}} {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}} diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua index 99efb752791..919a35ed2a3 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -25,6 +25,12 @@ along with this program. If not, see hamzafv = { -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next lines for ʾalif alone + {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3%3"}, + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -78,14 +84,19 @@ hamzafv = { -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, - {a="(%W)(')([ua])", b="%1أ%3"}, - {a="(%W)(')(i)", b="%1إ%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1أ%3"}, + -- {a="(%W)(')(i)", b="%1إ%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"}, -- final -- ^say'aN and .zim'aN are special orthographies - {a="(%^say)(%')(aN)", b="%1ئ%3"}, + {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. - {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. + -- hamzah + pr. suffix: the carrier passes into yāʾ before ī so + -- take out the following two lines: + -- {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. + -- {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. {a="([^uai])(')([uai]N?%p?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%p?%s)", b="%1ء%3%4"}, -- u @@ -135,6 +146,12 @@ hamzafv = { hamzafveasy = { -- differences marked below with 'easy' -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next lines for ʾalif alone + {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3%3"}, + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -190,14 +207,19 @@ hamzafveasy = { -- differences marked below with 'easy' -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, - {a="(%W)(')([ua])", b="%1أ%3"}, - {a="(%W)(')(i)", b="%1إ%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1أ%3"}, + -- {a="(%W)(')(i)", b="%1إ%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"}, -- final -- ^say'aN and .zim'aN are special orthographies - {a="(%^say)(%')(aN)", b="%1ئ%3"}, + {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. - {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. + -- hamzah + pr. suffix: the carrier passes into yāʾ before ī so + -- take out the following two lines: + -- {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. + -- {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. {a="([^uai])(')([uai]N?%p?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%p?%s)", b="%1ء%3%4"}, -- u @@ -565,6 +587,7 @@ digraphsfvidgham = { {a="hh", b="هّ"}, {a="ww", b="وّ"}, {a="yy", b="يّ"}, + {a="%.y%.y", b="ىّ"}, -- additional characters + šaddah (begin) {a="pp", b="پّ"}, {a="vv", b="ڤّ"}, @@ -575,10 +598,10 @@ digraphsfvidgham = { -- additional characters + šaddah (end) -- sukūn begin -- first, take out hyphen if any: - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])%-([uaiUAI])", b="%1%2"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy]%p?)$", b="%1ْ"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p?%s)", b="%1ْ%2"}, - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"}, -- take out sukūn in cases of assimilation {a="(n)(ْ)(%s)(ر)", b="%1%3%4"}, {a="(n)(ْ)(%s)(و)", b="%1%3%4"}, @@ -599,6 +622,7 @@ digraphsfvidgham = { {a="%.t", b="ط"}, {a="%.z", b="ظ"}, {a="%.g", b="غ"}, + {a="%.y", b="ى"}, -- additional characters (begin) {a="%^c", b="چ"}, {a="%^z", b="ژ"}, @@ -688,6 +712,7 @@ digraphsfv = { {a="hh", b="هّ"}, {a="ww", b="وّ"}, {a="yy", b="يّ"}, + {a="%.y%.y", b="ىّ"}, -- additional characters + šaddah (begin) {a="pp", b="پّ"}, {a="vv", b="ڤّ"}, @@ -698,10 +723,10 @@ digraphsfv = { -- additional characters + šaddah (end) -- sukūn begin -- first, take out hyphen if any: - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])%-([uaiUAI])", b="%1%2"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy]%p?)$", b="%1ْ"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p?%s)", b="%1ْ%2"}, - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])([%_]?[^%_uaiUAIYًٌٍ])", b="%1ْ%2"}, -- take out sukūn in cases of assimilation -- {a="(n)(ْ)(%s)(ر)", b="%1%3%4"}, -- {a="(n)(ْ)(%s)(و)", b="%1%3%4"}, @@ -722,6 +747,7 @@ digraphsfv = { {a="%.t", b="ط"}, {a="%.z", b="ظ"}, {a="%.g", b="غ"}, + {a="%.y", b="ى"}, -- additional characters (begin) {a="%^c", b="چ"}, {a="%^z", b="ژ"}, @@ -811,6 +837,7 @@ digraphsfveasy = { -- see the differences under 'easy' marker below {a="hh", b="هّ"}, {a="ww", b="وّ"}, {a="yy", b="يّ"}, + {a="%.y%.y", b="ىّ"}, -- additional characters + šaddah (begin) {a="pp", b="پّ"}, {a="vv", b="ڤّ"}, @@ -824,10 +851,10 @@ digraphsfveasy = { -- see the differences under 'easy' marker below -- so there be no need to edit them: {a="ْ", b=""}, -- first, take out hyphen if any: --- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"}, +-- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])%-([uaiUAI])", b="%1%2"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy]%p?)$", b="%1ْ"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])(%p?%s)", b="%1ْ%2"}, --- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, +-- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwyY])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, -- take out sukūn in cases of assimilation -- {a="(n)(ْ)(%s)(ر)", b="%1%3%4"}, -- {a="(n)(ْ)(%s)(و)", b="%1%3%4"}, @@ -848,6 +875,7 @@ digraphsfveasy = { -- see the differences under 'easy' marker below {a="%.t", b="ط"}, {a="%.z", b="ظ"}, {a="%.g", b="غ"}, + {a="%.y", b="ى"}, -- additional characters (begin) {a="%^c", b="چ"}, {a="%^z", b="ژ"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index 35f4b677cf6..404ae220a58 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua @@ -31,7 +31,8 @@ punctuationtr = { nulltr = { {a="%|", b=""}, - {a="o[%S]-o", b=""} + {a="o[%S]-o", b=""}, + {a="[%^%_](.)", b="<??>%1"} } -- cap @@ -71,6 +72,17 @@ captr = { -- dmg hamzatrdmg = { + -- next lines for ʾalif alone + {a="(%.A)l%-(%^n)", b=".|l-%2"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)l%-(%^n)", b="%1.|l-%3"}, --additional (^n is lunar) --p + {a="(%.A)l%-([%_%^%.]?[tdrzsnc])", b=".|%2-%2"}, + {a="([%(%[%|%<%s%-o])(%.A)l%-([%_%^%.]?[tdrzsnc])", b="%1.|%3-%3"}, --p + {a="(%.A)([uai])l%-(%^n)", b="||%2l-%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)([uai])l%-(%^n)", b="%1||%3l-%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="||%2%3-%3"}, + {a="([%(%[%|%<%s%-o])(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="%1||%3%4-%4"}, --p + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="||%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, @@ -108,8 +120,11 @@ hamzatrdmg = { -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="ʾ%2"}, {a="^(')(i)", b="ʾ%2"}, - {a="(%W)(')([ua])", b="%1ʾ%3"}, - {a="(%W)(')(i)", b="%1ʾ%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1ʾ%3"}, + -- {a="(%W)(')(i)", b="%1ʾ%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1ʾ%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1ʾ%3"}, -- final {a="([Iy])(')(aN)$", b="%1ʾ%3"}, {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"}, @@ -243,7 +258,7 @@ trigraphstrdmg = { -- trigraphs or more {a="'l%-(%^n)", b="'l-%1"}, -- ^n is lunar {a="'l%-([%_%^%.]?[tdrzsnc])", b="'%1-%1"}, -- li-/la- + art. + lām - {a="l([ai])%-l%-(l)", b="l%1-%2%2"}, + {a="l([ai])%-l%-(l)", b="l%1-%2-%2"}, -- assim. art. with waṣla + solar consonant -- ('c' and '^n' are additional characters) {a="'(%^n)%-", b="'l-"}, -- ^n is lunar @@ -365,6 +380,7 @@ digraphstrdmg = { {a="%.t", b="ṭ"}, {a="%.z", b="ẓ"}, {a="%.g", b="ġ"}, + {a="%.y", b="y"}, -- additional characters (begin) {a="%^c", b="č"}, {a="%^z", b="ž"}, @@ -419,6 +435,8 @@ longvtrdmg = { {a="A", b="ā"}, {a="U", b="ū"}, {a="I", b="ī"}, + {a="aY", b="ay"}, + {a="iY", b="ī"}, {a="Y", b="ạ̄"} } @@ -431,6 +449,9 @@ shortvtrdmg = { -- loc hamzatrloc = { + -- next lines for ʾalif alone + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="||%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, @@ -468,8 +489,11 @@ hamzatrloc = { -- initial (needs both ^ and %W patterns) {a="^(')([ua])", b="%2"}, {a="^(')(i)", b="%2"}, - {a="(%W)(')([ua])", b="%1%3"}, - {a="(%W)(')(i)", b="%1%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1%3"}, + -- {a="(%W)(')(i)", b="%1%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1%3"}, -- final {a="([Iy])(')(aN)$", b="%1ʾ%3"}, {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"}, @@ -610,6 +634,7 @@ digraphstrloc = { {a="%.t", b="ṭ"}, {a="%.z", b="ẓ"}, {a="%.g", b="gh"}, + {a="%.y", b="y"}, -- additional characters (begin) {a="%^c", b="ch"}, {a="%^z", b="zh"}, @@ -663,6 +688,8 @@ longvtrloc = { {a="A", b="ā"}, {a="U", b="ū"}, {a="I", b="ī"}, + {a="aY", b="ay"}, + {a="iY", b="ī"}, {a="Y", b="á"}, } @@ -679,6 +706,9 @@ finaltrloc = { -- arabica hamzatrarabica = { -- ≠ from hamzatrloc: initial hamza has to be held + -- next lines for ʾalif alone + {a="(%.A)([^uai])", b=".|%2"}, + {a="(%.A)([uai])", b="||%2"}, -- hard coded hamza {a="|\"'", b="ʾ"}, {a="A\"'", b="ʾA"}, @@ -717,8 +747,11 @@ hamzatrarabica = { -- ≠ from hamzatrloc: initial hamza has to be held -- hold it for now (see below, beginning of digraphs table) {a="^(')([ua])", b="@%2"}, {a="^(')(i)", b="@%2"}, - {a="(%W)(')([ua])", b="%1@%3"}, - {a="(%W)(')(i)", b="%1@%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1@%3"}, + -- {a="(%W)(')(i)", b="%1@%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1@%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1@%3"}, -- final {a="([Iy])(')(aN)$", b="%1ʾ%3"}, {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"}, @@ -846,6 +879,7 @@ digraphstrarabica = { {a="%.t", b="ṭ"}, {a="%.z", b="ẓ"}, {a="%.g", b="ġ"}, + {a="%.y", b="y"}, -- additional characters (begin) {a="%^c", b="č"}, {a="%^z", b="ž"}, @@ -896,6 +930,8 @@ singletrarabica = { } longvtrarabica = { + {a="aY", b="ay"}, + {a="iY", b="ī"}, {a="[AY]", b="ā"}, {a="U", b="ū"}, {a="I", b="ī"} diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 6c63a883c49..ca1aa99ca87 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -170,6 +170,12 @@ buckwalter = { hamza = { -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next lines for ʾalif alone + {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3%3"}, + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -214,14 +220,19 @@ hamza = { -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, - {a="(%W)(')([ua])", b="%1أ%3"}, - {a="(%W)(')(i)", b="%1إ%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1أ%3"}, + -- {a="(%W)(')(i)", b="%1إ%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"}, -- final -- ^say'aN and .zim'aN are special orthographies - {a="(%^say)(%')(aN)", b="%1ئ%3"}, + {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. - {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. + -- hamzah + pr. suffix: the carrier passes into yāʾ before ī so + -- take out the following two lines: + -- {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. + -- {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. {a="([^uai])(')([uai]N?%p?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%p?%s)", b="%1ء%3%4"}, -- u @@ -271,6 +282,12 @@ hamza = { hamzaeasy = { -- differences marked below with 'easy' -- next line for ʾiʿrāb hyphen {a="(')(%-)([uaiUAI])", b="%1%3"}, + -- next lines for ʾalif alone (easy) + {a="(%.A)([uai]?)l%-(%^n)", b="ا%2ل%3"}, --additional (^n is lunar) + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-(%^n)", b="%1ا%3%4"}, --additional (^n is lunar) --p + {a="(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="ا%2ل%3"}, + {a="([%(%[%|%<%s%-o])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4"}, --p + {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -317,14 +334,19 @@ hamzaeasy = { -- differences marked below with 'easy' -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, - {a="(%W)(')([ua])", b="%1أ%3"}, - {a="(%W)(')(i)", b="%1إ%3"}, + -- consider replacing initial %W with [%s%(%[%<%-]: + -- {a="(%W)(')([ua])", b="%1أ%3"}, + -- {a="(%W)(')(i)", b="%1إ%3"}, + {a="([%s%(%[%<%-])(')([ua])", b="%1أ%3"}, + {a="([%s%(%[%<%-])(')(i)", b="%1إ%3"}, -- final -- ^say'aN and .zim'aN are special orthographies - {a="(%^say)(%')(aN)", b="%1ئ%3"}, + {a="(%^sa%.?[yY])(\"?%|?)(%')(aN)", b="%1%2ئ%4"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. - {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. + -- hamzah + pr. suffix: the carrier passes into yāʾ before ī so + -- take out the following two lines: + -- {a="(')(I%p?)$", b="إ%2"}, -- affix pr. 1st person sg. + -- {a="(')(I)(%p?%s)", b="إ%2%3"}, -- affix pr. 1st person sg. {a="([^uai])(')([uai]N?%p?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%p?%s)", b="%1ء%3%4"}, -- u @@ -695,6 +717,7 @@ digraphs = { {a="hh", b="هّ"}, {a="ww", b="وّ"}, {a="yy", b="يّ"}, + {a="%.y%.y", b="ىّ"}, -- additional characters + šaddah (begin) {a="pp", b="پّ"}, {a="vv", b="ڤّ"}, @@ -714,6 +737,7 @@ digraphs = { {a="%.t", b="ط"}, {a="%.z", b="ظ"}, {a="%.g", b="غ"}, + {a="%.y", b="ى"}, -- additional characters (begin) {a="%^c", b="چ"}, {a="%^z", b="ژ"}, @@ -776,6 +800,8 @@ longv = { {a="A", b="َا"}, {a="U", b="ُو"}, {a="I", b="ِي"}, + {a="aY", b="aى"}, + {a="iY", b="iى"}, {a="Y", b="aى"} } @@ -816,5 +842,6 @@ punctuation = { null = { {a="%|", b=""}, {a="([^0-9])(%-)", b="%1"}, - {a="o[%S]-o", b=""} + {a="o[%S]-o", b=""}, + {a="[%^%_](.)", b=">??<%1"} } |