diff options
author | Karl Berry <karl@freefriends.org> | 2016-06-11 23:25:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-06-11 23:25:52 +0000 |
commit | a3cda3ac2c0da87f2cd937a6d3878b267493d31b (patch) | |
tree | 3f14545b4d31b680999a7ebfd09577af92229666 /Master/texmf-dist/tex/lualatex | |
parent | fc425dd2d6d4c8a958e1f1f3152fff900b452f72 (diff) |
arabluatex (28may16)
git-svn-id: svn://tug.org/texlive/trunk@41397 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
6 files changed, 372 insertions, 224 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index 0bb475640ca..3b0ed5e4ef3 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -123,11 +123,12 @@ local function takeoutabjad(str) return str end -local function takeoutcap(str) +local function takeoutcapetc(str) str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) return string.format("%s", body) end) + str = string.gsub(str, "\\linebreak", "") return str end @@ -311,6 +312,42 @@ local function novoc(str) return str end +local function novoceasy(str) + str = string.gsub(str, "\\arb(%b{})", function(inside) + inside = string.sub(inside, 2, -2) + for i = 1,#hamzaeasy do + inside = string.gsub(inside, hamzaeasy[i].a, hamzaeasy[i].b) + end + for i = 1,#tanwinnv do + inside = string.gsub(inside, tanwinnv[i].a, tanwinnv[i].b) + end + for i = 1,#trigraphsnv do + inside = string.gsub(inside, trigraphsnv[i].a, trigraphsnv[i].b) + end + for i = 1,#digraphs do + inside = string.gsub(inside, digraphs[i].a, digraphs[i].b) + end + for i = 1,#single do + inside = string.gsub(inside, single[i].a, single[i].b) + end + for i = 1,#longvnv do + inside = string.gsub(inside, longvnv[i].a, longvnv[i].b) + end + for i = 1,#shortvnv do + inside = string.gsub(inside, shortvnv[i].a, shortvnv[i].b) + end + for i = 1,#punctuation do + inside = string.gsub(inside, punctuation[i].a, punctuation[i].b) + end + for i = 1,#null do + inside = string.gsub(inside, null[i].a, null[i].b) + end + inside = indnum(inside) + return string.format("\\txarb{%s}", inside) + end) +return str +end + local function transdmg(str) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) @@ -421,7 +458,7 @@ end function processvoc(str, rules) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) @@ -436,7 +473,7 @@ end function processfullvoc(str, rules) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) @@ -449,13 +486,17 @@ function processfullvoc(str, rules) return str end -function processnovoc(str) +function processnovoc(str, rules) str = "\\arb{".. str.."}" - str = takeoutcap(str) + str = takeoutcapetc(str) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) - str = novoc(str) + if rules == "easy" then + str = novoceasy(str) + elseif rules == "dflt" then + str = novoc(str) + else end str = unprotectarb(str) return str end diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty index 48b9b43447e..13f2b6e7180 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/05/09 v1.2 ArabTeX-like interface for LuaLaTeX] +[2016/05/28 v1.3 ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -90,6 +90,12 @@ \NewDocumentCommand{\SetTranslitStyle}{m}{\def\al@trans@style{#1}} \def\al@trans@convention{dmg} \NewDocumentCommand{\SetTranslitConvention}{m}{\def\al@trans@convention{#1}} +\NewDocumentCommand{\al@arbup@dflt}{m}{\textsuperscript{#1}}% +\NewDocumentCommand{\al@arbup}{m}{\al@arbup@dflt{#1}} +\NewDocumentCommand{\arbup}{m}{\al@arbup{#1}} +\NewDocumentCommand{\ArbUpDflt}{}{\let\al@arbup=\al@arbup@dflt} +\NewDocumentCommand{\NoArbUp}{}{\RenewDocumentCommand{\al@arbup}{m}{##1}} +\NewDocumentCommand{\SetArbUp}{m}{\RenewDocumentCommand{\al@arbup}{m}{#1}} \DeclareDocumentCommand{\cap}{m}% {\luadirect{tex.sprint(cap(\luastringN{#1}))}} \DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir @@ -110,7 +116,8 @@ \else% \ifx\@tempa\al@mode@novoc% \bgroup\textdir TRT\arabicfont% - \luadirect{tex.sprint(processnovoc(\luastringN{#2}))}\egroup% + \luadirect{tex.sprint(processnovoc(\luastringN{#2}, + \luastringO{\al@arb@rules}))}\egroup% \else% \ifx\@tempa\al@mode@trans% \bgroup\textdir TLT\al@trans@style% @@ -133,7 +140,8 @@ \else% \ifx\@tempa\al@mode@novoc% \bgroup\pardir TRT\textdir TRT\arabicfont% - \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}))}\egroup% + \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}, + \luastringO{\al@arb@rules}))}\egroup% \else \ifx\@tempa\al@mode@trans% \bgroup\pardir TLT\textdir TLT\al@trans@style% \luadirect{tex.sprint(processtrans(\luastringO{\BODY}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua index a2676e0be8f..ea7df9f69b5 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -23,6 +23,8 @@ along with this program. If not, see --]] hamzafv = { + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -51,7 +53,9 @@ hamzafv = { {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^uiUI])\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + {a="^\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="(%W)\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, {a="(A)(')(uN?)$", b="aآء%3"}, {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, {a="(A)(')(iN?)$", b="aآء%3"}, @@ -71,7 +75,7 @@ hamzafv = { {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤْ"}, {a="(u)(')(%W)", b="%1ؤْ%3"}, @@ -115,6 +119,8 @@ hamzafv = { } hamzafveasy = { -- differences marked below with 'easy' + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -143,14 +149,18 @@ hamzafveasy = { -- differences marked below with 'easy' {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, ---easy {a="(A)(')(uN?)$", b="aآء%3"}, ---easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(iN?)$", b="aآء%3"}, ---easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda ---easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda ---easy {a="(A)(')", b="aآء"}, -- historic madda + {a="([^uiUI])\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + {a="^\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="(%W)\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + --easy (begin) + {a="(A)(')(uN?)$", b="aاء%3"}, + {a="(A)(')(uN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(iN?)$", b="aاء%3"}, + {a="(A)(')(iN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(i)", b="aائ%3"}, -- historic madda + {a="(A)(')(u)", b="aاؤ%3"}, -- historic madda + {a="(A)(')", b="aاء"}, -- historic madda + --easy (end) -- initial (needs both ^ and %W patterns) {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, @@ -163,7 +173,7 @@ hamzafveasy = { -- differences marked below with 'easy' {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤْ"}, {a="(u)(')(%W)", b="%1ؤْ%3"}, @@ -207,73 +217,73 @@ hamzafveasy = { -- differences marked below with 'easy' } tanwinfv = { - {a="uNU", b="ٌو"}, - {a="aNU", b="ًوا"}, - {a="iNU", b="ٍو"}, - {a="([uai]N)(%s)([uai])", b="%1%2ٱ"}, - {a="(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, + {a="%-?uNU", b="ٌو"}, + {a="%-?aNU", b="ًوا"}, + {a="%-?iNU", b="ٍو"}, + {a="%-?([uai]N)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) - {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, - {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"}, - {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, - {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, - {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"}, + {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, + {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"}, + {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, + {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, + {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) -- quoted tanwīn (begin) - {a="(\"uN)", b=""}, - {a="(B)(\"aN)", b="%1"}, - {a="(\"aN)(_A)", b="ى"}, - {a="(\"aN)(Y)", b="ى"}, - {a="(T)(\"aN)", b="%1"}, - {a="(ء)(\"aN)", b="%1"}, - {a="([^TA])(\"aN)", b="%1ا"}, - {a="(\"iN)", b=""}, + {a="%-?(\"uN)", b=""}, + {a="(B)%-?(\"aN)", b="%1"}, + {a="%-?(\"aN)(_A)", b="ى"}, + {a="%-?(\"aN)(Y)", b="ى"}, + {a="(T)%-?(\"aN)", b="%1"}, + {a="(ء)%-?(\"aN)", b="%1"}, + {a="([^TA])%-?(\"aN)", b="%1ا"}, + {a="%-?(\"iNI?)", b=""}, -- quoted tanwīn (end) - {a="(uN)", b="ٌ"}, - {a="(B)(aN)", b="%1ً"}, - {a="(aN)(_A)", b="ًى"}, - {a="(aN)(Y)", b="ًى"}, - {a="(T)(aN)", b="%1ً"}, - {a="(ء)(aN)", b="%1ً"}, - {a="([^TA])(aN)", b="%1ًا"}, - {a="(iN)", b="ٍ"} + {a="%-?(uN)", b="ٌ"}, + {a="(B)%-?(aN)", b="%1ً"}, + {a="%-?(aN)(_A)", b="ًى"}, + {a="%-?(aN)(Y)", b="ًى"}, + {a="(T)%-?(aN)", b="%1ً"}, + {a="(ء)%-?(aN)", b="%1ً"}, + {a="([^TA])%-?(aN)", b="%1ًا"}, + {a="%-?(iNI?)", b="ٍ"} } tanwinfveasy = { -- no assimilations (see below) - {a="uNU", b="ٌو"}, - {a="aNU", b="ًوا"}, - {a="iNU", b="ٍو"}, - {a="([uai]N)(%s)([uai])", b="%1%2ٱ"}, - {a="(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, + {a="%-?uNU", b="ٌو"}, + {a="%-?aNU", b="ًوا"}, + {a="%-?iNU", b="ٍو"}, + {a="%-?([uai]N)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) ---easy {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, ---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"}, ---easy {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, ---easy {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, ---easy {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"}, +--easy {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, +--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"}, +--easy {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, +--easy {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, +--easy {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) -- quoted tanwīn (begin) - {a="(\"uN)", b=""}, - {a="(B)(\"aN)", b="%1"}, - {a="(\"aN)(_A)", b="ى"}, - {a="(\"aN)(Y)", b="ى"}, - {a="(T)(\"aN)", b="%1"}, - {a="(ء)(\"aN)", b="%1"}, - {a="([^TA])(\"aN)", b="%1ا"}, - {a="(\"iN)", b=""}, + {a="%-?(\"uN)", b=""}, + {a="(B)%-?(\"aN)", b="%1"}, + {a="%-?(\"aN)(_A)", b="ى"}, + {a="%-?(\"aN)(Y)", b="ى"}, + {a="(T)%-?(\"aN)", b="%1"}, + {a="(ء)%-?(\"aN)", b="%1"}, + {a="([^TA])%-?(\"aN)", b="%1ا"}, + {a="%-?(\"iNI?)", b=""}, -- quoted tanwīn (end) - {a="(uN)", b="ٌ"}, - {a="(B)(aN)", b="%1ً"}, - {a="(aN)(_A)", b="ًى"}, - {a="(aN)(Y)", b="ًى"}, - {a="(T)(aN)", b="%1ً"}, - {a="(ء)(aN)", b="%1ً"}, - {a="([^TA])(aN)", b="%1ًا"}, - {a="(iN)", b="ٍ"} + {a="%-?(uN)", b="ٌ"}, + {a="(B)%-?(aN)", b="%1ً"}, + {a="%-?(aN)(_A)", b="ًى"}, + {a="%-?(aN)(Y)", b="ًى"}, + {a="(T)%-?(aN)", b="%1ً"}, + {a="(ء)%-?(aN)", b="%1ً"}, + {a="([^TA])%-?(aN)", b="%1ًا"}, + {a="%-?(iNI?)", b="ٍ"} } trigraphsfv = { -- trigraphs or more @@ -290,10 +300,10 @@ trigraphsfv = { -- trigraphs or more {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, -- al- + initial unstable hamza - {a="^(a)l%-(\"?[uai])", b="ا%1لٱ%2"}, - {a="([%s%-])(a)l%-(\"?[uai])", b="%1ا%2لٱ%3"}, + {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, + {a="([%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, -- li-/la + art. + initial unstable hamza is a special orthography - {a="l([ai])%-l%-(\"?[uai])", b="ل%1لٱ%2"}, + {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لْ"}, @@ -314,7 +324,7 @@ trigraphsfv = { -- trigraphs or more -- li-/la- + assim. art. + solar consonant is a special orthography {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"}, -- art. with waṣla + initial unstable hamza - {a="'l%-(\"?[uai])", b="ٱلٱ%1"}, + {a="'l%-(\"?[uai])", b="ٱل%1ٱ"}, -- art. with waṣla + lunar consonant (i.e. what remains) {a="'l%-", b="ٱلْ"}, -- the silent wāw @@ -346,10 +356,10 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, -- al- + initial unstable hamza - {a="^(a)l%-(\"?[uai])", b="ا%1لٱ%2"}, - {a="([%s%-])(a)l%-(\"?[uai])", b="%1ا%2لٱ%3"}, + {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, + {a="([%s%-])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, -- li-/la + art. + initial unstable hamza is a special orthography - {a="l([ai])%-l%-(\"?[uai])", b="ل%1لٱ%2"}, + {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لْ"}, @@ -370,7 +380,7 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) -- li-/la- + assim. art. + solar consonant is a special orthography {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"}, -- art. with waṣla + initial unstable hamza - {a="'l%-(\"?[uai])", b="ٱلٱ%1"}, + {a="'l%-(\"?[uai])", b="ٱل%1ٱ"}, -- art. with waṣla + lunar consonant (i.e. what remains) {a="'l%-", b="ٱلْ"}, -- the silent wāw @@ -389,6 +399,18 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) } digraphsfv = { + -- iʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, @@ -436,9 +458,11 @@ digraphsfv = { {a="ww", b="وّ"}, {a="yy", b="يّ"}, -- sukūn begin + -- first, take out hyphen if any: + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])%-([uaiUAI])", b="%1%2"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])$", b="%1ْ"}, {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, - {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, + {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_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"}, @@ -474,6 +498,18 @@ digraphsfv = { } digraphsfveasy = { -- see the diffenrences under 'easy' marker below + -- iʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, @@ -524,6 +560,8 @@ digraphsfveasy = { -- see the diffenrences under 'easy' marker below -- first take out every previously generated sukūn by hamza rules, -- 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%`fqklmnwy])$", b="%1ْ"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_uaiUAIًٌٍ])", b="%1ْ%2"}, @@ -618,4 +656,3 @@ singlefveasy = { -- see the differences under 'easy' tag below {a="([^0-9])%-([^0-9])", b="%1%2"}, {a="B", b="ـ"}, } - diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua index 16f3b5115e4..f069f5ab747 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua @@ -23,36 +23,36 @@ along with this program. If not, see --]] tanwinnv = { - {a="uNU", b="و"}, - {a="aNU", b="وا"}, - {a="iNU", b="و"}, + {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="(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"}, --- {a="(ء)(aN)(%s)([rlmnwy])", b="%1%3%4%4"}, --- {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ا%3%4%4"}, --- {a="(iN)(%s)([rlmnwy])", b="|%2%3%3"}, +-- {a="%-?(uN)(%s)([rlmnwy])", b="|%2%3%3"}, +-- {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"}, +-- {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1%3%4%4"}, +-- {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ا%3%4%4"}, +-- {a="%-?(iNI?)(%s)([rlmnwy])", b="|%2%3%3"}, -- assimilations (end) -- "quoted" tanwīn (begin) - {a="(\"uN)", b="ٌ"}, - {a="(B)(\"aN)", b="%1ً"}, - {a="(\"aN)(_A)", b="ًى"}, - {a="(\"aN)(Y)", b="ًى"}, - {a="(T)(\"aN)", b="%1ً"}, - {a="(ء)(\"aN)", b="%1ً"}, - {a="([^TA])(\"aN)", b="%1ًا"}, - {a="(\"iN)", b="ٍ"}, + {a="%-?(\"uN)", b="ٌ"}, + {a="(B)%-?(\"aN)", b="%1ً"}, + {a="%-?(\"aN)(_A)", b="ًى"}, + {a="%-?(\"aN)(Y)", b="ًى"}, + {a="(T)%-?(\"aN)", b="%1ً"}, + {a="(ء)%-?(\"aN)", b="%1ً"}, + {a="([^TA])%-?(\"aN)", b="%1ًا"}, + {a="%-?(\"iNI?)", b="ٍ"}, -- "quoted" tanwīn (end) - {a="(uN)", b=""}, - {a="(B)(aN)", b="%1"}, - {a="(aN)(_A)", b="ى"}, - {a="(aN)(Y)", b="ى"}, - {a="(T)(aN)", b="%1"}, - {a="(ء)(aN)", b="%1"}, - {a="([^TA])(aN)", b="%1ا"}, - {a="(iN)", b=""}, + {a="%-?(uN)", b=""}, + {a="(B)%-?(aN)", b="%1"}, + {a="%-?(aN)(_A)", b="ى"}, + {a="%-?(aN)(Y)", b="ى"}, + {a="(T)%-?(aN)", b="%1"}, + {a="(ء)%-?(aN)", b="%1"}, + {a="([^TA])%-?(aN)", b="%1ا"}, + {a="%-?(iNI?)", b=""}, -- initial straight double quote gives a connective ʾalif. This has -- nothing to do with the tanwīn, but I put it here for time being. {a="^\"", b="ٱ"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index c96a9daa492..b98647d852d 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua @@ -127,23 +127,31 @@ hamzatrdmg = { } tanwintrdmg = { - {a="uNU", b="un"}, - {a="aNU", b="an"}, - {a="iNU", b="in"}, + {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)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="uni%2%3"}, - {a="(aN)(_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạni%3%4"}, - {a="(aN)(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạni%3%4"}, - {a="(T)(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="tani%3%4"}, - {a="([^TA])(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1ani%3%4"}, - {a="(iN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ini%2%3"}, + {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"}, + {a="(T)%-?(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="t\\arbup{ani}%3%4"}, + {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 + alif without hamza and kasra (ibn) + {a="%-?(uN)(%s)(i)", b="\\arbup{uni}%2'"}, + {a="%-?(aN)(_A)(%s)(i)", b="ạ\\arbup{ni}%3%'"}, + {a="%-?(aN)(Y)(%s)(i)", b="ạ\\arbup{ni}%3%'"}, + {a="(T)%-?(aN)(%s)(i)", b="t\\arbup{ani}%3%'"}, + {a="([^TA])%-?(aN)(%s)(i)", b="%1\\arbup{ani}%3%'"}, + {a="%-?(iN)(%s)(i)", b="\\arbup{ini}%2%'"}, -- - {a="uN", b="un"}, - {a="(aN)(_A)", b="ạn"}, - {a="(aN)(Y)", b="ạn"}, - {a="(T)(\"?aN)", b="tan"}, - {a="([^TA])(\"?aN)", b="%1an"}, - {a="iN", b="in"} +-- {a="uN", b="\\arbup{un}"}, (now included in the last line of this table) + {a="%-?(aN)(_A)", b="ạ\\arbup{n}"}, + {a="%-?(aN)(Y)", b="ạ\\arbup{n}"}, + {a="(T)%-?(\"?aN)", b="t\\arbup{an}"}, + {a="([^TA])%-?(\"?aN)", b="%1\\arbup{an}"}, + {a="(%-?)(\"?A?t?)(%-?)([ui])(N)", b="\\arbup{%2%4n}"} } trigraphstrdmg = { -- trigraphs or more @@ -198,7 +206,7 @@ trigraphstrdmg = { -- trigraphs or more {a="(_a)U", b="A"}, {a="(_a)I", b="A"}, -- assimilations - {a="(n)(%s)([rlmnwy])", b="%3%2%3"} + {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"} } trigraphstrdmgeasy = { -- see the differences below under 'easy' tag @@ -259,22 +267,41 @@ trigraphstrdmgeasy = { -- see the differences below under 'easy' tag digraphstrdmg = { {a="([uai]%-)(\"?[uai])", b="%1'"}, -- hyphen + initial alif without hamza {a="^(\"?[uai])", b="%1"}, -- 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)(%s)(\"?[uai])", b="awu%2%3"}, {a="([^%_][uai])(%s)(\"?[uai])", b="%1%2'"}, - {a="([%_]?[AYa])(%s)(\"?[uai])", b="a%2'"}, + {a="(%_A)(%s)(\"?[uai])", b="ạ%2'"}, + {a="(Y)(%s)(\"?[uai])", b="ạ%2'"}, + {a="(%_a)(%s)(\"?[uai])", b="a%2'"}, + {a="(A)(%s)(\"?[uai])", b="a%2'"}, {a="([%_]?[Uu])(%s)(\"?[uai])", b="u%2'"}, {a="([%_]?[Ii])(%s)(\"?[uai])", b="i%2'"}, + -- ʾiʿrāb hyphen (begin) + {a="(%-)(\"?[UI]na)(%p?%s)", b="\\arbup{%2}%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="\\arbup{%2}%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="\\arbup{%2}%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="\\arbup{%2}%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="\\arbup{%2}%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="\\arbup{%2}%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="\\arbup{%2}%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="\\arbup{%2}%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="\\arbup{%2}%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="\\arbup{%2}%3"}, + -- ʾiʿrāb hyphen (end) -- shorten long vowels preceding ʾalif conjunctionis {a="(U)(A)", b="U"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awu%2%3"}, - {a="([%_]?[AYa])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, + {a="(%_a)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, + {a="(%_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"}, + {a="(A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="a%2%3"}, + {a="(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ%2%3"}, {a="([%_]?[Uu])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="u%2%3"}, {a="([%_]?[Ii])(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="i%2%3"}, {a="%-%-", b=""}, -- {a="T([^uai])", b="%1"}, - {a="T(%s)", b="%1"}, - {a="T$", b=""}, + {a="T(%p?%s)", b="%1"}, + {a="T(%p?)$", b="%1"}, {a="_t", b="ṯ"}, {a="%^g", b="ǧ"}, {a="%.h", b="ḥ"}, @@ -409,15 +436,15 @@ hamzatrloc = { } tanwintrloc = { - {a="uNU", b="un"}, - {a="aNU", b="an"}, - {a="iNU", b="in"}, - {a="uN", b="un"}, - {a="(aN)(_A)", b="an"}, - {a="(aN)(Y)", b="an"}, - {a="(T)(\"?aN)", b="tan"}, - {a="([^TA])(\"?aN)", b="%1an"}, - {a="iN", b="in"} + {a="%-?uNU", b="un"}, + {a="%-?aNU", b="an"}, + {a="%-?iNU", b="in"}, + {a="%-?uN", b="un"}, +-- {a="%-?(aN)(_A)", b="an"}, (now included in last line in this table) + {a="%-?(aN)(Y)", b="an"}, + {a="(T)%-?(\"?aN)", b="tan"}, + {a="([^TA])%-?(\"?aN)", b="%1an"}, + {a="(%-?)(\"?A?t?)(%-?)([ui])(N)", b="%2%4n"}, } trigraphstrloc = { -- trigraphs or more @@ -471,8 +498,20 @@ trigraphstrloc = { -- trigraphs or more } digraphstrloc = { - {a="(%-)([uai])", b="%1%2"}, -- hyphen + initial alif without hamza - {a="^([uai])", b="%1"}, -- initial alif without hamza + -- discard the ʾiʿrāb hyphen (begin) + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)([uai])(%p?%s)", b="%2%3"}, + {a="(%-)([uai])(%p?)$", b="%2%3"}, + -- discard the ʾiʿrāb hyphen (end) + {a="(%-)(\"?[uai])", b="%1%2"}, -- hyphen + initial alif without hamza + {a="^(\"?[uai])", b="%1"}, -- initial alif without hamza {a="(%s)([uai])", b="%1%2"}, -- initial alif without hamza {a="%-%-", b=""}, {a="uww", b="ūw"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 4f5399fc5ac..0e5cfc671e8 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -72,6 +72,8 @@ raw = { } hamza = { + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -91,7 +93,9 @@ hamza = { {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="([^uiUI])\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + {a="^\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="(%W)\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, {a="(A)(')(uN?)$", b="aآء%3"}, {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, {a="(A)(')(iN?)$", b="aآء%3"}, @@ -111,7 +115,7 @@ hamza = { {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤ"}, {a="(u)(')(%W)", b="%1ؤ%3"}, @@ -155,6 +159,8 @@ hamza = { } hamzaeasy = { -- differences marked below with 'easy' + -- next line for ʾiʿrāb hyphen + {a="(')(%-)([uaiUAI])", b="%1%3"}, -- hard coded hamza {a="|\"'", b="ء"}, {a="A\"'", b="آ"}, @@ -174,14 +180,18 @@ hamzaeasy = { -- differences marked below with 'easy' {a="'i'([^uaiUAI])", b="إI%1"}, -- madda (historic writing below) {a="'a'([^uaiUAI])", b="آ%1"}, - {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, ---easy {a="(A)(')(uN?)$", b="aآء%3"}, ---easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(iN?)$", b="aآء%3"}, ---easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"}, ---easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda ---easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda ---easy {a="(A)(')", b="aآء"}, -- historic madda + {a="([^uiUI])\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + {a="^\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"}, + {a="(%W)\'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="%1آ%2"}, + --easy (begin) + {a="(A)(')(uN?)$", b="aاء%3"}, + {a="(A)(')(uN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(iN?)$", b="aاء%3"}, + {a="(A)(')(iN?)(%W)", b="aاء%3%4"}, + {a="(A)(')(i)", b="aائ%3"}, -- historic madda + {a="(A)(')(u)", b="aاؤ%3"}, -- historic madda + {a="(A)(')", b="aاء"}, -- historic madda + --easy (end) -- initial (needs both ^ and %W patterns) {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, @@ -194,7 +204,7 @@ hamzaeasy = { -- differences marked below with 'easy' {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, -- u - {a="(u)(')([uai]?N)$", b="%1ؤ%3"}, + {a="(u)(')([uai]N?)$", b="%1ؤ%3"}, {a="(u)(')([uai]N?)(%W)", b="%1ؤ%3%4"}, {a="(u)(')$", b="%1ؤ"}, {a="(u)(')(%W)", b="%1ؤ%3"}, @@ -238,69 +248,69 @@ hamzaeasy = { -- differences marked below with 'easy' } tanwin = { - {a="uNU", b="ٌو"}, - {a="aNU", b="ًوا"}, - {a="iNU", b="ٍو"}, + {a="%-?uNU", b="ٌو"}, + {a="%-?aNU", b="ًوا"}, + {a="%-?iNU", b="ٍو"}, -- assimilations (begin) - {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, - {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"}, - {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, - {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, - {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"}, + {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, + {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"}, + {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, + {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, + {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) -- quoted tanwīn (begin) - {a="(\"uN)", b=""}, - {a="(B)(\"aN)", b="%1"}, - {a="(\"aN)(_A)", b="ى"}, - {a="(\"aN)(Y)", b="ى"}, - {a="(T)(\"aN)", b="%1"}, - {a="(ء)(\"aN)", b="%1"}, - {a="([^TA])(\"aN)", b="%1ا"}, - {a="(\"iN)", b=""}, + {a="%-?(\"uN)", b=""}, + {a="(B)%-?(\"aN)", b="%1"}, + {a="%-?(\"aN)(_A)", b="ى"}, + {a="%-?(\"aN)(Y)", b="ى"}, + {a="(T)%-?(\"aN)", b="%1"}, + {a="(ء)%-?(\"aN)", b="%1"}, + {a="([^TA])%-?(\"aN)", b="%1ا"}, + {a="%-?(\"iNI?)", b=""}, -- quoted tanwīn (end) - {a="(uN)", b="ٌ"}, - {a="(B)(aN)", b="%1ً"}, - {a="(aN)(_A)", b="ًى"}, - {a="(aN)(Y)", b="ًى"}, - {a="(T)(aN)", b="%1ً"}, - {a="(ء)(aN)", b="%1ً"}, - {a="([^TA])(aN)", b="%1ًا"}, - {a="(iN)", b="ٍ"} + {a="%-?(uN)", b="ٌ"}, + {a="(B)%-?(aN)", b="%1ً"}, + {a="%-?(aN)(_A)", b="ًى"}, + {a="%-?(aN)(Y)", b="ًى"}, + {a="(T)%-?(aN)", b="%1ً"}, + {a="(ء)%-?(aN)", b="%1ً"}, + {a="([^TA])%-?(aN)", b="%1ًا"}, + {a="%-?(iNI?)", b="ٍ"} } tanwineasy = { -- 'easy' requires some lines to be taken out: - {a="uNU", b="ٌو"}, - {a="aNU", b="ًوا"}, - {a="iNU", b="ٍو"}, + {a="%-?uNU", b="ٌو"}, + {a="%-?aNU", b="ًوا"}, + {a="%-?iNU", b="ٍو"}, -- assimilations (begin) --- {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, --- {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"}, --- {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, --- {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, --- {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"}, +-- {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, +-- {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"}, +-- {a="(ء)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, +-- {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, +-- {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) -- quoted tanwīn (begin) - {a="(\"uN)", b=""}, - {a="(B)(\"aN)", b="%1"}, - {a="(\"aN)(_A)", b="ى"}, - {a="(\"aN)(Y)", b="ى"}, - {a="(T)(\"aN)", b="%1"}, - {a="(ء)(\"aN)", b="%1"}, - {a="([^TA])(\"aN)", b="%1ا"}, - {a="(\"iN)", b=""}, + {a="%-?(\"uN)", b=""}, + {a="(B)%-?(\"aN)", b="%1"}, + {a="%-?(\"aN)(_A)", b="ى"}, + {a="%-?(\"aN)(Y)", b="ى"}, + {a="(T)%-?(\"aN)", b="%1"}, + {a="(ء)%-?(\"aN)", b="%1"}, + {a="([^TA])%-?(\"aN)", b="%1ا"}, + {a="%-?(\"iNI?)", b=""}, -- quoted tanwīn (end) - {a="(uN)", b="ٌ"}, - {a="(B)(aN)", b="%1ً"}, - {a="(aN)(_A)", b="ًى"}, - {a="(aN)(Y)", b="ًى"}, - {a="(T)(aN)", b="%1ً"}, - {a="(ء)(aN)", b="%1ً"}, - {a="([^TA])(aN)", b="%1ًا"}, - {a="(iN)", b="ٍ"} + {a="%-?(uN)", b="ٌ"}, + {a="(B)%-?(aN)", b="%1ً"}, + {a="%-?(aN)(_A)", b="ًى"}, + {a="%-?(aN)(Y)", b="ًى"}, + {a="(T)%-?(aN)", b="%1ً"}, + {a="(ء)%-?(aN)", b="%1ً"}, + {a="([^TA])%-?(aN)", b="%1ًا"}, + {a="%-?(iNI?)", b="ٍ"} } trigraphs = { -- trigraphs or more @@ -317,13 +327,13 @@ trigraphs = { -- trigraphs or more {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل%2"}, {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل%3"}, -- al- + initial unstable hamza - {a="^(a)l%-(\")([uai])", b="ا%1لٱ%3"}, - {a="([%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"}, - {a="^(a)l%-([uai])", b="ا%1لا%2"}, - {a="([%s%-])(a)l%-([uai])", b="%1ا%2لا%3"}, + {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, + {a="([%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, + {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, + {a="([%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, -- 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"}, + {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ل"}, @@ -344,8 +354,8 @@ trigraphs = { -- trigraphs or more -- li-/la + assim. art. + solar consonant is a special orthography {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"}, -- art. with waṣla + initial unstable hamza - {a="'l%-(\")([uai])", b="الٱ%2"}, - {a="'l%-([uai])", b="الا%1"}, + {a="'l%-(\")([uai])", b="ال%2ٱ"}, + {a="'l%-([uai])", b="ال%1ا"}, -- art. with waṣla + lunar consonant (i.e. what remains) {a="'l%-", b="ال"}, -- the silent wāw @@ -377,13 +387,13 @@ trigraphseasy = { -- differences marked below with 'easy' {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"}, {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, -- al- + initial unstable hamza - {a="^(a)l%-(\")([uai])", b="ا%1لٱ%3"}, - {a="([%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"}, - {a="^(a)l%-([uai])", b="ا%1لا%2"}, - {a="([%s%-])(a)l%-([uai])", b="%1ا%2لا%3"}, + {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, + {a="([%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, + {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, + {a="([%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, -- 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"}, + {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ل"}, @@ -404,8 +414,8 @@ trigraphseasy = { -- differences marked below with 'easy' -- li-/la + assim. art. + solar consonant is a special orthography (easy) {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3"}, -- art. with waṣla + initial unstable hamza - {a="'l%-(\")([uai])", b="الٱ%2"}, - {a="'l%-([uai])", b="الا%1"}, + {a="'l%-(\")([uai])", b="ال%2ٱ"}, + {a="'l%-([uai])", b="ال%1ا"}, -- art. with waṣla + lunar consonant (i.e. what remains) {a="'l%-", b="ال"}, -- the silent wāw @@ -424,13 +434,26 @@ trigraphseasy = { -- differences marked below with 'easy' } digraphs = { + -- ʾiʿrāb: straight double quote must be discarded + {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?At[ui])(%p?)$", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?Ani)(%p?)$", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?%s)", b="%2%3"}, + {a="(%-)(\"?ayni)(%p?)$", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?%s)", b="%2%3"}, + {a="(%-)(\"?[uai])(%p?)$", b="%2%3"}, + -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, {a="([%s%-])\"[uai]", b="%1ٱ"}, {a="(aW)(%s)([uai])", b="awuا%2%3"}, - {a="(%-)([uai])", b="%1ا%2"}, -- hyphen + initial alif without hamza + -- hyphen + initial alif without hamza: + {a="(%-)([uai])([%^%_%.%`]?)(%a)", b="%1ا%3%4"}, {a="^([uai])", b="ا%1"}, -- initial alif without hamza - {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza + {a="(%s)([uai])", b="%1ا"}, -- initial alif without hamza {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, |