diff options
author | Karl Berry <karl@freefriends.org> | 2016-12-17 20:40:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-12-17 20:40:20 +0000 |
commit | 16bf613671c9c801210b618e549388542875cf89 (patch) | |
tree | e449aa6c65885a555f38f1f5ce275b3303387b4c /Master/texmf-dist/tex/lualatex | |
parent | de0332fcc5336a39edea9f6a5103f6d8f1c4d608 (diff) |
arabluatex (17dec16)
git-svn-id: svn://tug.org/texlive/trunk@42737 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
6 files changed, 426 insertions, 247 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index 38fe87b31dd..07968c07180 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -146,18 +146,29 @@ local function takeoutcapetc(str) return str end -local function voc(str) +local function voc(str, rules) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) for i = 1,#hamza do inside = string.gsub(inside, hamza[i].a, hamza[i].b) end - for i = 1,#tanwin do - inside = string.gsub(inside, tanwin[i].a, tanwin[i].b) + if rules == "idgham" then + for i = 1,#tanwin do + inside = string.gsub(inside, tanwin[i].a, tanwin[i].b) + end + else + for i = 1,#tanwineasy do + inside = string.gsub(inside, tanwineasy[i].a, tanwineasy[i].b) + end end for i = 1,#trigraphs do inside = string.gsub(inside, trigraphs[i].a, trigraphs[i].b) end + if rules == "idgham" then + for i = 1,#idgham do + inside = string.gsub(inside, idgham[i].a, idgham[i].b) + end + end for i = 1,#digraphs do inside = string.gsub(inside, digraphs[i].a, digraphs[i].b) end @@ -218,20 +229,37 @@ local function voceasy(str) return str end -local function fullvoc(str) +local function fullvoc(str, rules) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) for i = 1,#hamzafv do inside = string.gsub(inside, hamzafv[i].a, hamzafv[i].b) end - for i = 1,#tanwinfv do - inside = string.gsub(inside, tanwinfv[i].a, tanwinfv[i].b) + if rules == "idgham" then + for i = 1,#tanwinfv do + inside = string.gsub(inside, tanwinfv[i].a, tanwinfv[i].b) + end + else + for i = 1,#tanwinfveasy do + inside = string.gsub(inside, tanwinfveasy[i].a, tanwinfveasy[i].b) + end end for i = 1,#trigraphsfv do inside = string.gsub(inside, trigraphsfv[i].a, trigraphsfv[i].b) end - for i = 1,#digraphsfv do - inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) + if rules == "idgham" then + for i = 1,#idgham do + inside = string.gsub(inside, idgham[i].a, idgham[i].b) + end + end + if rules == "idgham" then + for i = 1,#digraphsfvidgham do + inside = string.gsub(inside, digraphsfvidgham[i].a, digraphsfvidgham[i].b) + end + else + for i = 1,#digraphsfv do + inside = string.gsub(inside, digraphsfv[i].a, digraphsfv[i].b) + end end for i = 1,#singlefv do inside = string.gsub(inside, singlefv[i].a, singlefv[i].b) @@ -254,7 +282,7 @@ local function fullvoc(str) return str end -local function fullvoceasy(str, opt) +local function fullvoceasy(str, rules) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) for i = 1,#hamzafveasy do @@ -266,7 +294,7 @@ local function fullvoceasy(str, opt) for i = 1,#trigraphsfveasy do inside = string.gsub(inside, trigraphsfveasy[i].a, trigraphsfveasy[i].b) end - if opt == "nosukun" then + if rules == "nosukun" then for i = 1,#digraphsfveasy do inside = string.gsub(inside, digraphsfveasy[i].a, digraphsfveasy[i].b) end @@ -368,7 +396,7 @@ local function novoceasy(str) return str end -local function transdmg(str) +local function transdmg(str, rules) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) for i = 1,#hamzatrdmg do @@ -380,40 +408,10 @@ local function transdmg(str) for i = 1,#trigraphstrdmg do inside = string.gsub(inside, trigraphstrdmg[i].a, trigraphstrdmg[i].b) end - for i = 1,#digraphstrdmg do - inside = string.gsub(inside, digraphstrdmg[i].a, digraphstrdmg[i].b) - end - for i = 1,#singletrdmg do - inside = string.gsub(inside, singletrdmg[i].a, singletrdmg[i].b) - end - for i = 1,#longvtrdmg do - inside = string.gsub(inside, longvtrdmg[i].a, longvtrdmg[i].b) - end - for i = 1,#shortvtrdmg do - inside = string.gsub(inside, shortvtrdmg[i].a, shortvtrdmg[i].b) - end - for i = 1,#punctuationtr do - inside = string.gsub(inside, punctuationtr[i].a, punctuationtr[i].b) - end - for i = 1,#nulltr do - inside = string.gsub(inside, nulltr[i].a, nulltr[i].b) - end - return string.format("\\txtrans{%s}", inside) - end) -return str -end - -local function transdmgeasy(str) - str = string.gsub(str, "\\arb(%b{})", function(inside) - inside = string.sub(inside, 2, -2) - for i = 1,#hamzatrdmg do - inside = string.gsub(inside, hamzatrdmg[i].a, hamzatrdmg[i].b) - end - for i = 1,#tanwintrdmg do - inside = string.gsub(inside, tanwintrdmg[i].a, tanwintrdmg[i].b) - end - for i = 1,#trigraphstrdmgeasy do - inside = string.gsub(inside, trigraphstrdmgeasy[i].a, trigraphstrdmgeasy[i].b) + if rules == "idgham" then + for i = 1,#idghamtrdmg do + inside = string.gsub(inside, idghamtrdmg[i].a, idghamtrdmg[i].b) + end end for i = 1,#digraphstrdmg do inside = string.gsub(inside, digraphstrdmg[i].a, digraphstrdmg[i].b) @@ -498,8 +496,8 @@ function processvoc(str, rules, scheme) else end if rules == "easy" or rules == "easynosukun" then str = voceasy(str) - elseif rules == "dflt" then - str = voc(str) + elseif rules == "dflt" or rules == "idgham" then + str = voc(str, rules) else end str = unprotectarb(str) return str @@ -518,8 +516,8 @@ function processfullvoc(str, rules, scheme) str = fullvoceasy(str, "sukun") elseif rules == "easynosukun" then str = fullvoceasy(str, "nosukun") - elseif rules == "dflt" then - str = fullvoc(str) + elseif rules == "dflt" or rules == "idgham" then + str = fullvoc(str, rules) else end str = unprotectarb(str) return str @@ -536,7 +534,7 @@ function processnovoc(str, rules, scheme) else end if rules == "easy" or rules == "easynosukun" then str = novoceasy(str) - elseif rules == "dflt" then + elseif rules == "dflt" or rules == "idgham" then str = novoc(str) else end str = unprotectarb(str) @@ -551,16 +549,12 @@ function processtrans(str, mode, rules, scheme) str = holdcmd(str) if scheme == "buckwalter" then str = processbuckw(str) - else end + end if mode == "dmg" then - if rules == "easy" or rules == "easynosukun" then - str = transdmgeasy(str) - elseif rules == "dflt" then - str = transdmg(str) - else end + str = transdmg(str, rules) elseif mode == "loc" then str = transloc(str) - else end + 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 4921677093d..61dffc53d38 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/11/14 v1.5 An ArabTeX-like interface for LuaLaTeX] +[2016/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -67,6 +67,8 @@ \RequirePackage{luacode} \RequirePackage{xparse} \RequirePackage{environ} +\RequirePackage{adjustbox} +\RequirePackage{xkeyval} \newbool{al@rlmode} \luadirect{dofile(kpse.find_file("arabluatex.lua"))} \luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))} @@ -92,7 +94,10 @@ \IfBooleanTF{#1} {\def\al@arb@rules{easynosukun}} {\def\al@arb@rules{easy}}} -\NewDocumentCommand{\SetArbDflt}{}{\def\al@arb@rules{dflt}} +\NewDocumentCommand{\SetArbDflt}{s}{% + \IfBooleanTF{#1} + {\def\al@arb@rules{idgham}} + {\def\al@arb@rules{dflt}}} \def\al@trans@font{\rmfamily}% \NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}} \def\al@trans@style{\itshape}% @@ -167,6 +172,56 @@ \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else \fi\fi\fi\fi}[\par] +\newlength{\al@bayt@width} +\newlength{\al@gutter@width} +\setlength{\al@bayt@width}{.3\textwidth} +\setlength{\al@gutter@width}{.15\al@bayt@width} +\define@key[al]{verse}{width}{\setlength{\al@bayt@width}{#1}} +\define@key[al]{verse}{gutter}{\setlength{\al@gutter@width}{#1}} +\define@key[al]{verse}{metre}{\arb{#1}} +\define@boolkey[al]{verse}{utf}[true]{} +\define@boolkey[al]{verse}{delim}[true]{} +\define@choicekey[al]{verse}{mode}{fullvoc, voc, novoc, + trans}{\def\al@mode{#1}} +\presetkeys[al]{verse}{metre=\LR{\vskip -\baselineskip}, utf=false, + delim=false}{} +\NewDocumentEnvironment{arabverse}{O{}}% +{\par\centering\noindent\bgroup\setkeys[al]{verse}[metre]{#1}% + \ifx\al@mode\al@mode@trans% + \ifal@verse@utf\setRL\else\setLR\fi% + \else\setRL\fi}% +{\hfill\setkeys[al]{verse}[width,gutter,utf,mode]{#1}\egroup} +\NewDocumentCommand{\arb@utf}{m}{% + \ifal@verse@utf\txarb{#1}\else\arb{#1}\fi} +\def\al@hemistich@delim{*} +\NewDocumentCommand{\SetHemistichDelim}{m}{\def\al@hemistich@delim{#1}} +\def\al@verse@stroke{\leavevmode\xleaders\hbox{\arb{--}}\hfill\kern0pt} +\NewDocumentCommand{\bayt}{m o m}{% + \ifdefined\savenotes\savenotes\else\fi% + \edef\al@tatweel{--}% + \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#1}}% + \IfNoValueTF{#2}{% + \ifal@verse@delim\makebox[\al@gutter@width][c]{\al@hemistich@delim}% + \else% + \hspace{\al@gutter@width}% + \fi + }{% + \edef\@tempa{#2}% + \ifx\@tempa\al@tatweel% + \ifx\al@mode\al@mode@trans% + \hspace{\al@gutter@width}% + \else% + \makebox[\al@gutter@width][s]{\al@verse@stroke}% + \fi% + \else% + \ifx\al@mode\al@mode@trans% + \adjustbox{width=\al@gutter@width, height=\Height}{\arb@utf{#2}}% + \else% + \makebox[\al@gutter@width][s]{\arb@utf{#2}}% + \fi\fi}% + \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#3}}% + \ifdefined\spewnotes\spewnotes\else\fi% +} \AtBeginDocument{% \ifdefined\abjad% \RenewDocumentCommand{\abjad}{m}% diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua index 5c1e6e2aae8..efe26c0ba93 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -66,6 +66,12 @@ 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) + {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"}, + -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, {a="(%W)(')([ua])", b="%1أ%3"}, @@ -74,29 +80,29 @@ hamzafv = { -- ^say'aN and .zim'aN are special orthographies {a="(%^say)(%')(aN)", b="%1ئ%3"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, - {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, + {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?)(%W)", b="%1ؤ%3%4"}, + {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"}, -- a {a="(a)(')(A)$", b="%1آ"}, {a="(a)(')(A)(%W)", b="%1آ%4"}, - {a="(a)(')([u]N?)$", b="%1أ%3"}, - {a="(a)(')([u]N?)(%W)", b="%1أ%3%4"}, + {a="(a)(')([u][^%.%^%_]N?)$", b="%1أ%3"}, + {a="(a)(')([u][^%.%^%_]N?)(%W)", b="%1أ%3%4"}, {a="(a)(')(a)$", b="%1أ%3"}, {a="(a)(')(a)(%W)", b="%1أ%3%4"}, {a="(a)(')(aN)$", b="%1أً"}, {a="(a)(')(aN)(%W)", b="%1أً%4"}, - {a="(a)(')([i]N?)$", b="%1إ%3"}, - {a="(a)(')([i]N?)(%W)", b="%1إ%3%4"}, + {a="(a)(')([i][^%.%^%_]N?)$", b="%1إ%3"}, + {a="(a)(')([i][^%.%^%_]N?)(%W)", b="%1إ%3%4"}, {a="(a)(')$", b="%1أْ"}, {a="(a)(')(%W)", b="%1أْ%3"}, -- i - {a="(i)(')([uai]N?)$", b="%1ئ%3"}, - {a="(i)(')([uai]N?)(%W)", b="%1ئ%3%4"}, + {a="(i)(')([uai][^%.%^%_]N?)$", b="%1ئ%3"}, + {a="(i)(')([uai][^%.%^%_]N?)(%W)", b="%1ئ%3%4"}, {a="(i)(')$", b="%1ئْ"}, {a="(i)(')(%W)", b="%1ئْ%3"}, -- @@ -166,6 +172,12 @@ 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) + {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"}, + -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, {a="(%W)(')([ua])", b="%1أ%3"}, @@ -174,29 +186,29 @@ hamzafveasy = { -- differences marked below with 'easy' -- ^say'aN and .zim'aN are special orthographies {a="(%^say)(%')(aN)", b="%1ئ%3"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, - {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, + {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?)(%W)", b="%1ؤ%3%4"}, + {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"}, -- a {a="(a)(')(A)$", b="%1آ"}, {a="(a)(')(A)(%W)", b="%1آ%4"}, - {a="(a)(')([u]N?)$", b="%1أ%3"}, - {a="(a)(')([u]N?)(%W)", b="%1أ%3%4"}, + {a="(a)(')([u][^%.%^%_]N?)$", b="%1أ%3"}, + {a="(a)(')([u][^%.%^%_]N?)(%W)", b="%1أ%3%4"}, {a="(a)(')(a)$", b="%1أ%3"}, {a="(a)(')(a)(%W)", b="%1أ%3%4"}, {a="(a)(')(aN)$", b="%1أً"}, {a="(a)(')(aN)(%W)", b="%1أً%4"}, - {a="(a)(')([i]N?)$", b="%1إ%3"}, - {a="(a)(')([i]N?)(%W)", b="%1إ%3%4"}, + {a="(a)(')([i][^%.%^%_]N?)$", b="%1إ%3"}, + {a="(a)(')([i][^%.%^%_]N?)(%W)", b="%1إ%3%4"}, {a="(a)(')$", b="%1أْ"}, {a="(a)(')(%W)", b="%1أْ%3"}, -- i - {a="(i)(')([uai]N?)$", b="%1ئ%3"}, - {a="(i)(')([uai]N?)(%W)", b="%1ئ%3%4"}, + {a="(i)(')([uai][^%.%^%_]N?)$", b="%1ئ%3"}, + {a="(i)(')([uai][^%.%^%_]N?)(%W)", b="%1ئ%3%4"}, {a="(i)(')$", b="%1ئْ"}, {a="(i)(')(%W)", b="%1ئْ%3"}, -- @@ -220,7 +232,10 @@ hamzafveasy = { -- differences marked below with 'easy' {a="(i)(')([^uaiUAI])", b="%1ئْ%3"} } -tanwinfv = { +tanwinfv = { -- with assimilations (\SetArbDflt*) + {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, @@ -256,6 +271,9 @@ tanwinfv = { } tanwinfveasy = { -- no assimilations (see below) + {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, + {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, @@ -293,24 +311,29 @@ tanwinfveasy = { -- no assimilations (see below) trigraphsfv = { -- trigraphs or more -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, - {a="([%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, + {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p + -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + {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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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ٱ"}, + {a="([%(%[%|%<%s%-])(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لْ"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, @@ -341,32 +364,38 @@ trigraphsfv = { -- trigraphs or more -- words ending in -āT with silent wāw/yāʾ {a="(_a)UA", b="%1وا"}, {a="(_a)U", b="%1و"}, - {a="(_a)I", b="%1ي"}, - -- assimilations - {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"} + {a="(_a)I", b="%1ي"} } +-- idgham/assimilation rules for trigraphs apply here : see voc lua +-- file. + 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"}, + {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p + -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + {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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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ٱ"}, + {a="([%(%[%|%<%s%-])(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لْ"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, @@ -397,12 +426,10 @@ trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) -- words ending in -āT with silent wāw/yāʾ {a="(_a)UA", b="%1وا"}, {a="(_a)U", b="%1و"}, - {a="(_a)I", b="%1ي"}, - -- assimilations ---easy {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"} + {a="(_a)I", b="%1ي"} } -digraphsfv = { +digraphsfvidgham = { -- iʿrāb: straight double quote must be discarded {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"}, @@ -417,16 +444,16 @@ digraphsfv = { -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, - {a="([%s%-])\"[uai]", b="%1ٱ"}, + {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="([%_]?[uaiUAIY])(%s)(\"?[uai])", b="%1%2ٱ"}, - {a="^([uai])", b="ا%1"}, -- initial alif without hamza - {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza + {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="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -438,6 +465,7 @@ digraphsfv = { {a="%_t%_t", b="ثّ"}, {a="jj", b="جّ"}, {a="%^g%^g", b="جّ"}, + {a="%.h%.h", b="حّ"}, {a="xx", b="خّ"}, {a="%_h%_h", b="خّ"}, {a="dd", b="دّ"}, @@ -503,6 +531,108 @@ digraphsfv = { {a="%^d", b="ڊ"} } +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ٱ"}, --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="([%_]?[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="%-%-", b="ـ"}, + {a="ؤؤ", b="ؤّ"}, + {a="أأ", b="أّ"}, + {a="ئئ", b="ئّ"}, + {a="bb", b="بّ"}, + {a="BB", b="ـّ"}, + {a="(%_)([thd])([thd])", b="%1%2|%3"}, + {a="tt", b="تّ"}, + {a="%_t%_t", b="ثّ"}, + {a="jj", b="جّ"}, + {a="%^g%^g", b="جّ"}, + {a="%.h%.h", b="حّ"}, + {a="xx", b="خّ"}, + {a="%_h%_h", b="خّ"}, + {a="dd", b="دّ"}, + {a="%_d%_d", b="ذّ"}, + {a="rr", b="رّ"}, + {a="zz", b="زّ"}, + {a="ss", b="سّ"}, + {a="%^s%^s", b="شّ"}, + {a="%.s%.s", b="صّ"}, + {a="%.d%.d", b="ضّ"}, + {a="%.t%.t", b="طّ"}, + {a="%.z%.z", b="ظّ"}, + {a="%`%`", b="عّ"}, + {a="%.g%.g", b="غّ"}, + {a="ff", b="فّ"}, + {a="qq", b="قّ"}, + {a="kk", b="كّ"}, + {a="ll", b="لّ"}, + {a="mm", b="مّ"}, + {a="nn", b="نّ"}, + {a="hh", b="هّ"}, + {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])([%_]?[^%_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"}, +-- {a="(n)(ْ)(%s)(ي)", b="%1%3%4"}, +-- {a="(n)(ْ)(%s)(ل)", b="%1%3%4"}, +-- {a="(n)(ْ)(%s)(م)", b="%1%3%4"}, +-- {a="(n)(ْ)(%s)(ن)", b="%1%3%4"}, +-- {a="ْ\"", b="\""}, + -- sukūn end + {a="_t", b="ث"}, + {a="%^g", b="ج"}, + {a="%.h", b="ح"}, + {a="_h", b="خ"}, + {a="_d", b="ذ"}, + {a="%^s", b="ش"}, + {a="%.s", b="ص"}, + {a="%.d", b="ض"}, + {a="%.t", b="ط"}, + {a="%.z", b="ظ"}, + {a="%.g", b="غ"}, + {a="(U)(A)", b="%1ا"}, + {a="WA", b="وْا"}, + {a="(a)W\"", b="%1وا"}, + {a="(a)W", b="%1وْا"}, + {a="_A", b="aى"}, + {a="_u", b="ٗ"}, + {a="_a", b="ٰ"}, + {a="_i", b="ٖ"}, + {a="%.b", b="ٮ"}, + {a="%.f", b="ڡ"}, + {a="%.q", b="ٯ"}, + {a="%.k", b="ک"}, + {a="%.n", b="ں"}, + {a="%^d", b="ڊ"} +} + digraphsfveasy = { -- see the differences under 'easy' marker below -- iʿrāb: straight double quote must be discarded {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"}, @@ -518,16 +648,16 @@ digraphsfveasy = { -- see the differences under 'easy' marker below -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, - {a="([%s%-])\"[uai]", b="%1ٱ"}, + {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="([%_]?[uaiUAIY])(%s)(\"?[uai])", b="%1%2ٱ"}, - {a="^([uai])", b="ا%1"}, -- initial alif without hamza - {a="(%s)([uai])", b="%1ا%2"}, -- initial alif without hamza + {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="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -539,6 +669,7 @@ digraphsfveasy = { -- see the differences under 'easy' marker below {a="%_t%_t", b="ثّ"}, {a="jj", b="جّ"}, {a="%^g%^g", b="جّ"}, + {a="%.h%.h", b="حّ"}, {a="xx", b="خّ"}, {a="%_h%_h", b="خّ"}, {a="dd", b="دّ"}, @@ -572,7 +703,9 @@ digraphsfveasy = { -- see the differences under 'easy' marker below -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%s])", b="%1ْ%2"}, -- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])([%_]?[^%_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"}, +-- {a="(n)(ْ)(%s)(و)", b="%1%3%4"}, +-- {a="(n)(ْ)(%s)(ي)", b="%1%3%4"}, -- {a="(n)(ْ)(%s)([ل])", b="%1%3%4"}, -- {a="(n)(ْ)(%s)([م])", b="%1%3%4"}, -- {a="(n)(ْ)(%s)([ن])", b="%1%3%4"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua index f069f5ab747..f2b6a6ac6bf 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua @@ -64,27 +64,27 @@ trigraphsnv = { -- trigraphs or more {a="l%-l_ah", b="l-ll_ah"}, -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ال%1%2"}, - {a="([%s%-])'ll(a)([%_]?[dt])", b="%1ال%2%3"}, + {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ال%2%3"}, --p -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2"}, - {a="([%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, + {a="([%(%[%|%<%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, --p -- al- + solar consonant {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"}, - {a="([%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, + {a="([%(%[%|%<%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"}, --p -- assim. art. + solar consonant {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"}, - {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"}, --p {a="^(a)l%-([uai])", b="ا%1لا%2"}, - {a="([%s%-])(a)l%-([uai])", b="%1ا%2لا%3"}, + {a="([%(%[%|%<%s%-])(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ل"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p -- art. with waṣla + lām {a="'l%-(l)", b="ال%1"}, -- art. with waṣla + solar consonant diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index 87c85e9ac2b..ef55a2b131c 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua @@ -95,6 +95,12 @@ 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) + {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"}, + -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="ʾ%2"}, {a="^(')(i)", b="ʾ%2"}, {a="(%W)(')([ua])", b="%1ʾ%3"}, @@ -127,6 +133,7 @@ hamzatrdmg = { } tanwintrdmg = { + {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"}, {a="%-?uNU", b="\\arbup{un}"}, {a="%-?aNU", b="\\arbup{an}"}, {a="%-?iNU", b="\\arbup{in}"}, @@ -138,13 +145,20 @@ tanwintrdmg = { {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%'"}, + -- tanwīn preceding 'lla_dI/'llatI + {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"}, + {a="(T)%-?(aN)(%s)('lla[%_]?[dt])", b="t\\arbup{ani}%3%4"}, + {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)(%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="uN", b="\\arbup{un}"}, (now included in the last line of this table) {a="%-?(\"?At)%-?([ui])N", b="\\arbup{%1%2n}"}, @@ -158,24 +172,29 @@ tanwintrdmg = { 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"}, + {a="([%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1'll%2%3"}, --p + -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + {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="%1l-%2"}, - {a="([%s%-])(a)l%-(l)", b="%1%2l-%3"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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-"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="^(a)l%-(\"?[uai])", b="%1l-%2"}, + {a="([%(%[%|%<%s%-])(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-"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1%2l-"}, --p -- diphthongs to be resolved before ʾalif conjunctionis {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -192,7 +211,7 @@ trigraphstrdmg = { -- trigraphs or more -- li-/la- + assim. art. + solar consonant is a special orthography {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="l%1-%2-%3"}, -- art. with waṣla + initial unstable hamza - {a="'l%-([uai])", b="'l-%1"}, + {a="'l%-(\"?[uai])", b="'l-%1"}, -- art. with waṣla + lunar consonant (i.e. what remains) {a="'l%-", b="'l-"}, -- the silent wāw @@ -205,85 +224,34 @@ trigraphstrdmg = { -- trigraphs or more -- words ending in -āT with silent wāw/yāʾ {a="(_a)UA", b="A"}, {a="(_a)U", b="A"}, - {a="(_a)I", b="A"}, - -- assimilations - {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"} + {a="(_a)I", b="A"} } -trigraphstrdmgeasy = { -- see the differences below under 'easy' tag - -- 'llatI / 'llad_I - {a="^'ll(a)([%_]?[dt])", b="'ll%1%2"}, - {a="(%s)'ll(a)([%_]?[dt])", b="%1'll%2%3"}, - -- al- + lām - {a="^(a)l%-(l)", b="%1l-%2"}, - {a="([%s%-])(a)l%-(l)", b="%1%2l-%3"}, - -- al- + solar consonant - {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2-%2"}, - {a="([%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1%2%3-%3"}, - -- assim. art. + solar consonant - {a="^(a)([%_%^%.]?[tdrzsn])%-", b="%1%2-"}, - {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1%2%3-"}, - -- al- + initial unstable hamza - {a="^(a)l%-([uai])", b="%1l-%2"}, - {a="([%s%-])(a)l%-([uai])", b="%1%2l-%3"}, - -- 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-"}, - -- diphthongs to be resolved before ʾalif conjunctionis - {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 - {a="'l%-(l)", b="'l-%1"}, - -- art. with waṣla + solar consonant - {a="'l%-([%_%^%.]?[tdrzsn])", b="'%1-%1"}, - -- li-/la- + art. + lām - {a="l([ai])%-l%-(l)", b="l%1-%2%2"}, - -- assim. art. with waṣla + solar consonant - {a="'([%_%^%.]?[tdrzsn])%-", b="'%1-"}, - -- li-/la- + art. + solar consonant is a special orthography - {a="l([ai])%-l%-([%_%^%.]?[tdrzsn])", b="l%1-%2-%2"}, - -- li-/la- + assim. art. + solar consonant is a special orthography - {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="l%1-%2-%3"}, - -- art. with waṣla + initial unstable hamza - {a="'l%-([uai])", b="'l-%1"}, - -- art. with waṣla + lunar consonant (i.e. what remains) - {a="'l%-", b="'l-"}, - -- the silent wāw - {a="uU$", b="u"}, - {a="uU(%W)", b="u%1"}, - {a="aU$", b="a"}, - {a="aU(%W)", b="a%1"}, - {a="iU$", b="i"}, - {a="iU(%W)", b="i%1"}, - -- words ending in -āT with silent wāw/yāʾ - {a="(_a)UA", b="A"}, - {a="(_a)U", b="A"}, - {a="(_a)I", b="A"} +idghamtrdmg = { -- assimilations ---easy {a="(n)(%s)([rlmnwy])", b="%3%2%3"} -} + {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"} +} digraphstrdmg = { {a="([uai]%-)(\"?[uai])", b="%1'"}, -- hyphen + initial alif without hamza -- the following two are replaced with the 4 lines next for now -- {a="^(\"?[uai])", b="%1"}, -- initial alif without hamza -- {a="(%W)(\"?[uai])", b="%1%2"}, -- initial alif without hamza - {a="^(\"[uai])", b="'"}, -- initial alif without hamza - {a="(%W)(\"[uai])", b="%1'"}, -- initial alif without hamza - {a="^([uai])", b="%1"}, -- initial alif without hamza - {a="(%W)([uai])", b="%1%2"}, -- initial alif without hamza +-- {a="^(\"[uai])", b="'"}, -- initial alif without hamza +-- {a="(%W)(\"[uai])", b="%1'"}, -- initial alif without hamza + {a="^(\"?[uai])", b="%1"}, -- initial alif without hamza + {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)(%s)(\"?[uai])", b="awu%2%3"}, - {a="([^%_][uai])(%s)(\"?[uai])", b="%1%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'"}, + {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 + {a="(%_A)(%s)([%(%[%|%<]?)(\"?[uai])", b="ạ%2%3'"}, --p + {a="(Y)(%s)([%(%[%|%<]?)(\"?[uai])", b="ạ%2%3'"}, --p + {a="(%_a)(%s)([%(%[%|%<]?)(\"?[uai])", b="a%2%3'"}, --p + {a="(A)(%s)([%(%[%|%<]?)(\"?[uai])", b="a%2%3'"}, --p + {a="([%_]?[Uu])(%s)([%(%[%|%<]?)(\"?[uai])", b="u%2%3'"}, --p + {a="([%_]?[Ii])(%s)([%(%[%|%<]?)(\"?[uai])", b="i%2%3'"}, --p -- ʾiʿrāb hyphen (begin) {a="(%-)(\"?[UI]na)(%p?%s)", b="\\arbup{%2}%3"}, {a="(%-)(\"?[UI]na)(%p?)$", b="\\arbup{%2}%3"}, @@ -298,13 +266,14 @@ digraphstrdmg = { -- ʾ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="(%_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"}, + --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"}, + {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(%p?%s)", b="h%1"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 681995277ec..02c3febe93c 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -201,6 +201,12 @@ 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) + {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"}, + -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, {a="(%W)(')([ua])", b="%1أ%3"}, @@ -209,29 +215,29 @@ hamza = { -- ^say'aN and .zim'aN are special orthographies {a="(%^say)(%')(aN)", b="%1ئ%3"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, - {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, + {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?)(%W)", b="%1ؤ%3%4"}, + {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"}, -- a {a="(a)(')(A)$", b="%1آ"}, {a="(a)(')(A)(%W)", b="%1آ%4"}, - {a="(a)(')([u]N?)$", b="%1أ%3"}, - {a="(a)(')([u]N?)(%W)", b="%1أ%3%4"}, + {a="(a)(')([u][^%.%^%_]N?)$", b="%1أ%3"}, + {a="(a)(')([u][^%.%^%_]N?)(%W)", b="%1أ%3%4"}, {a="(a)(')(a)$", b="%1أ%3"}, {a="(a)(')(a)(%W)", b="%1أ%3%4"}, {a="(a)(')(aN)$", b="%1أً"}, {a="(a)(')(aN)(%W)", b="%1أً%4"}, - {a="(a)(')([i]N?)$", b="%1إ%3"}, - {a="(a)(')([i]N?)(%W)", b="%1إ%3%4"}, + {a="(a)(')([i][^%.%^%_]N?)$", b="%1إ%3"}, + {a="(a)(')([i][^%.%^%_]N?)(%W)", b="%1إ%3%4"}, {a="(a)(')$", b="%1أ"}, {a="(a)(')(%W)", b="%1أ%3"}, -- i - {a="(i)(')([uai]N?)$", b="%1ئ%3"}, - {a="(i)(')([uai]N?)(%W)", b="%1ئ%3%4"}, + {a="(i)(')([uai][^%.%^%_]N?)$", b="%1ئ%3"}, + {a="(i)(')([uai][^%.%^%_]N?)(%W)", b="%1ئ%3%4"}, {a="(i)(')$", b="%1ئ"}, {a="(i)(')(%W)", b="%1ئ%3"}, -- @@ -292,6 +298,12 @@ 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) + {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"}, + -- then the 'initial' rules for the remaining cases {a="^(')([ua])", b="أ%2"}, {a="^(')(i)", b="إ%2"}, {a="(%W)(')([ua])", b="%1أ%3"}, @@ -300,29 +312,29 @@ hamzaeasy = { -- differences marked below with 'easy' -- ^say'aN and .zim'aN are special orthographies {a="(%^say)(%')(aN)", b="%1ئ%3"}, {a="(.zi?m)(%')(aN)", b="%1ئ%3"}, - {a="([^uai])(')([uai]N?)$", b="%1ء%3"}, - {a="([^uai])(')([uai]N?)(%W)", b="%1ء%3%4"}, + {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?)(%W)", b="%1ؤ%3%4"}, + {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"}, -- a {a="(a)(')(A)$", b="%1آ"}, {a="(a)(')(A)(%W)", b="%1آ%4"}, - {a="(a)(')([u]N?)$", b="%1أ%3"}, - {a="(a)(')([u]N?)(%W)", b="%1أ%3%4"}, + {a="(a)(')([u][^%.%^%_]N?)$", b="%1أ%3"}, + {a="(a)(')([u][^%.%^%_]N?)(%W)", b="%1أ%3%4"}, {a="(a)(')(a)$", b="%1أ%3"}, {a="(a)(')(a)(%W)", b="%1أ%3%4"}, {a="(a)(')(aN)$", b="%1أً"}, {a="(a)(')(aN)(%W)", b="%1أً%4"}, - {a="(a)(')([i]N?)$", b="%1إ%3"}, - {a="(a)(')([i]N?)(%W)", b="%1إ%3%4"}, + {a="(a)(')([i][^%.%^%_]N?)$", b="%1إ%3"}, + {a="(a)(')([i][^%.%^%_]N?)(%W)", b="%1إ%3%4"}, {a="(a)(')$", b="%1أ"}, {a="(a)(')(%W)", b="%1أ%3"}, -- i - {a="(i)(')([uai]N?)$", b="%1ئ%3"}, - {a="(i)(')([uai]N?)(%W)", b="%1ئ%3%4"}, + {a="(i)(')([uai][^%.%^%_]N?)$", b="%1ئ%3"}, + {a="(i)(')([uai][^%.%^%_]N?)(%W)", b="%1ئ%3%4"}, {a="(i)(')$", b="%1ئ"}, {a="(i)(')(%W)", b="%1ئ%3"}, -- @@ -415,27 +427,32 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: trigraphs = { -- trigraphs or more -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, - {a="([%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, + {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p + -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + {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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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ٱ"}, + {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, + {a="([%(%[%|%<%s%-])(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ل"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, @@ -467,7 +484,10 @@ trigraphs = { -- trigraphs or more -- words ending in -āT with silent wāw/yāʾ {a="(_a)UA", b="%1وا"}, {a="(_a)U", b="%1و"}, - {a="(_a)I", b="%1ي"}, + {a="(_a)I", b="%1ي"} +} + +idgham = { -- assimilations {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"} } @@ -477,27 +497,32 @@ trigraphseasy = { -- differences marked below with 'easy' {a="l%-l_ah", b="l-ll_ah"}, -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, - {a="([%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, + {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p + -- law: the diphthong is to be resoved into 'awi' (next 4 lines) + {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 (easy) {a="^(a)l%-(l)", b="ا%1ل%2"}, - {a="([%s%-])(a)l%-(l)", b="%1ا%2ل%3"}, + {a="([%(%[%|%<%s%-])(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"}, + {a="([%(%[%|%<%s%-])(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ل"}, + {a="([%(%[%|%<%s%-])(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ٱ"}, + {a="([%(%[%|%<%s%-])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%s%-])(a)l%-([uai])", b="%1ا%2ل%3ا"}, + {a="([%(%[%|%<%s%-])(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ل"}, + {a="([%(%[%|%<%s%-])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, @@ -529,9 +554,7 @@ trigraphseasy = { -- differences marked below with 'easy' -- words ending in -āT with silent wāw/yāʾ {a="(_a)UA", b="%1وا"}, {a="(_a)U", b="%1و"}, - {a="(_a)I", b="%1ي"}, - -- assimilations ---easy {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"} + {a="(_a)I", b="%1ي"} } digraphs = { @@ -549,12 +572,12 @@ digraphs = { -- ʾiʿrāb (end) -- initial straight double quote gives a connective ʾalif {a="^\"[uai]", b="ٱ"}, - {a="([%s%-])\"[uai]", b="%1ٱ"}, + {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p {a="(aW)(%s)([uai])", b="awuا%2%3"}, -- 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ا"}, -- initial alif without hamza + {a="^([%(%[%|%<]?)([uai])", b="%1ا%2"}, -- initial alif without hamza --p + {a="(%s)([%(%[%|%<]?)([uai])", b="%1%2ا"}, -- initial alif without hamza --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, {a="أأ", b="أّ"}, @@ -566,6 +589,7 @@ digraphs = { {a="%_t%_t", b="ثّ"}, {a="jj", b="جّ"}, {a="%^g%^g", b="جّ"}, + {a="%.h%.h", b="حّ"}, {a="xx", b="خّ"}, {a="%_h%_h", b="خّ"}, {a="dd", b="دّ"}, @@ -680,7 +704,11 @@ punctuation = { {a="%+%@%[", b="]"}, {a="%-%@%[", b="["}, {a="%.", b="."}, - {a="([^0-9])%,", b="%1،"}, + -- replaced with the next two rules to make the Arabic comma work + -- after \abraces{} +-- {a="([^0-9])%,", b="%1،"}, + {a="%,", b="،"}, + {a="([%d])%،", b="%1,"}, {a="%?", b="؟"}, {a="%;", b="؛"}, } |