diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/arabluatex')
6 files changed, 489 insertions, 321 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index 7a7460aeef2..823823621c1 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -27,127 +27,139 @@ require("arabluatex_fullvoc") require("arabluatex_novoc") require("arabluatex_trans") +-- lpeg equivalent for string.gsub() +local function gsub(s, patt, repl) + patt = lpeg.P(patt) + patt = lpeg.Cs((patt / repl + 1)^0) + return lpeg.match(patt, s) +end + +-- makeatletter, makeatother +local atletter = "\\makeatletter{}" +local atother = "\\makeatother{}" + +-- some basic patterns: +local ascii = lpeg.R("az", "AZ", "@@") +local dblbkslash = lpeg.Cs("\\") +local bsqbrackets = lpeg.Cs{ "[" * ((1 - lpeg.S"[]") + lpeg.V(1))^0 * "]" } +local bcbraces = lpeg.Cs{ "{" * ((1 - lpeg.S"{}") + lpeg.V(1))^0 * "}" } +local spce = lpeg.Cs(" ") +local spcenc = lpeg.P(" ") +local cmdstar = lpeg.Cs(spce * lpeg.P("*")) +local bsqbracketsii = lpeg.Cs(bsqbrackets^-2) +local bcbracesii = lpeg.Cs(bcbraces^-2) +local cmd = lpeg.Cs(dblbkslash * ascii^1 * cmdstar^-1) +local cmdargs = lpeg.Cs(spce * bsqbracketsii * bcbracesii * bsqbrackets^-1) + local function protectarb(str) - str = string.gsub(str, "(\\arb.?)(%[.-%])(%b{})", "\\@arb%2%3") - str = string.gsub(str, "(\\begin.?)(%b{})(%b[])", "\\@begin%3%2") - str = string.gsub(str, "(\\begin.?)(%b{})", "\\@begin%2") - str = string.gsub(str, "(\\end.?)(%b{})", "\\@end%2") - str = string.gsub(str, "\\par", "\\p@r{}") - str = string.gsub(str, "\\@@par", "\\p@r{}") -return str + str = string.gsub(str, "(\\arb%s?)(%[.-%])(%b{})", "\\@arb%2%3") + str = string.gsub(str, "(\\LR%s?)(%b{})", "\\@LR%2") + str = string.gsub(str, "(\\RL%s?)(%b{})", "\\@RL%2") + return str end local function unprotectarb(str) str = string.gsub(str, "(\\@arb)(%[.-%])(%b{})", "\\arb%2%3") - str = string.gsub(str, "(\\@begin)(%b[])(%b{})", "\\begin%3%2") - str = string.gsub(str, "(\\@begin)(%b{})", "\\begin%2") - str = string.gsub(str, "(\\@end)(%b{})", "\\end%2") - str = string.gsub(str, "\\p@r{}", "\\par") -return str + str = string.gsub(str, "(\\@LR)(%b{})", "\\LR%2") + str = string.gsub(str, "(\\@RL)(%b{})", "\\RL%2") + str = gsub(str, lpeg.Cs("\\al@brk") * bcbraces, function(tag, body) + body = string.sub(body, 2, -2) + return string.format("%s", body) + end) + return str end -brkcmds = {} - -function mkarbbreak(str) +-- the following is to be taken out of \arb{} +local outofarb = { + "LRfootnote", + "RLfootnote", + "edtext", + "pstart", + "pend" +} +-- commands the arguments of which must not be processed by arabluatex +-- inside \arb{}. 'albrkcmds' is what is set by default. 'brkcmds' +-- collects the commands set in the preamble with \MkArbBreak{} +local albrkcmds = { + "begin", + "end", + "par", + "LRmarginpar", + "arbmark", + "abjad" +} +local brkcmds = {} + +function mkarbbreak(str, opt) 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 + if opt == "dflt" then + 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 + elseif opt == "out" then + repeat + local nexti = string.find(str, "%,", fieldstart) + table.insert(outofarb, string.sub(str, fieldstart, nexti-1)) + fieldstart = nexti +1 + until fieldstart > string.len(str) + return outofarb + end 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) body = string.sub(body, 2, -2) - return string.format("}\\item[\\arb{%s}] \\arb{", body) + return string.format("\\al@brk{\\item[\\arb{%s}] }", body) end) str = string.gsub(str, "(\\item)(%s+)", "%1{}%2") - -- \edtext - str = string.gsub(str, "\\(edtext.-)(%b{})(%b{})", - function(tag, bodylem, bodyvar) - bodylem = string.sub(bodylem, 2, -2) - bodyvar = string.sub(bodyvar, 2, -2) - return string.format("\\LR{\\%s{%s}{%s}}", tag, bodylem, bodyvar) - end) - -- \RL - str = string.gsub(str, "\\(RL.-)(%b{})", - function(tag, body) - body = string.sub(body, 2, -2) - return string.format("}\\%s{%s}\\arb{", tag, body) - end) - -- \LR - str = string.gsub(str, "\\(LR.-)(%b{})", - function(tag, body) - 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) - body = string.sub(body, 2, -2) - return string.format("}\\%s{%s}\\arb{", tag, body) - end) - -- Marginpar - str = string.gsub(str, "\\(Marginpar.-)(%b{})", - function(tag, body) - body = string.sub(body, 2, -2) - return string.format("}\\%s{%s}\\arb{", tag, body) - end) - -- Abjad - str = string.gsub(str, "\\(abjad.-)(%b{})", - function(tag, body) - body = string.sub(body, 2, -2) - return string.format("}\\aemph{\\%s{%s}}\\arb{", tag, body) - end) - -- Arbmark - str = string.gsub(str, "\\(arbmark.-)(%b{})", - function(tag, body) - body = string.sub(body, 2, -2) - return string.format("}\\%s{%s}\\arb{", tag, body) + str = string.gsub(str, "\\(textcolor%s?)(%b{})(%b{})", + function(tag, bodycolor, bodytext) + bodycolor = string.sub(bodycolor, 2, -2) + bodytext = string.sub(bodytext, 2, -2) + return string.format("\\al@brk{\\%s{%s}{\\arb{%s}}}", tag, bodycolor, bodytext) end) + -- commands set by default in outofarb + for i = 1,#outofarb do + str = gsub(str, dblbkslash * lpeg.Cs(outofarb[i]) * cmdargs, "}%1%2%3\\arb{") + end + -- commands set by default in albrkcmds + for i = 1,#albrkcmds do + str = gsub(str, dblbkslash * lpeg.Cs(albrkcmds[i]) * cmdargs, "\\al@brk{%1%2%3}") + end + -- user commands (brkcmds) + if next(brkcmds) == nil then + -- nothing to do + else + for i = 1,#brkcmds do + str = gsub(str, dblbkslash * lpeg.Cs(brkcmds[i]) * cmdargs, "\\al@brk{%1%2%3}") + end + end return str end local function holdcmd(str) - str = string.gsub(str, "\\(arb)(%b{})", function(tag, body) + str = gsub(str, lpeg.Cs("\\arb") * bcbraces, function(tag, body) body = string.sub(body, 2, -2) - body = string.gsub(body, "\\(.-)(%b{})", function(btag, bbody) + body = gsub(body, cmd * spcenc^-1 * bsqbracketsii * spcenc^-1 * bcbraces, function(btag, bopt, bbody) bbody = string.sub(bbody, 2, -2) if string.find(btag, "@") then - return holdcmd(string.format("}\\%s{%s}\\arb{", btag, bbody)) + return holdcmd(string.format("}%s%s{%s}\\arb{", btag, bopt, bbody)) else - return holdcmd(string.format("}\\%s{\\arb{%s}}\\arb{", btag, bbody)) + return holdcmd(string.format("}%s%s{\\arb{%s}}\\arb{", btag, bopt, bbody)) end end) - return string.format("\\%s{%s}", tag, body) - end) - str = string.gsub(str, "\\arb{}", "") -return str + return string.format("%s{%s}", tag, body) + end) + str = string.gsub(str, "\\arb{}", "") + return str end local function arbnum(str) @@ -181,7 +193,7 @@ local function processarbnull(str, scheme) else str = string.gsub(str, "(\\arbnull.?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) - return string.format("o%so", body) + return string.format("O%sO", body) end) end return str @@ -201,6 +213,10 @@ local function takeoutcapetc(str) body = string.gsub(body, "(\\uc%s?)(%b{})", "\\Uc%2") return string.format("%s{%s}", tag, body) end) + str = string.gsub(str, "(\\arbup.?)(%b{})", function(tag, body) + body = string.sub(body, 2, -2) + return string.format("%s", body) + end) str = string.gsub(str, "(\\uc.?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) return string.format("%s", body) @@ -210,6 +226,39 @@ local function takeoutcapetc(str) return str end +local function checkwrnested(str) + for i = 1,#outofarb do + str = gsub(str, dblbkslash * lpeg.Cs(lpeg.P("LR") + lpeg.P("RL")) * cmdargs, + function(prefix, tag, body) + body = string.sub(body, 2, -2) + if string.find(body, "\\"..outofarb[i]) then + return atletter.."\\al@wrong@nesting{}"..atother + else + -- nothing to do, so proceed. + end + end) + end + return str +end + +local function takeoutarb(str) + str = checkwrnested(str) + for i = 1,#outofarb do + str = gsub(str, dblbkslash * lpeg.Cs(outofarb[i]) * cmdargs, + function(prefix, tag, body) + body = gsub(body, lpeg.P("\\arb"), "\\@rb") + return string.format("%s%s%s", prefix, tag, body) + end) + end + str = string.gsub(str, "(\\arb%s?)(%b{})", function(tag, body) + body = string.sub(body, 2, -2) + return string.format("%s", body) + end) + str = string.gsub(str, "\\@rb", "\\arb") + str = "\\arb{"..str.."}" + return str +end + local function voc(str, rules) str = string.gsub(str, "\\arb(%b{})", function(inside) inside = string.sub(inside, 2, -2) @@ -252,7 +301,7 @@ local function voc(str, rules) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -288,7 +337,7 @@ local function voceasy(str) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -341,7 +390,7 @@ local function fullvoc(str, rules) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -389,7 +438,7 @@ local function fullvoceasy(str, rules) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -425,7 +474,7 @@ local function novoc(str) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -461,7 +510,7 @@ local function novoceasy(str) inside = string.gsub(inside, null[i].a, null[i].b) end inside = indnum(inside) - return string.format("\\txarb{%s}", inside) + return string.format("\\arabicfont{}%s", inside) end) return str end @@ -591,7 +640,7 @@ return str end function processvoc(str, rules, scheme) - str = "\\arb{".. str.."}" + str = takeoutarb(str) str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) @@ -610,7 +659,7 @@ return str end function processfullvoc(str, rules, scheme) - str = "\\arb{".. str.."}" + str = takeoutarb(str) str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) @@ -631,7 +680,7 @@ return str end function processnovoc(str, rules, scheme) - str = "\\arb{".. str.."}" + str = takeoutarb(str) str = processarbnull(str, scheme) str = takeoutcapetc(str) str = protectarb(str) @@ -650,7 +699,7 @@ return str end function processtrans(str, mode, rules, scheme) - str = "\\arb{".. str.."}" + str = takeoutarb(str) str = processdiscretionary(str) str = processarbnull(str, scheme) str = takeoutabjad(str) @@ -672,7 +721,9 @@ return str end function newarbmark(abbr, rtlmk, ltrmk) + rtlmk = "\\arabicfont{}"..rtlmk table.insert(arbmarks, {a = abbr, b = rtlmk, c = ltrmk}) + table.sort(arbmarks, function(a ,b) return(#a.a > #b.a) end) return true end @@ -687,7 +738,7 @@ end function processarbmarks(str) if not isintable(arbmarks, str) then - str = "\\LR{<??>}" + str = "\\LR{<??>}"..atletter.."\\al@wrong@mark{}"..atother else if tex.textdir == "TLT" then for i = 1,#arbmarks do @@ -760,7 +811,8 @@ end -- Hosny's that dates back to 2010. Thanks to him. -- See https://github.com/khaledhosny/lualatex-arabic function abjadify(n) - local abjadnum = "" + local abjadnum = "" + n = tonumber(n) if n >= 1000 then for i=1,math.floor(n/1000) do abjadnum = abjadnum .. abjad[4][1] @@ -790,11 +842,15 @@ function abraces(str) return str end -function aemph(str) +function aemph(str, opt) if tex.textdir == "TRT" then - str = "$\\overline{\\text{"..str.."}}$" + str = "$\\overline{\\text{\\textdir TRT{}"..str.."}}$" elseif tex.textdir == "TLT" then - str = "$\\underline{\\text{"..str.."}}$" + if opt == "over" then + str = "$\\overline{\\text{"..str.."}}$" + else + str = "$\\underline{\\text{"..str.."}}$" + end end return str end diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty index de0afaba955..67485aaf4c3 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}% -[2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX] +[2018/06/24 v1.12 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -61,6 +61,8 @@ \def\al@mode@fullvoc{fullvoc} \def\al@mode@novoc{novoc} \def\al@mode@trans{trans} +\RequirePackage{xcolor} +\RequirePackage{luacolor} \RequirePackage{etoolbox} \RequirePackage{arabluatex-patch} \RequirePackage{fontspec} @@ -71,7 +73,6 @@ \RequirePackage{adjustbox} \newbool{al@rlmode} \luadirect{dofile(kpse.find_file("arabluatex.lua"))} -\luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))} \AtBeginDocument{\ifdefined\arabicfont\relax\else \PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^JI will try to load Amiri}% @@ -84,17 +85,22 @@ \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})}} +\NewDocumentCommand{\MkArbBreak}{s m}{% + \IfBooleanTF{#1} + {\luadirect{mkarbbreak(\luastringN{#2}, "out")}} + {\luadirect{mkarbbreak(\luastringN{#2}, "dflt")}} +} \AtBeginDocument{\ifdef{\aemph}% {\RenewDocumentCommand{\aemph}{s m}{% \IfBooleanTF{#1}{% - $\overline{\text{#2}}$} - {\luadirect{tex.sprint(aemph(\luastringN{#2}))}}}} + \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}} + {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}} {\NewDocumentCommand{\aemph}{s m}{% \IfBooleanTF{#1}{% - $\overline{\text{#2}}$} - {\luadirect{tex.sprint(aemph(\luastringN{#2}))}}}}} + \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}} + {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}}} +\NewDocumentCommand{\arbcolor}{o m}{% + \IfNoValueTF{#1}{#2}{\textcolor{#1}{#2}}} \def\al@input@scheme{arabtex} \NewDocumentCommand{\SetInputScheme}{m}{\def\al@input@scheme{#1}} \def\al@arb@rules{dflt} @@ -126,7 +132,7 @@ \NewDocumentCommand{\txarb}{+m}{\bgroup\textdir TRT\arabicfont#1\egroup} \NewDocumentCommand{\txtrans}{+m}{\bgroup\textdir - TLT\al@trans@font#1\egroup} + TLT\al@trans@font\al@trans@style#1\egroup} \NewDocumentEnvironment{txarab}{}{% \par% \booltrue{al@rlmode}% @@ -134,19 +140,25 @@ \NewDocumentCommand{\arb}{O{\al@mode} +m}% {\edef\@tempa{#1}% \ifx\@tempa\al@mode@voc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@fullvoc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processfullvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@novoc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processnovoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@trans% \bgroup\textdir TLT\al@trans@style% @@ -243,15 +255,22 @@ \AtBeginDocument{% \ifdefined\abjad% \RenewDocumentCommand{\abjad}{m}% - {\luadirect{tex.sprint(abjadify(#1))}}% + {\ifbool{al@rlmode}% + {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} \else% \NewDocumentCommand{\abjad}{m}% - {\luadirect{tex.sprint(abjadify(#1))}} -\fi} + {\ifbool{al@rlmode}% + {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + \fi} \NewDocumentCommand{\arbnull}{m}{\relax} \NewDocumentCommand{\abraces}{+m}{% \luadirect{tex.sprint(abraces(\luastringN{#1}))}} -\DeclareDocumentCommand{\LRmarginpar}{m}{\marginpar{\textdir TLT #1}} +\DeclareDocumentCommand{\LRmarginpar}{o m}{% + \IfNoValueTF{#1} + {\marginpar{\textdir TLT #2}} + {\marginpar[\textdir TLT #1]{\textdir TLT #2}}} \DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir TLT\textdir TLT\footnote{#1}\egroup} \DeclareDocumentCommand{\RLfootnote}{m}{\bgroup\pardir @@ -261,6 +280,15 @@ {\AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}% {\RequirePackage{scrextend} \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}} +\newcommand{\al@warning}[1]{\PackageWarning{arabluatex}{#1}} +\newcommand{\al@error}[2]{\PackageError{arabluatex}{#1}{#2}} +\newcommand{\al@wrong@nesting}{\al@error{% + (RL/LR)\string\footnote\space is not allowed\MessageBreak inside + \string\RL{} and \string\RL{} commands}{% + Get rid of the surrounding \string\RL{} or \string\LR{} command.}} +\newcommand{\al@wrong@mark}{\al@warning{% + Unknown Arabic mark in \string\arbmark{}. Replaced + with\MessageBreak <??>. Please check your code}} \endinput %% %% End of file `arabluatex.sty'. diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua index fd0916950f7..8d2615e308a 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -27,9 +27,9 @@ hamzafv = { {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="([%(%[%|%<%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="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, @@ -68,7 +68,9 @@ hamzafv = { {a="'a'([^uaiUAI])", b="آ%1"}, {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"}, + {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"}, {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, + {a="(A)(O%'[%S]-O)", b="آ"}, {a="(A)(')(uN?%p*)$", b="aآء%3"}, {a="(A)(')(uN?)(%p*%s)", b="aآء%3%4"}, {a="(A)(')(iN?%p*)$", b="aآء%3"}, @@ -78,10 +80,10 @@ hamzafv = { {a="(A)(')", b="aآء"}, -- historic madda -- initial (needs both ^ and %W patterns) -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -153,9 +155,9 @@ hamzafveasy = { -- differences marked below with 'easy' {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="([%(%[%|%<%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="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, @@ -194,8 +196,10 @@ hamzafveasy = { -- differences marked below with 'easy' {a="'a'([^uaiUAI])", b="آ%1"}, {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"}, + {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"}, {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, --easy (begin) + {a="(A)(O%'[%S]-O)", b="ا"}, {a="(A)(')(uN?%p*)$", b="aاء%3"}, {a="(A)(')(uN?)(%p*%s)", b="aاء%3%4"}, {a="(A)(')(iN?%p*)$", b="aاء%3"}, @@ -206,10 +210,10 @@ hamzafveasy = { -- differences marked below with 'easy' --easy (end) -- initial (needs both ^ and %W patterns) -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)([%(%[%|%<]?\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)([%(%[%|%<]?\"?[uai])([%S]-O)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -288,10 +292,10 @@ hamzafveasy = { -- differences marked below with 'easy' tanwinfv = { -- with assimilations (\SetArbDflt*) -- assimilations (begin) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"}, {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="ٱ"}, {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -302,8 +306,8 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, - {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -311,8 +315,8 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="ٱ"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -325,6 +329,13 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) -- quoted tanwīn (end) {a="%-?(uN)", b="ٌ"}, {a="(B)%-?(aN)", b="%1ً"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, + {a="%-?(aN)(O[%S]-YO)", b="ً"}, + {a="(O[%S]-TO)%-?(aN)", b="ً"}, + {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new + {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, + -- {a="%-?(aN)(_A)", b="ًى"}, {a="%-?(aN)(Y)", b="ًى"}, {a="(T)%-?(aN)", b="%1ً"}, @@ -335,10 +346,10 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) tanwinfveasy = { -- no assimilations (see below) -- assimilations (begin) ---easy {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +--easy {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"}, --easy {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="ٱ"}, {a="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -349,8 +360,8 @@ tanwinfveasy = { -- no assimilations (see below) {a="%-?(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"}, -- assimilations (begin) --easy {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, ---easy {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, ---easy {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, +--easy {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"}, +--easy {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, --easy {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, --easy {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, --easy {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -358,8 +369,8 @@ tanwinfveasy = { -- no assimilations (see below) --easy {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, --easy {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="ٱ"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="ٱ"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -372,6 +383,13 @@ tanwinfveasy = { -- no assimilations (see below) -- quoted tanwīn (end) {a="%-?(uN)", b="ٌ"}, {a="(B)%-?(aN)", b="%1ً"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, + {a="%-?(aN)(O[%S]-YO)", b="ً"}, + {a="(O[%S]-TO)%-?(aN)", b="ً"}, + {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new + {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, + -- {a="%-?(aN)(_A)", b="ًى"}, {a="%-?(aN)(Y)", b="ًى"}, {a="(T)%-?(aN)", b="%1ً"}, @@ -381,43 +399,45 @@ tanwinfveasy = { -- no assimilations (see below) } trigraphsfv = { -- trigraphs or more + -- ʾalif al-waṣl: put it back on with \arbnull + {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="ٱ"}, -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p -- law: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant ('c' and '^n' are additional characters) {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant ('c' and '^n' are additional characters) {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, - {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p -- li-/la + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1لْ"}, - {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2لْ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, - {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, - {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"}, + {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"}, + {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -462,43 +482,45 @@ trigraphsfv = { -- trigraphs or more -- file. trigraphsfveasy = { -- trigraphs or more (see 'easy' tag below for the diffs) + -- ʾalif al-waṣl: put it back on with \arbnull + {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="ٱ"}, -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1ٱلّ%2%3"}, --p -- law: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant ('c' and '^n' are additional characters) {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant ('c' and '^n' are additional characters) {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="ا%1ل%2ٱ"}, - {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(\"?[uai])", b="%1ا%2ل%3ٱ"}, --p -- li-/la + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\"?[uai])", b="ل%1ل%2ٱ"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1لْ"}, - {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2لْ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2لْ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, - {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, - {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"}, + {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"}, + {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -556,17 +578,17 @@ digraphsfvidgham = { {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"}, {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p - {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"}, {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p - {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"}, {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p -- hyphen + initial alif without hamza -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"}, -- initial alif without hamza (next 4 lines) - {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, + {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p @@ -683,17 +705,17 @@ digraphsfv = { {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"}, {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p - {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"}, {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p - {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"}, {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p -- hyphen + initial alif without hamza -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"}, -- initial alif without hamza (next 4 lines) - {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, + {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p @@ -810,17 +832,17 @@ digraphsfveasy = { -- see the differences under 'easy' marker below {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"}, {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awuا%2%3ٱ"}, --p - {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"}, {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ٱ"}, --p - {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"}, {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ٱ"}, --p -- hyphen + initial alif without hamza -- {a="([uai]%-)(\"?[uai])", b="%1ٱ"}, {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aأإؤئ])", b="%1ٱ%3%4"}, -- initial alif without hamza (next 4 lines) - {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ٱ"}, + {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ٱ"}, {a="([%_]?[uaiUAIY])(%s[%(%[%|%<]?)(\"?[uai])", b="%1%2ٱ"}, --p {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا%3"}, --p @@ -952,6 +974,7 @@ singlefv = { {a="\"$", b=""}, {a="\"(%W)", b="%1"}, {a="\"([^uaiUAI])", b="%1"}, + {a="o", b="ْ"}, -- hard-coded sukūn {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 09f490320a7..774b8b3d7c6 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua @@ -24,7 +24,7 @@ along with this program. If not, see tanwinnv = { -- assimilations (begin). These are good but may not apply here. --- {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +-- {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"}, -- {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, -- assimilations (end) {a="%-?uNU", b="و"}, @@ -32,8 +32,8 @@ tanwinnv = { {a="%-?iNU", b="و"}, -- assimilations (begin). These are good but may not apply here. -- {a="%-?(uN)(%s)([rlmnwy])", b="|%2%3%3"}, --- {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, --- {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, +-- {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"}, +-- {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, -- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ى%3%4%4"}, -- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ى%3%4%4"}, -- {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1%3%4%4"}, @@ -53,12 +53,21 @@ tanwinnv = { -- "quoted" tanwīn (end) {a="%-?(uN)", b=""}, {a="(B)%-?(aN)", b="%1"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b=""}, + {a="%-?(aN)(O[%S]-YO)", b=""}, + {a="(O[%S]-TO)%-?(aN)", b=""}, + {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b=""}, --new + {a="(O[%S]-[^TA]O)%-?(aN)", b=""}, + -- {a="%-?(aN)(_A)", b="ى"}, {a="%-?(aN)(Y)", b="ى"}, {a="(T)%-?(aN)", b="%1"}, {a="([اآ])(ء)%-?(aN)", b="%1%2"}, --new {a="([^TA])%-?(aN)", b="%1ا"}, {a="%-?(iNI?)", b=""}, + -- ʾalif al-waṣl: put it back on with \arbnull + {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="%4"}, -- 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="ٱ"}, @@ -148,6 +157,9 @@ shortvnv = { {a="\"u", b="ُ"}, {a="\"a", b="َ"}, {a="\"i", b="ِ"}, + {a="%-?%.u", b="ُ"}, + {a="%-?%.a", b="َ"}, + {a="%-?%.i", b="ِ"}, {a="u", b=""}, {a="a", b=""}, {a="i", b=""} diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index 61c989a3003..1651418f5ac 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", b=""}, + {a="O[%S]-O", b=""}, {a="[%^%_](.)", b="<??>%1"} } @@ -119,13 +120,13 @@ lcuc = { 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="([%(%[%|%<%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="([%(%[%|%<%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="([%(%[%|%<%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="([%(%[%|%<%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 @@ -158,10 +159,10 @@ hamzatrdmg = { {a="(A)(')", b="%1ʾ"}, -- historic madda -- initial (needs both ^ and %W patterns) -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p @@ -202,22 +203,22 @@ hamzatrdmg = { } tanwintrdmg = { - {a="%-?([uai]NU)(o)([ui])([%S]-o)", b="\\arbup{un%3}"}, + {a="%-?([uai]NU)(O)([ui])([%S]-O)", b="\\arbup{un%3}"}, {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"}, - {a="%-?(iNI)(o)([ui])([%S]-o)", b="i\\arbup{n%3}"}, + {a="%-?(iNI)(O)([ui])([%S]-O)", b="i\\arbup{n%3}"}, {a="%-?(iNI)(%s)([ui])", b="i\\arbup{n%3}%2'"}, - {a="(o[%S]-)([uai]N[UI])(o)(\"?[ui])", b="'"}, + {a="(O[%S]-)([uai]N[UI])(O)(\"?[ui])", b="'"}, {a="%-?uNU", b="\\arbup{un}"}, {a="%-?aNU", b="\\arbup{an}"}, {a="%-?iNU", b="\\arbup{in}"}, {a="%-?iNI", b="i\\arbup{n}"}, -- tanwīn preceding ʾalif conjunctionis - {a="%-?(uN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="\\arbup{uni}"}, - {a="%-?(aN)(_A)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ\\arbup{ni}"}, - {a="%-?(aN)(Y)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="ạ\\arbup{ni}"}, - {a="(T)%-?(aN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="t\\arbup{ani}"}, - {a="([^TA])%-?(aN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1\\arbup{ani}"}, - {a="%-?(iN)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="\\arbup{ini}"}, + {a="%-?(uN)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="\\arbup{uni}"}, + {a="%-?(aN)(_A)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="ạ\\arbup{ni}"}, + {a="%-?(aN)(Y)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="ạ\\arbup{ni}"}, + {a="(T)%-?(aN)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="t\\arbup{ani}"}, + {a="([^TA])%-?(aN)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1\\arbup{ani}"}, + {a="%-?(iN)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="\\arbup{ini}"}, {a="%-?(uN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{uni}%2%3"}, {a="%-?(aN)(_A)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, {a="%-?(aN)(Y)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="ạ\\arbup{ni}%3%4"}, @@ -225,12 +226,12 @@ tanwintrdmg = { {a="([^TA])%-?(aN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1\\arbup{ani}%3%4"}, {a="%-?(iN)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="\\arbup{ini}%2%3"}, -- tanwīn preceding 'lla_dI/'llatI - {a="%-?(uN)(o)('lla[%_]?[dt])([%S]-o)", b="\\arbup{uni}"}, - {a="%-?(aN)(_A)(o)('lla[%_]?[dt])([%S]-o)", b="ạ\\arbup{ni}"}, - {a="%-?(aN)(Y)(o)('lla[%_]?[dt])([%S]-o)", b="ạ\\arbup{ni}"}, - {a="(T)%-?(aN)(o)('lla[%_]?[dt])([%S]-o)", b="t\\arbup{ani}"}, - {a="([^TA])%-?(aN)(o)('lla[%_]?[dt])([%S]-o)", b="%1\\arbup{ani}"}, - {a="%-?(iN)(o)('lla[%_]?[dt])([%S]-o)", b="\\arbup{ini}"}, + {a="%-?(uN)(O)('lla[%_]?[dt])([%S]-O)", b="\\arbup{uni}"}, + {a="%-?(aN)(_A)(O)('lla[%_]?[dt])([%S]-O)", b="ạ\\arbup{ni}"}, + {a="%-?(aN)(Y)(O)('lla[%_]?[dt])([%S]-O)", b="ạ\\arbup{ni}"}, + {a="(T)%-?(aN)(O)('lla[%_]?[dt])([%S]-O)", b="t\\arbup{ani}"}, + {a="([^TA])%-?(aN)(O)('lla[%_]?[dt])([%S]-O)", b="%1\\arbup{ani}"}, + {a="%-?(iN)(O)('lla[%_]?[dt])([%S]-O)", b="\\arbup{ini}"}, {a="%-?(uN)(%s)('lla[%_]?[dt])", b="\\arbup{uni}%2%3"}, {a="%-?(aN)(_A)(%s)('lla[%_]?[dt])", b="ạ\\arbup{ni}%3%4"}, {a="%-?(aN)(Y)(%s)('lla[%_]?[dt])", b="ạ\\arbup{ni}%3%4"}, @@ -238,13 +239,13 @@ tanwintrdmg = { {a="([^TA])%-?(aN)(%s)('lla[%_]?[dt])", b="%1\\arbup{ani}%3%4"}, {a="%-?(iN)(%s)('lla[%_]?[dt])", b="\\arbup{ini}%2%3"}, -- tanwīn + alif without hamza and kasra (ibn) or dhamma (uhrub) - {a="%-?(uN)(o)([ui])([%S]-o)", b="\\arbup{un%3}"}, - {a="%-?(aN)(_A)(o)([ui])([%S]-o)", b="ạ\\arbup{n%4}"}, - {a="%-?(aN)(Y)(o)([ui])([%S]-o)", b="ạ\\arbup{n%4}"}, - {a="(T)%-?(aN)(o)([ui])([%S]-o)", b="t\\arbup{an%4}"}, - {a="([^TA])%-?(aN)(o)([ui])([%S]-o)", b="%1\\arbup{an%4}"}, - {a="%-?(iN)(o)([ui])([%S]-o)", b="\\arbup{in%3}"}, - {a="(o[%S]-)([uai]N)(o)(\"?[ui])", b="'"}, + {a="%-?(uN)(O)([ui])([%S]-O)", b="\\arbup{un%3}"}, + {a="%-?(aN)(_A)(O)([ui])([%S]-O)", b="ạ\\arbup{n%4}"}, + {a="%-?(aN)(Y)(O)([ui])([%S]-O)", b="ạ\\arbup{n%4}"}, + {a="(T)%-?(aN)(O)([ui])([%S]-O)", b="t\\arbup{an%4}"}, + {a="([^TA])%-?(aN)(O)([ui])([%S]-O)", b="%1\\arbup{an%4}"}, + {a="%-?(iN)(O)([ui])([%S]-O)", b="\\arbup{in%3}"}, + {a="(O[%S]-)([uai]N)(O)(\"?[ui])", b="'"}, {a="%-?(uN)(%s)([ui])", b="\\arbup{un%3}%2'"}, {a="%-?(aN)(_A)(%s)([ui])", b="ạ\\arbup{n%4}%3'"}, {a="%-?(aN)(Y)(%s)([ui])", b="ạ\\arbup{n%4}%3'"}, @@ -254,6 +255,12 @@ tanwintrdmg = { -- -- {a="uN", b="\\arbup{un}"}, (now included in the last line of this table) {a="%-?(\"?At)%-?([ui])N", b="\\arbup{%1%2n}"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="ạ\\arbup{n}"}, + {a="%-?(aN)(O[%S]-YO)", b="ạ\\arbup{n}"}, + {a="(O[%S]-TO)%-?(\"?aN)", b="\\arbup{an}"}, + {a="(O[%S]-[^TA]O)%-?(\"?aN)", b="\\arbup{an}"}, + -- {a="%-?(aN)(_A)", b="ạ\\arbup{n}"}, {a="%-?(aN)(Y)", b="ạ\\arbup{n}"}, {a="(T)%-?(\"?aN)", b="t\\arbup{an}"}, @@ -266,38 +273,38 @@ trigraphstrdmg = { -- trigraphs or more {a="^'ll(a)([%_]?[dt])", b="'ll%1%2"}, {a="([%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1'll%2%3"}, --p -- law: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām {a="^(a)l%-(l)", b="%1l-%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1%2l-%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1%2l-%3"}, --p -- al- + solar consonant ('c' and '^n' are additional characters) {a="^(a)l%-(%^n)", b="%1l-%2"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)l%-(%^n)", b="%1%2l-%3"}, --^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1%2l-%3"}, --^n is lunar --p {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="%1%2-%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1%2%3-%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1%2%3-%3"}, --p -- assim. art. + solar consonant ('c' and '^n' are additional characters) {a="^(a)(%^n)%-", b="%1l-"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)(%^n)%-", b="%1%2l-"}, --^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1%2l-"}, --^n is lunar --p {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="%1%2-"}, - {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsnc])%-", b="%1%2%3-"}, --p + {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1%2%3-"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\"?[uai])", b="%1l-%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(\"?[uai])", b="%1%2l-%3"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-([uai])", b="l%1-l-%2"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="%1l-"}, - {a="([%(%[%|%<%s%-o])(a)l%-", b="%1%2l-"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-", b="%1%2l-"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, - {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"}, + {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, -- art. with waṣla + lām @@ -340,7 +347,7 @@ trigraphstrdmg = { -- trigraphs or more idghamtrdmg = { -- assimilations {a="(n)(}?)(%s)([rlmnwy])", b="%4%2%3%4"}, - {a="(n)(}?)(o)([rlmnwy])([%S]-o)", b="%4%2"} + {a="(n)(}?)(O)([rlmnwy])([%S]-O)", b="%4%2"} } digraphstrdmg = { @@ -354,19 +361,20 @@ digraphstrdmg = { {a="(%W)(\"?[uai])", b="%1%2"}, -- initial alif without hamza -- this is not necessary, take out for now: -- {a="([%_]?[uaiUAIY])(%s)([uai])", b="%1%2'"}, -- initial alif without hamza - {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"}, {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3'"}, --p - {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"}, {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3'"}, --p - {a="(aW)(o)(\"?[uai])([%S]-o)", b="awu"}, - {a="(UA)(o)(\"?[uai])([%S]-o)", b="u"}, - {a="(%_A)(o)(\"?[uai])([%S]-o)", b="ạ"}, - {a="(Y)(o)(\"?[uai])([%S]-o)", b="ạ"}, - {a="(%_a)(o)(\"?[uai])([%S]-o)", b="a"}, - {a="(A)(o)(\"?[uai])([%S]-o)", b="a"}, - {a="([%_]?[Uu])(o)(\"?[uai])([%S]-o)", b="u"}, - {a="([%_]?[Ii])(o)(\"?[uai])([%S]-o)", b="i"}, - {a="(o[%S]-)([UAIYWuaiyw])(o)(\"?[uai])", b="'"}, + {a="(aW)(O)(\"?[uai])([%S]-O)", b="awu"}, + {a="(UA)(O)(\"?[uai])([%S]-O)", b="u"}, + {a="(%_A)(O)(\"?[uai])([%S]-O)", b="ạ"}, + {a="(Y)(O)(\"?[uai])([%S]-O)", b="ạ"}, + {a="(%_a)(O)(\"?[uai])([%S]-O)", b="a"}, + {a="(A)(O)(\"?[uai])([%S]-O)", b="a"}, + {a="([%_]?[Uu])(O)(\"?[uai])([%S]-O)", b="u"}, + {a="([%_]?[Ii])(O)(\"?[uai])([%S]-O)", b="i"}, + {a="(O[%S]-)([%'a]l%-)(O)(\"?[uai])", b="'"}, + {a="(O[%S]-)([UAIYWuaiyw])(O)(\"?[uai])", b="'"}, {a="(aW)(%s)([%(%[%|%<]?)(\"?[uai])", b="awu%2%3%4"}, --p {a="(UA)(%s)([%(%[%|%<]?)(\"?[uai])", b="u%2%3'"}, --p {a="([^%_][uai])(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2%3'"}, --p @@ -379,24 +387,24 @@ digraphstrdmg = { -- ʾ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="(%-)(\"?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"}, + {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—without forgetting 'lla_dI {a="(U)(A)", b="U"}, - {a="(aW)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="awu"}, - {a="(%_a)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="a"}, - {a="(%_A)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="ạ"}, - {a="(A)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="a"}, - {a="(Y)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="ạ"}, - {a="([%_]?[Uu])(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="u"}, - {a="([%_]?[Ii])(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-o)", b="i"}, + {a="(aW)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="awu"}, + {a="(%_a)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="a"}, + {a="(%_A)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="ạ"}, + {a="(A)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="a"}, + {a="(Y)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="ạ"}, + {a="([%_]?[Uu])(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="u"}, + {a="([%_]?[Ii])(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])([%S]-O)", b="i"}, --p (next 7 lines, just after %s) {a="(aW)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])", b="awu%2%3"}, {a="(%_a)(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])", b="a%2%3"}, @@ -492,6 +500,9 @@ longvtrdmg = { shortvtrdmg = { {a="([uai])([uai])([uai])", b="/%1,%2,%3/"}, {a="([uai])([uai])", b="/%1,%2/"}, + {a="%.u", b="u"}, + {a="%.a", b="a"}, + {a="%.i", b="i"}, {a="u", b="u"}, {a="a", b="a"}, {a="i", b="i"} @@ -581,6 +592,12 @@ tanwintrloc = { {a="%-?iNI", b="in"}, {a="%-?(\"?At)%-?([ui])N", b="%1%2n"}, {a="%-?([ui])N", b="%1n"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="an"}, + {a="%-?(aN)(O[%S]-YO)", b="an"}, + {a="(O[%S]-TO)%-?(\"?aN)", b="an"}, + {a="(O[%S]-[^TA]O)%-?(\"?aN)", b="an"}, + -- {a="%-?(aN)(_A)", b="an"}, {a="%-?(aN)(Y)", b="an"}, {a="(T)%-?(\"?aN)", b="tan"}, @@ -750,6 +767,9 @@ longvtrloc = { shortvtrloc = { {a="([uai])([uai])([uai])", b="/%1,%2,%3/"}, {a="([uai])([uai])", b="/%1,%2/"}, + {a="%.u", b="u"}, + {a="%.a", b="a"}, + {a="%.i", b="i"}, {a="u", b="u"}, {a="a", b="a"}, {a="i", b="i"} @@ -902,7 +922,7 @@ trigraphstrarabica = { -- trigraphs or more digraphstrarabica = { {a="([uai]%-)(\"?[uai])", b="%1"}, -- hyphen + initial alif without hamza {a="([UAIYuai])(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2%3"}, --p - {a="(o[%S]-)([UAIuai])(o)(\"?[uai])", b=""}, + {a="(O[%S]-)([UAIuai])(O)(\"?[uai])", b=""}, {a="@", b=""}, -- remove the tag before the former hamza -- discard the ʾiʿrāb hyphen (begin) {a="(%-)(\"?[UI]na)(%p*%s)", b="%2%3"}, diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 606a43ba85a..3f4cce960ff 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -23,10 +23,10 @@ along with this program. If not, see --]] arbmarks = { - {a="bismillah", b="^^^^fdfd", c="\\arb[trans]{bi-ismi \\uc{'l-l_ahi} 'l-ra.hm_ani 'l-ra.hImi}"}, - {a="salam", b="^^^^fdf5", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"}, - {a="slm", b="^^^^fdfa", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"}, - {a="jalla", b="^^^^fdfb", c="\\arb[trans]{^galla ^galAla-hu}"} + {a="bismillah", b="\\arabicfont ^^^^fdfd", c="\\arb[trans]{bi-ismi \\uc{'l-l_ahi} 'l-ra.hm_ani 'l-ra.hImi}"}, + {a="salam", b="\\arabicfont ^^^^fdf5", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"}, + {a="jalla", b="\\arabicfont ^^^^fdfb", c="\\arb[trans]{^galla ^galAla-hu}"}, + {a="slm", b="\\arabicfont ^^^^fdfa", c="\\arb[trans]{.sall_A\\arbnull{'l-l_ahu} \\uc{'l-l_ahu} `alay-hi wa-sallama}"} } abjad = { @@ -168,7 +168,7 @@ buckwalter = { {a="F", b="aN"}, {a="K", b="iN"}, {a="o", b="\""}, - {a="P", b="o"}, -- pass on to \arbnull + {a="P", b="O"}, -- pass on to \arbnull -- hard-coded connective alif {a="%[", b="ٱ"}, {a="L", b="ٱ"} -- BW safe @@ -179,9 +179,9 @@ hamza = { {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="([%(%[%|%<%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="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4%4"}, --p {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, @@ -211,7 +211,9 @@ hamza = { {a="'a'([^uaiUAI])", b="آ%1"}, {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"}, + {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"}, {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, + {a="(A)(O%'[%S]-O)", b="آ"}, {a="(A)(')(uN?%p*)$", b="aآء%3"}, {a="(A)(')(uN?)(%p*%s)", b="aآء%3%4"}, {a="(A)(')(iN?%p*)$", b="aآء%3"}, @@ -221,10 +223,10 @@ hamza = { {a="(A)(')", b="aآء"}, -- historic madda -- initial (needs both ^ and %W patterns) -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^('aw)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p @@ -296,9 +298,9 @@ hamzaeasy = { -- differences marked below with 'easy' {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="([%(%[%|%<%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="([%(%[%|%<%s%-O])(%.A)([uai]?)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%3ل%4"}, --p {a="%.A", b="ا"}, -- hard coded hamza {a="|\"'", b="ء"}, @@ -328,8 +330,10 @@ hamzaeasy = { -- differences marked below with 'easy' {a="'a'([^uaiUAI])", b="آ%1"}, {a="([^uiyUI])\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, {a="^\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="آ%1"}, + {a="\'a?A(O[%_%^%.]?[%`%'btjghxdrzsfqklmnywAY]-O)", b="آ"}, {a="(%W)\'a?A([%_%^%.]?[%`%'btjghxdrzsfqklmnywAY])", b="%1آ%2"}, --easy (begin) + {a="(A)(O%'[%S]-O)", b="ا"}, {a="(A)(')(uN?%p*)$", b="aاء%3"}, {a="(A)(')(uN?)(%p*%s)", b="aاء%3%4"}, {a="(A)(')(iN?%p*)$", b="aاء%3"}, @@ -340,10 +344,10 @@ hamzaeasy = { -- differences marked below with 'easy' --easy (end) -- initial (needs both ^ and %W patterns) -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^('aw)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)('aw)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^('aw)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)('[%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^('aw)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)('aw)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, @@ -422,17 +426,17 @@ hamzaeasy = { -- differences marked below with 'easy' tanwin = { -- assimilations (begin) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"}, {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="%4"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="%4"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, -- assimilations (begin) {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, - {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -440,8 +444,8 @@ tanwin = { {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="%5"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="%5"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="%5"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -454,6 +458,13 @@ tanwin = { -- quoted tanwīn (end) {a="%-?(uN)", b="ٌ"}, {a="(B)%-?(aN)", b="%1ً"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, + {a="%-?(aN)(O[%S]-YO)", b="ً"}, + {a="(O[%S]-TO)%-?(aN)", b="ً"}, + {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new + {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, + -- {a="%-?(aN)(_A)", b="ًى"}, {a="%-?(aN)(Y)", b="ًى"}, {a="(T)%-?(aN)", b="%1ً"}, @@ -464,17 +475,17 @@ tanwin = { tanwineasy = { -- 'easy' requires some lines to be taken out: -- assimilations (begin) --- {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([rlmnwy])", b="%4%4"}, +-- {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([rlmnwy])", b="%4%4"}, -- {a="(%-?[uai]NU)(%s)([rlmnwy])", b="%1%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?[uai]N[UI]?)(o)([uai])", b="%4"}, + {a="(O[%S]-)(%-?[uai]N[UI]?)(O)([uai])", b="%4"}, {a="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, -- assimilations (begin) -- {a="%-?(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"}, --- {a="(o[%S]-)(%-?aN)(_A)(o)([rlmnwy])", b="%5%5"}, --- {a="(o[%S]-)(%-?aN)(Y)(o)([rlmnwy])", b="%5%5"}, +-- {a="(O[%S]-)(%-?aN)(_A)(O)([rlmnwy])", b="%5%5"}, +-- {a="(O[%S]-)(%-?aN)(Y)(O)([rlmnwy])", b="%5%5"}, -- {a="%-?(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"}, -- {a="%-?(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"}, -- {a="(T)%-?(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"}, @@ -482,8 +493,8 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: -- {a="([^TA])%-?(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"}, -- {a="%-?(iNI?)(%s)([rlmnwy])", b="ٍ%2%3%3"}, -- assimilations (end) - {a="(o[%S]-)(%-?aN)(_A)(o)([uai])", b="%5"}, - {a="(o[%S]-)(%-?aN)(Y)(o)([uai])", b="%5"}, + {a="(O[%S]-)(%-?aN)(_A)(O)([uai])", b="%5"}, + {a="(O[%S]-)(%-?aN)(Y)(O)([uai])", b="%5"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -496,6 +507,13 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: -- quoted tanwīn (end) {a="%-?(uN)", b="ٌ"}, {a="(B)%-?(aN)", b="%1ً"}, + -- needed by \arbcolor: + {a="%-?(aN)(O[%S]-%_AO)", b="ً"}, + {a="%-?(aN)(O[%S]-YO)", b="ً"}, + {a="(O[%S]-TO)%-?(aN)", b="ً"}, + {a="(O[%S]-)([اآ])(ء)(O)%-?(aN)", b="ً"}, --new + {a="(O[%S]-[^TA]O)%-?(aN)", b="ًا"}, + -- {a="%-?(aN)(_A)", b="ًى"}, {a="%-?(aN)(Y)", b="ًى"}, {a="(T)%-?(aN)", b="%1ً"}, @@ -505,46 +523,49 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: } trigraphs = { -- trigraphs or more + -- ʾalif al-waṣl: put it back on with \arbnull + {a="(O[%S]-)([%'a]l%-)(O)(\"[uai])", b="ٱ"}, + {a="(O[%S]-)([%'a]l%-)(O)([uai])", b="ا"}, -- 'llatI / 'llad_I {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"}, {a="([%(%[%|%<%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"}, --p -- law: the diphthong is to be resolved into 'awi' (next 8 lines) - {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām {a="^(a)l%-(l)", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3%3"}, --p -- al- + solar consonant ('c' and '^n' are additional characters) {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)l%-(%^n)", b="%1ا%2ل%3"},-- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"},-- ^n is lunar --p {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3%3"}, --p -- assim. art. + solar consonant ('c' and '^n' are additional characters) {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)(%^n)%-", b="%1ا%2ل"},-- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"},-- ^n is lunar --p {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل%3"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, - {a="([%(%[%|%<%s%-o])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%(%[%|%<%s%-o])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, - {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, - {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"}, + {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"}, + {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -589,53 +610,56 @@ trigraphs = { -- trigraphs or more idgham = { -- assimilations {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}, - {a="(n)(o)([rlmnwy])([%S]-o)", b="%3"} + {a="(n)(O)([rlmnwy])([%S]-O)", b="%3"} } trigraphseasy = { -- differences marked below with 'easy' + -- ʾalif al-waṣl: put it back on with \arbnull + {a="(O[%S]-)([%'a]l%-)(O)(\"[uai])", b="ٱ"}, + {a="(O[%S]-)([%'a]l%-)(O)([uai])", b="ا"}, -- Allah (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"}, --p -- law: the diphthong is to be resloved into 'awi' (next 8 lines) - {a="^(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1%2i"}, - {a="^(law)(o)(\"?[uai])([%S]-o)", b="%1i"}, - {a="(%W)(law)(o)(\"?[uai])([%S]-o)", b="%1%2i"}, + {a="^(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"}, + {a="^(law)(O)(\"?[uai])([%S]-O)", b="%1i"}, + {a="(%W)(law)(O)(\"?[uai])([%S]-O)", b="%1%2i"}, {a="^(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, {a="(%W)(law)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"}, {a="^(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p {a="(%W)(law)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p -- al- + lām (easy) {a="^(a)l%-(l)", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-(l)", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(l)", b="%1ا%2ل%3"}, --p -- al- + solar consonant (easy) ('c' and '^n' are additional characters) {a="^(a)l%-(%^n)", b="ا%1ل%2"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)l%-(%^n)", b="%1ا%2ل%3"}, -- ^n is lunar --p {a="^(a)l%-([%_%^%.]?[tdrzsnc])", b="ا%1ل%2"}, - {a="([%(%[%|%<%s%-o])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([%_%^%.]?[tdrzsnc])", b="%1ا%2ل%3"}, --p -- assim. art. + solar consonant (easy) ('c' and '^n' are -- additional characters) {a="^(a)(%^n)%-", b="ا%1ل"}, -- ^n is lunar - {a="([%(%[%|%<%s%-o])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p + {a="([%(%[%|%<%s%-O])(a)(%^n)%-", b="%1ا%2ل"}, -- ^n is lunar --p {a="^(a)([%_%^%.]?[tdrzsnc])%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-o])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-O])(a)([%_%^%.]?[tdrzsnc])%-", b="%1ا%2ل"}, --p -- al- + initial unstable hamza {a="^(a)l%-(\")([uai])", b="ا%1ل%3ٱ"}, - {a="([%(%[%|%<%s%-o])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-(\")([uai])", b="%1ا%2ل%4ٱ"}, --p {a="^(a)l%-([uai])", b="ا%1ل%2ا"}, - {a="([%(%[%|%<%s%-o])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-([uai])", b="%1ا%2ل%3ا"}, --p -- li-/la- + art. + initial unstable hamza is a special orthography {a="l([ai])%-l%-(\")([uai])", b="ل%1ل%3ٱ"}, {a="l([ai])%-l%-([uai])", b="ل%1ل%2ا"}, -- al- + lunar consonant (i.e. what remains) {a="^(a)l%-", b="ا%1ل"}, - {a="([%(%[%|%<%s%-o])(a)l%-", b="%1ا%2ل"}, --p + {a="([%(%[%|%<%s%-O])(a)l%-", b="%1ا%2ل"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="awuا"}, - {a="(aw)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1u"}, - {a="(ay)(o)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-o)", b="%1i"}, + {a="(aW)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="awuا"}, + {a="(aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1u"}, + {a="(ay)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"}, {a="(aW)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="awuا%2%3"}, {a="(aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1u%2%3"}, {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"}, @@ -694,18 +718,18 @@ digraphs = { {a="^\"[uai]", b="ٱ"}, {a="([%(%[%|%<%s%-])\"[uai]", b="%1ٱ"}, --p -- diphthongs to be resolved before ʾalif conjunctionis - {a="(aW)(o)(\"?[uai])([%S]-o)", b="awuا"}, + {a="(aW)(O)(\"?[uai])([%S]-O)", b="awuا"}, {a="(aW)(%s)([%(%[%|%<]?)([uai])", b="awuا%2%3%4"}, --p - {a="(aw)(o)(\"?[uai])([%S]-o)", b="%1u"}, + {a="(aw)(O)(\"?[uai])([%S]-O)", b="%1u"}, {a="(aw)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1u%2%3ا"}, --p - {a="(ay)(o)(\"?[uai])([%S]-o)", b="%1i"}, + {a="(ay)(O)(\"?[uai])([%S]-O)", b="%1i"}, {a="(ay)(%s)([%(%[%|%<]?)(\"?[uai])", b="%1i%2%3ا"}, --p -- hyphen + initial alif without hamza: {a="([uai]%-)(\"?[uai])([%^%_%.%`]?)([%aإأؤئ])", b="%1ا%3%4"}, -- initial alif without hamza {a="^([%(%[%|%<]?)(\"?[uai])", b="%1ا%2"}, --p -- initial alif without hamza - {a="(o[%S]-)([uaiUAIY])(o)(\"?[uai])", b="ا"}, + {a="(O[%S]-)([uaiUAIY])(O)(\"?[uai])", b="ا"}, {a="(%s)([%(%[%|%<]?)(\"?[uai])", b="%1%2ا"}, --p {a="%-%-", b="ـ"}, {a="ؤؤ", b="ؤّ"}, @@ -815,6 +839,7 @@ single = { {a="\"$", b="ْ"}, {a="\"(%W)", b="ْ%1"}, {a="\"([^uaiUAI])", b="ْ%1"}, + {a="o", b="ْ"}, -- hard-coded sukūn {a="([^0-9])%-([^0-9])", b="%1%2"}, {a="B", b="ـ"} } @@ -836,6 +861,9 @@ shortv = { {a="\"u", b=""}, {a="\"a", b=""}, {a="\"i", b=""}, + {a="%-?%.u", b="ُ"}, + {a="%-?%.a", b="َ"}, + {a="%-?%.i", b="ِ"}, {a="u", b="ُ"}, {a="a", b="َ"}, {a="i", b="ِ"} @@ -868,7 +896,8 @@ punctuation = { null = { {a="%|", b=""}, + {a="^%-", b=""}, {a="([^0-9])(%-)", b="%1"}, - {a="o[%S]-o", b=""}, + {a="O[%S]-O", b=""}, {a="[%^%_](.)", b=">??<%1"} } |