From bb0d98952d1aee8d64d8f04a6352b4b761955ed4 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 3 Mar 2020 23:05:43 +0000 Subject: arabluatex (1mar20) git-svn-id: svn://tug.org/texlive/trunk@54052 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/lualatex/arabluatex/arabluatex-patch.sty | 2 +- .../tex/lualatex/arabluatex/arabluatex.lua | 43 +++++++++---- .../tex/lualatex/arabluatex/arabluatex.sty | 70 +++++++++++++++++----- .../tex/lualatex/arabluatex/arabluatex_fullvoc.lua | 59 +++++++++++++++--- .../tex/lualatex/arabluatex/arabluatex_novoc.lua | 2 +- .../tex/lualatex/arabluatex/arabluatex_trans.lua | 2 +- .../tex/lualatex/arabluatex/arabluatex_voc.lua | 25 ++++---- 7 files changed, 155 insertions(+), 48 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty index 46e14946260..107cfd9f007 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty @@ -11,7 +11,7 @@ %% This file is part of the `arabluatex' package %% %% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -%% Copyright (C) 2016--2019 Robert Alessi +%% Copyright (C) 2016--2020 Robert Alessi %% %% Please send error reports and suggestions for improvements to Robert %% Alessi diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua index df031569c01..868e11692d3 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2019 Robert Alessi +Copyright (C) 2016--2020 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi @@ -56,6 +56,7 @@ local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash) local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) local arbargs = lpeg.Cs(spce^-1 * bsqbrackets^-1 * bcbraces) local baytargs = lpeg.Cs(spce * bcbraces * bsqbrackets^-1 * bcbraces) +local arind = lpeg.Cs(dblbkslash * lpeg.P("arind") * spce^-1 * bsqbracketsii) local function protectarb(str) str = string.gsub(str, "(\\arb%s?)(%[.-%])(%b{})", "\\al@brk{\\arb%2%3}") @@ -268,7 +269,7 @@ local function takeoutarb(str) end str = string.gsub(str, "(\\arb%s?)(%b{})", function(tag, body) body = string.sub(body, 2, -2) - return string.format("%s", body) + return string.format("\\al@brk{%s{%s}}", tag, body) end) str = string.gsub(str, "\\@rb", "\\arb") str = "\\arb{"..str.."}" @@ -655,6 +656,20 @@ local function processbuckw(str) return str end +local function processarind(str, mode) + str = gsub(str, arind * bcbraces, function(tag, arg) + arg = string.sub(arg, 2, -2) + if mode == "trans" then + return string.format("%s{\\txtrans{%s}}", tag, arg) + else + arg = novoc(arg) + arg = string.gsub(arg, "\\arabicfont%s?{}", "") + return string.format("%s{\\txarb{%s}}", tag, arg) + end + end) + return str +end + -- The following functions produce a copy of the original .tex source -- file in which all arabtex strings are replaced with Unicode -- equivalents @@ -743,15 +758,9 @@ local function processarbtoutf(str) return string.format("%s{\\arb[trans]{\\uc{%s}}}", tag, body) end end) - str = string.gsub(str, "(\\begin%s?{arab})(%b[])", function(tag, body) - if string.find(body, "trans") then - return string.format("\\par\\bgroup\\setLR\\arb%s{", body) - else - return string.format("\\par\\bgroup\\setRL\\arb%s{", body) - end - end) - str = string.gsub(str, "(\\begin%s?{arab})", "\\par\\bgroup\\arbpardir\\arb{") - str = string.gsub(str, "\\end%s?{arab}", "}\\egroup\\par") + str = string.gsub(str, "(\\begin%s?{arab})(%b[])", "\\bgroup\\arb%2{") + str = string.gsub(str, "(\\begin%s?{arab})", "\\bgroup\\arb{") + str = string.gsub(str, "\\end%s?{arab}", "}\\egroup") -- This does not work, while the following two do. Look into this later. -- str = gsub(str, lpeg.Cs("\\arb") * spcenc * bsqbrackets^-1 * bcbraces, function(tag, opt, body) -- body = string.sub(body, 2, -2) @@ -836,6 +845,14 @@ function arabluatex.closestream() t = string.gsub(t, "(\\@al@ob)", "{") t = string.gsub(t, "(\\@al@cb@sp)", "} ") t = string.gsub(t, "(\\@al@cb)(%s?)", "}") + t = string.gsub(t, "(\\bgroup%s?)(\\txarb%s?)(%b{})(\\egroup%s?)", function(tagio, tag, body, tagic) + body = string.sub(body, 2, -2) + return string.format("\\begin{txarab}%s\\end{txarab}", body) + end) + t = string.gsub(t, "(\\bgroup%s?)(\\txtrans%s?)(%b{})(\\egroup%s?)", function(tagio, tag, body, tagic) + body = string.sub(body, 2, -2) + return string.format("\\begin{txarabtr}%s\\end{txarabtr}", body) + end) t = gsub(t, lpeg.Cs("\\begin") * spcenc^-1 * bcbraces * cmdargs, "\n%1%2%3\n") t = string.gsub(t, "(\\\\)(%s?)", "%1\n") @@ -892,6 +909,7 @@ function arabluatex.processvoc(str, rules, scheme) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) + str = processarind(str) if scheme == "buckwalter" then str = processbuckw(str) else end @@ -920,6 +938,7 @@ function arabluatex.processfullvoc(str, rules, scheme) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) + str = processarind(str) if scheme == "buckwalter" then str = processbuckw(str) else end @@ -950,6 +969,7 @@ function arabluatex.processnovoc(str, rules, scheme) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) + str = processarind(str) if scheme == "buckwalter" then str = processbuckw(str) else end @@ -979,6 +999,7 @@ function arabluatex.processtrans(str, mode, rules, scheme) str = protectarb(str) str = breakcmd(str) str = holdcmd(str) + str = processarind(str, "trans") if scheme == "buckwalter" then str = processbuckw(str) end diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty index f5d9d08fbe6..a7c85007d86 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty @@ -11,7 +11,7 @@ %% This file is part of the `arabluatex' package %% %% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -%% Copyright (C) 2016--2019 Robert Alessi +%% Copyright (C) 2016--2020 Robert Alessi %% %% Please send error reports and suggestions for improvements to Robert %% Alessi @@ -41,15 +41,9 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{arabluatex} - [2019/03/24 v1.17 An ArabTeX-like interface for LuaLaTeX] -\RequirePackage{ifluatex} -\ifluatex\else - \PackageError{arabluatex}{lualatex needed}{% - Package `arabluatex' needs LuaTeX.\MessageBreak - So you should use `lualatex' to process your document.\MessageBreak - See documentation of `arabluatex' for further information.}% - \expandafter\expandafter\expandafter\csname endinput\endcsname -\fi + [2020/02/29 v1.18 An ArabTeX-like interface for LuaLaTeX] +\RequirePackage{iftex} +\RequireLuaTeX \RequirePackage{xkeyval} \DeclareOptionX{voc}{\def\al@mode{voc}} \DeclareOptionX{fullvoc}{\def\al@mode{fullvoc}} @@ -81,9 +75,10 @@ \providebool{al@rlmode} \luadirect{dofile(kpse.find_file("arabluatex.lua"))} \AtBeginDocument{\ifdefined\arabicfont\relax\else -\PackageWarning{arabluatex}{\string\arabicfont\ is not defined.^^J - I will try to load Amiri}% -\newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}% + \PackageInfo{arabluatex}{% + \string\arabicfont\ is not defined.\MessageBreak + arabluatex will try to load Amiri}% + \newfontfamily\arabicfont{Amiri}[Script=Arabic]\fi}% \AtBeginDocument{\def\setRL{\booltrue{al@rlmode}\pardir TRT% \textdir TRT}} \AtBeginDocument{\def\setLR{\boolfalse{al@rlmode}\pardir TLT% @@ -149,6 +144,7 @@ \bgroup\SetTranslitStyle{\relax}% \IfBooleanTF{#1}{\txtrans{#2}}{\arb[trans]{\uc{#2}}}\egroup} \NewDocumentCommand{\txarb}{+m}{% + \ifvmode\leavevmode\fi% \bgroup\textdir TRT\arabicfont#1\egroup} \NewDocumentCommand{\txtrans}{+m}{% \bgroup\textdir TLT\al@trans@font\al@trans@style#1\egroup} @@ -156,19 +152,26 @@ \par% \booltrue{al@rlmode}% \pardir TRT\textdir TRT\arabicfont}{\par} +\NewDocumentEnvironment{txarabtr}{}{% + \par% + \pardir TLT\textdir TLT% + \al@trans@font\al@trans@style}{\par} \NewDocumentCommand{\arb}{O{\al@mode} +m}% {\edef\@tempa{#1}% \ifx\@tempa\al@mode@voc% + \ifvmode\leavevmode\fi% \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont% \luadirect{tex.sprint(arabluatex.processvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@fullvoc% + \ifvmode\leavevmode\fi% \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont% \luadirect{tex.sprint(arabluatex.processfullvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@novoc% + \ifvmode\leavevmode\fi% \bgroup\booltrue{al@rlmode}\textdir TRT\arabicfont% \luadirect{tex.sprint(arabluatex.processnovoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% @@ -190,7 +193,7 @@ \NewDocumentCommand{\newarbmark}{m m m}{% \luadirect{arabluatex.newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}} -\NewDocumentEnvironment{arab}{O{\al@mode} +b}% +\NewDocumentEnvironment{arab}{!O{\al@mode} +b}% {\par\edef\@tempa{#1}% \ifx\@tempa\al@mode@voc% \booltrue{al@rlmode}% @@ -232,7 +235,7 @@ trans}{\def\al@mode{#1}} \presetkeys[al]{verse}{metre={}, utf=false, delim=false}{} -\NewDocumentEnvironment{arabverse}{O{}}% +\NewDocumentEnvironment{arabverse}{!O{}}% {\bgroup\setkeys[al]{verse}[width, gutter, color, utf, delim, metre]{#1}% \if@pkg@export\ifal@verse@export% @@ -297,6 +300,43 @@ \adjustbox{width=\al@bayt@width, height=\Height}{\arb@utf{#4}}% \ifdefined\spewnotes\spewnotes\else\fi% } +\NewDocumentCommand{\SetDefaultIndex}{m}{ + \edef\@tempa{#1} + \ifx\@tempa\empty + \def\al@default@index{\jobname} + \else + \def\al@default@index{#1} + \fi +} +\def\al@index@mode{\al@mode} +\NewDocumentCommand{\SetIndexMode}{m}{ + \def\al@index@mode{#1} +} +\define@cmdkeys[al]{index}[alind@]{index,root,form} +\NewDocumentCommand{\arind}{o m}{% + \IfNoValueTF{#1}{% + \ifdefined\al@default@index% + \csname index\endcsname[\al@default@index]{#2}% + \else% + \csname index\endcsname{#2}% + \fi% + }{% + \bgroup + \setkeys[al]{index}{#1}% + \def\al@one{% + \ifdefined\alind@root!\LR{\alind@root}\else!\LR{1}\fi}% + \def\al@two{% + \ifdefined\alind@form @\arb[\al@index@mode]{\alind@form}\else\fi}% + \ifdefined\alind@index% + \csname index\endcsname[\alind@index]{#2\al@one\al@two}% + \else% + \ifdefined\al@default@index% + \csname index\endcsname[\al@default@index]{#2\al@one\al@two}% + \else% + \csname index\endcsname{#2\al@one\al@two}% + \fi% + \fi% + \egroup}} \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 f524c3b6d96..a53adce4d27 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2019 Robert Alessi +Copyright (C) 2016--2020 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi @@ -38,6 +38,7 @@ hamzafv = { {a="w\"'", b="ؤ"}, {a="i\"'", b="إ"}, {a="y\"'", b="ئ"}, + -- moved below (end of 'final' section) {a="ؤ([^uaiUAI])", b="ؤْ%1"}, {a="ؤ(%p*)$", b="ؤْ%1"}, {a="ؤ(%p*%s)", b="ؤْ%1"}, @@ -47,6 +48,9 @@ hamzafv = { {a="ئ([^uaiUAI])", b="ئْ%1"}, {a="ئ(%p*)$", b="ئْ%1"}, {a="ئ(%p*%s)", b="ئْ%1"}, + {a="ء([^uaiUAI])", b="ءْ%1"}, + {a="ء(%p*)$", b="ءْ%1"}, + {a="ء(%p*%s)", b="ءْ%1"}, -- hamza takes tašdīd too {a="''([Uu])", b="ؤؤ%1"}, {a="''([Aa])", b="أأ%1"}, @@ -129,22 +133,40 @@ hamzafv = { {a="(i)(')([uai]N?)(%p*%s)", b="%1ئ%3%4"}, {a="(i)(')(%p*)$", b="%1ئْ%3"}, {a="(i)(')(%p*%s)", b="%1ئْ%3"}, --- +-- the following was wrong for it broke the taḫfīfu 'l-hamzati +-- (look into this later): +-- moved here from above: + -- {a="ؤ([^uaiUAI])", b="ؤْ%1"}, + -- {a="ؤ(%p*)$", b="ؤْ%1"}, + -- {a="ؤ(%p*%s)", b="ؤْ%1"}, + -- {a="أ([^uaiUAI])", b="أْ%1"}, + -- {a="أ(%p*)$", b="أْ%1"}, + -- {a="أ(%p*%s)", b="أْ%1"}, + -- {a="ئ([^uaiUAI])", b="ئْ%1"}, + -- {a="ئ(%p*)$", b="ئْ%1"}, + -- {a="ئ(%p*%s)", b="ئْ%1"}, + -- {a="ء([^uaiUAI])", b="ءْ%1"}, + -- {a="ء(%p*)$", b="ءْ%1"}, + -- {a="ء(%p*%s)", b="ءْ%1"}, -- middle {a="([UIwy])(')", b="%1ء"}, --new -- {a="([Iy])(')", b="%1ئ"}, --included in the above line - {a="([^uai])(')([uU])", b="%1ؤ%3"}, - {a="([^uai])(')(%_?[aAY])", b="%1أ%3"}, - {a="([^uai])(')([iI])", b="%1ئ%3"}, - {a="(u)(')([uU])", b="%1ؤ%3"}, + -- hamza is alone after letters of prolongation or sukūn + -- {a="([^uai])(')([uU])", b="%1ؤ%3"}, + -- {a="([^uai])(')(%_?[aAY])", b="%1أ%3"}, + -- {a="([^uai])(')([iI])", b="%1ئ%3"}, + {a="([^uai])(')(%_?[uaiUAYI])", b="%1ء%3"}, + {a="(u)(')([UI])", b="%1ء%3"}, + {a="(u)(')([u])", b="%1ؤ%3"}, {a="(u)(')(%_?[aAY])", b="%1ؤ%3"}, - {a="(u)(')([iI])", b="%1ئ%3"}, + {a="(u)(')([i])", b="%1ئ%3"}, {a="(a)(')(%_?[aAY])", b="%1أ%3"}, {a="(a)(')([uU])", b="%1ؤ%3"}, {a="(a)(')([iI])", b="%1ئ%3"}, + {a="(i)(')([UI])", b="%1ء%3"}, {a="(i)(')(%_?[aAY])", b="%1ئ%3"}, - {a="(i)(')([uU])", b="%1ئ%3"}, - {a="(i)(')([iI])", b="%1ئ%3"}, + {a="(i)(')([u])", b="%1ئ%3"}, + {a="(i)(')([i])", b="%1ئ%3"}, {a="(a)(')([^uaiUAI])", b="%1أْ%3"}, {a="(u)(')([^uaiUAI])", b="%1ؤْ%3"}, {a="(i)(')([^uaiUAI])", b="%1ئْ%3"} @@ -166,6 +188,7 @@ hamzafveasy = { -- differences marked below with 'easy' {a="w\"'", b="ؤ"}, {a="i\"'", b="إ"}, {a="y\"'", b="ئ"}, + -- moved below (end of 'final' section) {a="ؤ([^uaiUAI])", b="ؤْ%1"}, {a="ؤ(%p*)$", b="ؤْ%1"}, {a="ؤ(%p*%s)", b="ؤْ%1"}, @@ -175,6 +198,9 @@ hamzafveasy = { -- differences marked below with 'easy' {a="ئ([^uaiUAI])", b="ئْ%1"}, {a="ئ(%p*)$", b="ئْ%1"}, {a="ئ(%p*%s)", b="ئْ%1"}, + {a="ء([^uaiUAI])", b="ءْ%1"}, + {a="ء(%p*)$", b="ءْ%1"}, + {a="ء(%p*%s)", b="ءْ%1"}, -- hamza takes tašdīd too {a="''([Uu])", b="ؤؤ%1"}, {a="''([Aa])", b="أأ%1"}, @@ -269,6 +295,21 @@ hamzafveasy = { -- differences marked below with 'easy' {a="(i)(')([uai]N?)(%p*%s)", b="%1ئ%3%4"}, {a="(i)(')(%p*)$", b="%1ئْ%3"}, {a="(i)(')(%p*%s)", b="%1ئْ%3"}, +-- the following was wrong for it broke the taḫfīfu 'l-hamzati +-- (look into this later): +-- moved here from above: + -- {a="ؤ([^uaiUAI])", b="ؤْ%1"}, + -- {a="ؤ(%p*)$", b="ؤْ%1"}, + -- {a="ؤ(%p*%s)", b="ؤْ%1"}, + -- {a="أ([^uaiUAI])", b="أْ%1"}, + -- {a="أ(%p*)$", b="أْ%1"}, + -- {a="أ(%p*%s)", b="أْ%1"}, + -- {a="ئ([^uaiUAI])", b="ئْ%1"}, + -- {a="ئ(%p*)$", b="ئْ%1"}, + -- {a="ئ(%p*%s)", b="ئْ%1"}, + -- {a="ء([^uaiUAI])", b="ءْ%1"}, + -- {a="ء(%p*)$", b="ءْ%1"}, + -- {a="ء(%p*%s)", b="ءْ%1"}, -- -- middle {a="([Uw])(')", b="%1ء"}, --new diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua index 51418617b7d..f3410e74d95 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2019 Robert Alessi +Copyright (C) 2016--2020 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua index 63a19563450..455b57ba235 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2019 Robert Alessi +Copyright (C) 2016--2020 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua index 54c324c428b..4ec0fe3ae44 100644 --- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua +++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua @@ -2,7 +2,7 @@ This file is part of the `arabluatex' package ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -Copyright (C) 2016--2019 Robert Alessi +Copyright (C) 2016--2020 Robert Alessi Please send error reports and suggestions for improvements to Robert Alessi @@ -202,7 +202,7 @@ hamza = { -- taḫfīfu 'l-hamza {a="'u'([^uaiUAI])", b="أU%1"}, {a="'i'([^uaiUAI])", b="إI%1"}, - {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"}, + {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أ%2"}, {a="^u'([^uaiUAI])", b="اU%1"}, {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"}, {a="^i'([^uaiUAI])", b="اI%1"}, @@ -276,18 +276,22 @@ hamza = { -- middle {a="([UIwy])(')", b="%1ء"}, --new -- {a="([Iy])(')", b="%1ئ"}, -- included in the above line - {a="([^uai])(')([uU])", b="%1ؤ%3"}, - {a="([^uai])(')(%_?[aAY])", b="%1أ%3"}, - {a="([^uai])(')([iI])", b="%1ئ%3"}, - {a="(u)(')([uU])", b="%1ؤ%3"}, + -- hamza is alone after letters of prolongation or sukūn + -- {a="([^uai])(')([uU])", b="%1ؤ%3"}, + -- {a="([^uai])(')(%_?[aAY])", b="%1أ%3"}, + -- {a="([^uai])(')([iI])", b="%1ئ%3"}, + {a="([^uai])(')(%_?[uaiUAYI])", b="%1ء%3"}, + {a="(u)(')([UI])", b="%1ء%3"}, + {a="(u)(')([u])", b="%1ؤ%3"}, {a="(u)(')(%_?[aAY])", b="%1ؤ%3"}, - {a="(u)(')([iI])", b="%1ئ%3"}, + {a="(u)(')([i])", b="%1ئ%3"}, {a="(a)(')(%_?[aAY])", b="%1أ%3"}, {a="(a)(')([uU])", b="%1ؤ%3"}, {a="(a)(')([iI])", b="%1ئ%3"}, + {a="(i)(')([UI])", b="%1ء%3"}, {a="(i)(')(%_?[aAY])", b="%1ئ%3"}, - {a="(i)(')([uU])", b="%1ئ%3"}, - {a="(i)(')([iI])", b="%1ئ%3"}, + {a="(i)(')([u])", b="%1ئ%3"}, + {a="(i)(')([i])", b="%1ئ%3"}, {a="(a)(')([^uaiUAI])", b="%1أ%3"}, {a="(u)(')([^uaiUAI])", b="%1ؤ%3"}, {a="(i)(')([^uaiUAI])", b="%1ئ%3"} @@ -321,7 +325,7 @@ hamzaeasy = { -- differences marked below with 'easy' -- taḫfīfu 'l-hamza {a="'u'([^uaiUAI])", b="أU%1"}, {a="'i'([^uaiUAI])", b="إI%1"}, - {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أْ%2"}, + {a="([wf]a)%-\'([^uaiUAIl][^%-])", b="%1أ%2"}, {a="^u'([^uaiUAI])", b="اU%1"}, {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1اU%2"}, {a="^i'([^uaiUAI])", b="اI%1"}, @@ -895,6 +899,7 @@ punctuation = { } null = { + {a="%&", b="‍"}, -- That is ^^^^200d, the zero-width joiner {a="%|", b=""}, {a="^%-", b=""}, {a="([^0-9])(%-)", b="%1"}, -- cgit v1.2.3