summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdfbin289079 -> 296421 bytes
-rw-r--r--Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx163
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua435
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty31
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua305
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua55
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua176
7 files changed, 962 insertions, 203 deletions
diff --git a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf
index 25defb82879..7bc280a812c 100644
--- a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf
+++ b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
index 6a94dabaf98..098bc65cd8d 100644
--- a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
+++ b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
@@ -27,7 +27,7 @@
%<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package-info>\ProvidesPackage{arabluatex}
%<*package-info>
- [2016/04/27 v1.1.1 This is ArabTeX for LuaLaTeX]
+ [2016/05/09 v1.2 This is ArabTeX for LuaLaTeX]
%</package-info>
%
%<*driver>
@@ -136,7 +136,7 @@
\setmainfont{Libertinus Serif}
\setsansfont{Libertinus Sans}
\setmonofont[Scale=.9]{Libertinus Mono}
-\usepackage{arabluatex}[2016/04/27]
+\usepackage{arabluatex}[2016/05/09]
\usepackage{varioref}
\usepackage{hypdoc}
\hypersetup{unicode=true, colorlinks, allcolors=blue,
@@ -189,7 +189,7 @@
%</driver>
% \fi
%
-% \CheckSum{286}
+% \CheckSum{316}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -309,7 +309,7 @@
%
% \package{arabtex} dates back to 1992. As far as I know, it was then
% the first and only way to typeset Arabic texts with \TeX\ and
-% \LaTeX. To achieve this, \package{arabtex} provided---and still
+% \LaTeX. To achieve that, \package{arabtex} provided---and still
% does---an Arabic font in \emph{Nasḫī} style and a macro package that
% defined its own input notation which was, as the author stated,
% \enquote{both machine, and human, readable, and suited for
@@ -350,7 +350,7 @@
% choose.
%
% \label{ref:tei-to-come}
-% But there may be more to be said on this point, as encoding Arabic
+% But there may be more to be said on that point, as encoding Arabic
% also naturally encourages the coder to vocalize the texts---without
% compelling him to do so, of course. Accurate coding may even have
% other virtuous effects. For instance, hyphens may be used for tying
@@ -421,7 +421,7 @@
% \begin{quoting}
% \textsc{Rem.} By default Amiri places the \arb[trans]{kasraT} in
% combination with the \arb[trans]{ta^sdId} below the consonant,
-% like so: \arb{BBi}\,. This is correct, as at least in the oldest
+% like so: \arb{BBi}\,. That is correct, as at least in the oldest
% manuscripts {\newfontfamily\arabicfont[Script=Arabic,
% RawFeature={+ss05}]{Amiri}\arb{BBi}} may stand for \arb{BBa} as
% well as \arb{BBi}\,. See \textcite[i.14.C--D]{Wright}. The placement
@@ -471,6 +471,70 @@
% \end{compactdesc}
% More standards will be included in future releases of
% \package{arabluatex}.
+%
+% \subsubsection{Classic contrasted with modern typesetting of Arabic}
+% \label{sec:classic-modern-typesetting}
+% \NEWfeature{v.1.2} By default, \package{arabluatex} typesets Arabic
+% in a classic, traditional style the most prominent features of which
+% are the following:
+% \begin{compactitem}
+% \item \enquote*{Classic} \arb[trans]{maddaT}: when
+% \arb[trans]{'alif} and \arb[trans]{hamzaT} accompanied by a simple
+% vowel or \arb[trans]{tanwIn} is preceded by an \arb[trans]{'alif} of
+% prolongation (\arb[voc]{BA}), then a mere \arb[trans]{hamzaT} is
+% written on the line, and a \arb[trans]{maddaT} is placed over the
+% \arb[trans]{'alif}, like so:---
+% \begin{quote}
+% |samA'uN| \arb[voc]{samA'uN} \arb[trans]{samA'uN}, |jA'a|
+% \arb[voc]{jA'a} \arb[trans]{jA'a}, |yatasA'alUna|
+% \arb[voc]{yatasA'alUna} \arb[trans]{yatasA'alUna}\footnote{Note
+% that in old mss. such forms as \arb[voc]{samA"'a"'a},
+% \arb[voc]{jA"'a"'a} are also found; see \textcite[i. 24
+% D]{Wright}.} (see \vpageref{ref:madda} for further details).
+% \end{quote}
+% \item The euphonic \arb[trans]{ta^sdId} is generated (see
+% \vpageref{ref:euphonic-tashdid}).
+% \item Assimilation rules laid on \vref{ref:assimilation} are
+% applied.
+% \item In |fullvoc| mode, the \arb[trans]{sukUn} is expressed.
+% \end{compactitem}
+%
+% \DescribeMacro{\SetArbEasy} \DescribeMacro{\SetArbDflt} Such
+% refinements may be discarded by the command \cs{SetArbEasy}, either
+% globally in the preamble or locally at any point of the
+% document. Default \enquote*{classic} rules may be set back at any
+% point of the document with the command \cs{SetArbDflt}. Examples
+% follow:---
+% \begin{compactenum}[(a)]
+% \item \cs{SetArbDflt}:
+% \begin{compactenum}[i.]
+% \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}
+% \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}
+% \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}
+% \end{compactenum}
+% \item \cs{SetArbEasy}:
+% \begin{compactenum}[i.]\SetArbEasy
+% \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}
+% \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}
+% \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma
+% kitAba-hu fI nujUmi 'l-samA'i}\SetArbDflt
+% \end{compactenum}
+% \end{compactenum}
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}[text only]
+Please note that this document is typeset with \cs{SetArbDflt} throughout.
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi
%
%\subsection{Typing Arabic}
% \DescribeMacro{\arb} Once \package{arabluatex} is loaded, a command
@@ -781,7 +845,7 @@ consonants, though three of them are also used as vowels
% \paragraph{Silent \arb[novoc]{U}/\arb[novoc]{I}}
% Some words ending with \arb[voc]{BAT} are usually written
% \arb[voc]{BawT} or \arb[voc]{B_aUT} instead of \arb[voc]{BAT}: see
-% \textcite[i. 12 A]{Wright}. \package{arabluatex} preserves this
+% \textcite[i. 12 A]{Wright}. \package{arabluatex} preserves that
% particular writing; the same applies to words ending in
% \arb[voc]{BayT} for \arb[voc]{BAT}\,. Long vowels \meta{U, I} shall
% receive no \arb[trans]{sukUn} after a \arb[trans]{'alif ma.h_dUfaT}
@@ -797,7 +861,7 @@ consonants, though three of them are also used as vowels
% \end{quote}
%
% \paragraph{\arb[trans]{\cap{`amruNU}}, and the silent
-% \arb[novoc]{U}} To this name a silent \arb[novoc]{U} is added to
+% \arb[novoc]{U}} To that name a silent \arb[novoc]{U} is added to
% distinguish it from \arb[trans]{\cap{`umaruN}}: see \textcite[i. 12
% C]{Wright}. In no way this affects the sound of the
% \arb[trans]{tanwIn}, so it has to be discarded in |trans| mode:
@@ -983,9 +1047,9 @@ consonants, though three of them are also used as vowels
% \end{quote}
%
% \subparagraph{The euphonic \arb[trans]{ta^sdId}}
-% always follows a vowelless consonant which is passed over in
-% pronunciation and assimilated to a following consonant. It may be
-% found \parencite[i. 15 B--16 C]{Wright}:---
+% \label{ref:euphonic-tashdid} always follows a vowelless consonant
+% which is passed over in pronunciation and assimilated to a following
+% consonant. It may be found \parencite[i. 15 B--16 C]{Wright}:---
% \begin{compactenum}[(a)]
% \item With the \emph{solar} letters \arb[novoc]{t}, \arb[novoc]{_t},
% \arb[novoc]{d}, \arb[novoc]{_d}, \arb[novoc]{r}, \arb[novoc]{z},
@@ -995,7 +1059,7 @@ consonants, though three of them are also used as vowels
% \iffalse
%<*example>
% \fi
-\begin{arabluacode}[text only]\label{euphonic-tashdid}
+\begin{arabluacode}[text only]
Unlike \package{arabtex} and \package{arabxetex},
\package{arabluatex} \emph{never requires the solar letter to be
written twice}, as it automatically generates the euphonic
@@ -1013,13 +1077,14 @@ consonants, though three of them are also used as vowels
% |al-.zulmu| \arb[voc]{al-.zulmu} \arb[trans]{al-.zulmu},
% |al-lu.gaTu| \arb[voc]{al-lu.gaTu} \arb[trans]{al-lu.gaTu}.
% \end{quote}
-% \item With the letters \arb[novoc]{r}, \arb[novoc]{l}, \arb[novoc]{m},
-% \arb[novoc]{w}, \arb[novoc]{y} after \arb[voc]{n} with
-% \arb[trans]{jazmaT}, and also after the \arb[trans]{tanwIn}:---
+% \item \label{ref:assimilation} With the letters \arb[novoc]{r},
+% \arb[novoc]{l}, \arb[novoc]{m}, \arb[novoc]{w}, \arb[novoc]{y}
+% after \arb[voc]{n} with \arb[trans]{jazmaT}, and also after the
+% \arb[trans]{tanwIn}:---
% \begin{quote}
% Note the absence of \arb[trans]{sukUn} above the passed over
% \arb[novoc]{n} in the following examples, each of which is
-% accompanied with a consistent transliteration: |min rabbi-hi|
+% accompanied by a consistent transliteration: |min rabbi-hi|
% \arb[fullvoc]{min rabbi-hi}, \arb[trans]{min rabbi-hi},
% |min| |layliN| \arb[fullvoc]{min layliN} \arb[trans]{min layliN},
% |'an| |yaqtula| \arb[fullvoc]{'an yaqtula} \arb[trans]{'an yaqtula}.
@@ -1049,7 +1114,7 @@ consonants, though three of them are also used as vowels
% As said above on \cpageref{fullvoc-mode}, |fullvoc| is the mode
% in which \package{arabluatex} expresses the \arb[trans]{sukUn} and
% the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of
-% doing this automatically provided that the vowel which is to be
+% doing that automatically provided that the vowel which is to be
% absorbed by the final vowel of the preceding word is properly
% encoded, like so:---
% \begin{compactenum}[(a)]
@@ -1128,9 +1193,9 @@ consonants, though three of them are also used as vowels
%
% \subparagraph{\arb[trans]{'alifu 'l-wa.sli} preceded by a long
% vowel} The long vowel preceding the connective \arb[trans]{'alif} is
-% shortened in pronunciation \parencite[i. 21 B--D]{Wright}. This is
-% does not appear in the Arabic script, but \package{arabluatex} takes
-% it into account in some transliteration standards:---
+% shortened in pronunciation \parencite[i. 21 B--D]{Wright}. This does
+% not appear in the Arabic script, but \package{arabluatex} takes it
+% into account in some transliteration standards:---
% \begin{quote}
% |fI| |'l-nAsi| \arb[fullvoc]{fI 'l-nAsi} \arb[trans]{fI 'l-nAsi},
% |'abU| |'l-wazIri| \arb[fullvoc]{'abU 'l-wazIri} \arb[trans]{'abU
@@ -1176,7 +1241,7 @@ consonants, though three of them are also used as vowels
% However, the Arabic script does not shows the \arb[trans]{kasraT}
% which is taken by the nouns having \arb[trans]{tanwIn} although it
% is explicit in pronunciation and must appear in some transliteration
-% standards. \package{arabluatex} takes care of this automatically:---
+% standards. \package{arabluatex} takes care of that automatically:---
% \begin{quote}
% |mu.hammaduN| |'l-nabI| \arb[fullvoc]{mu.hammaduN 'l-nabI}
% \arb[trans]{\cap{m}u.hammaduN 'l-nabI}.
@@ -1194,7 +1259,7 @@ consonants, though three of them are also used as vowels
% col. 1]{Lane}. Finally, the first \arb[novoc]{l} is made quiescent
% and incorporated into the other, hence the \arb[trans]{ta^sdId}
% above it. As \package{arabluatex} never requires a solar letter to
-% be written twice (see above, \vpageref{euphonic-tashdid}), the
+% be written twice (see above, \vpageref{ref:euphonic-tashdid}), the
% name of God is therefore encoded |al-l_ahu| or |'l-l_ahu|:---
% \begin{quote}
% |al-l_ahu| \arb[fullvoc]{al-l_ahu} \arb[trans]{al-l_ahu},
@@ -1395,7 +1460,7 @@ consonants, though three of them are also used as vowels
% \label{sec:quoting-hamza}
% As said above in \vref{ref:hamza}, the \arb[trans]{hamzaT} is always
% written \meta{\texttt{'}}, its carrier being determined by contextual
-% analysis. \enquote{Quoting} this straight single quote character
+% analysis. \enquote{Quoting} that straight single quote character
% like so: \meta{\texttt{"'}} allows to determine the carrier of the
% \arb[trans]{hamzaT} freely, without any consideration for the
% context. \Cref{tab:quoted-hamza} gives the equivalents for all the
@@ -1455,7 +1520,7 @@ consonants, though three of them are also used as vowels
% Aside from that usage, the \enquote{pipe} character is used to
% prevent almost any of the contextual analysis rules that are
% described above from being applied. Two examples have already been
-% given to demonstrate how this particular mechanism works in
+% given to demonstrate how that particular mechanism works in
% \vref{fn:pipe-allah-01} and in \vref{fn:pipe-madda}. One more example
% follows:---
% \begin{quote}
@@ -1685,7 +1750,7 @@ consonants, though three of them are also used as vowels
% \arb[fullvoc]{\cap{m}u.hammaduN 'l-nabI} must be
% \arb[trans]{\cap{m}u.hammaduN 'l-nabI}, as nouns having the
% \arb[trans]{tanwIn} take a \arb[trans]{kasraT} in pronunciation
-% before \arb[trans]{'alifu 'l-wa.sli}. In this case, encoding
+% before \arb[trans]{'alifu 'l-wa.sli}. In that case, encoding
% \arb[fullvoc]{mu.hammaduN} like so: |\cap{mu.hammaduN}| is wrong,
% because the closing brace would prevent \package{arabluatex} from
% detecting the sequence \meta{-uN} immediately followed by
@@ -1824,7 +1889,7 @@ the predicate\ldots} "ibnu \cap{`amriNU}}
% the numbers of the footnotes that are at the bottom of the page be
% typeset in the wrong direction. For example, instead of an expected
% number 18, one may get 81. \package{arabluatex} is not responsible
-% for this, but should it happen, it may be necessary to redefine in
+% for that, but should it happen, it may be necessary to redefine in
% the preamble the \LaTeX\ macro \cs{thefootnote} like so:---\\
% \arabluaverb{\renewcommand*{\thefootnote}{\textsuperscript{\LR{\arabic{footnote}}}}}
% \DescribeMacro{\FixArbFtnmk} Another solution is to put in the
@@ -1964,7 +2029,7 @@ wa-ya.sIru ta.hta 'l-jildi
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arabluatex}%
-[2016/04/27 v1.1.1 ArabTeX-like interface for LuaLaTeX]
+[2016/05/09 v1.2 ArabTeX-like interface for LuaLaTeX]
\RequirePackage{ifluatex}
% \end{macrocode}
% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning
@@ -2060,6 +2125,24 @@ wa-ya.sIru ta.hta 'l-jildi
{\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\SetArbEasy}
+% \changes{v1.2}{2016/05/09}{New \cs{SetArbEasy}/\cs{SetArbDflt} for
+% \enquote*{modern} or \enquote*{classic} Arabic styles.}
+% \begin{macro}{\SetArbDflt}
+% By default, \package{arabluatex} applies complex rules to generate
+% euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT}
+% \linebreak and \arb[trans]{sukUn} depending on the modes which are
+% selected, either |voc|, |fullvoc| or |trans|. Such refinements can
+% be discarded with \cs{SetArbEasy}, either globally in the preamble
+% or at any point of the document. Default complex rules can be set
+% back at any point of the document with \cs{SetArbDflt}.
+% \begin{macrocode}
+\def\al@arb@rules{dflt}
+\NewDocumentCommand{\SetArbEasy}{}{\def\al@arb@rules{easy}}
+\NewDocumentCommand{\SetArbDflt}{}{\def\al@arb@rules{dflt}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \begin{macro}{\SetTranslitStyle} By default any transliterated
% Arabic text is printed in italics. This can be changed globally in
% the preamble or at any point of the document:
@@ -2108,11 +2191,13 @@ wa-ya.sIru ta.hta 'l-jildi
{\edef\@tempa{#1}%
\ifx\@tempa\al@mode@voc%
\bgroup\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processvoc(\luastringN{#2}))}\egroup%
+ \luadirect{tex.sprint(processvoc(\luastringN{#2},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@fullvoc%
\bgroup\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processfullvoc(\luastringN{#2}))}\egroup%
+ \luadirect{tex.sprint(processfullvoc(\luastringN{#2},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@novoc%
\bgroup\textdir TRT\arabicfont%
@@ -2121,7 +2206,8 @@ wa-ya.sIru ta.hta 'l-jildi
\ifx\@tempa\al@mode@trans%
\bgroup\textdir TLT\al@trans@style%
\luadirect{tex.sprint(processtrans(\luastringN{#2},
- \luastringO{\al@trans@convention}))}\egroup%
+ \luastringO{\al@trans@convention},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\fi\fi\fi\fi}
% \end{macrocode}
@@ -2134,11 +2220,13 @@ wa-ya.sIru ta.hta 'l-jildi
{\par\edef\@tempa{#1}%
\ifx\@tempa\al@mode@voc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processvoc(\luastringO{\BODY}))}\egroup%
+ \luadirect{tex.sprint(processvoc(\luastringO{\BODY},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@fullvoc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}))}\egroup%
+ \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@novoc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
@@ -2146,7 +2234,8 @@ wa-ya.sIru ta.hta 'l-jildi
\else \ifx\@tempa\al@mode@trans%
\bgroup\pardir TLT\textdir TLT\al@trans@style%
\luadirect{tex.sprint(processtrans(\luastringO{\BODY},
- \luastringO{\al@trans@convention}))}\egroup%
+ \luastringO{\al@trans@convention},
+ \luastringO{\al@arb@rules}))}\egroup%
\else \fi\fi\fi\fi}[\par]
% \end{macrocode}
% \end{environment}
@@ -2158,8 +2247,14 @@ wa-ya.sIru ta.hta 'l-jildi
% \changes{v1.1}{2016/04/26}{New and more flexible \protect\cs{abjad}
% command.}
% \begin{macrocode}
-\NewDocumentCommand{\abjad}{m}%
+\AtBeginDocument{%
+ \ifdefined\abjad%
+ \RenewDocumentCommand{\abjad}{m}%
+ {\luadirect{tex.sprint(abjadify(#1))}}%
+ \else%
+ \NewDocumentCommand{\abjad}{m}%
{\luadirect{tex.sprint(abjadify(#1))}}
+\fi}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\LRmarginpar} \cs{LRmarginpar} is supposed to be
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
index 719e1e0856c..0bb475640ca 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
@@ -134,202 +134,317 @@ end
local function voc(str)
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)
- end
- for i = 1,#trigraphs do
- inside = string.gsub(inside, trigraphs[i].a, trigraphs[i].b)
- end
- for i = 1,#digraphs do
- inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
- end
- for i = 1,#single do
- inside = string.gsub(inside, single[i].a, single[i].b)
- end
- for i = 1,#longv do
- inside = string.gsub(inside, longv[i].a, longv[i].b)
- end
- for i = 1,#shortv do
- inside = string.gsub(inside, shortv[i].a, shortv[i].b)
- end
- for i = 1,#punctuation do
- inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
- end
- for i = 1,#null do
- inside = string.gsub(inside, null[i].a, null[i].b)
- end
- inside = indnum(inside)
- return string.format("\\txarb{%s}", inside)
- end)
+ 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)
+ end
+ for i = 1,#trigraphs do
+ inside = string.gsub(inside, trigraphs[i].a, trigraphs[i].b)
+ end
+ for i = 1,#digraphs do
+ inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
+ end
+ for i = 1,#single do
+ inside = string.gsub(inside, single[i].a, single[i].b)
+ end
+ for i = 1,#longv do
+ inside = string.gsub(inside, longv[i].a, longv[i].b)
+ end
+ for i = 1,#shortv do
+ inside = string.gsub(inside, shortv[i].a, shortv[i].b)
+ end
+ for i = 1,#punctuation do
+ inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
+ end
+ for i = 1,#null do
+ inside = string.gsub(inside, null[i].a, null[i].b)
+ end
+ inside = indnum(inside)
+ return string.format("\\txarb{%s}", inside)
+ end)
+return str
+end
+
+local function voceasy(str)
+ str = string.gsub(str, "\\arb(%b{})", function(inside)
+ inside = string.sub(inside, 2, -2)
+ for i = 1,#hamzaeasy do
+ inside = string.gsub(inside, hamzaeasy[i].a, hamzaeasy[i].b)
+ end
+ for i = 1,#tanwineasy do
+ inside = string.gsub(inside, tanwineasy[i].a, tanwineasy[i].b)
+ end
+ for i = 1,#trigraphseasy do
+ inside = string.gsub(inside, trigraphseasy[i].a, trigraphseasy[i].b)
+ end
+ for i = 1,#digraphs do
+ inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
+ end
+ for i = 1,#single do
+ inside = string.gsub(inside, single[i].a, single[i].b)
+ end
+ for i = 1,#longv do
+ inside = string.gsub(inside, longv[i].a, longv[i].b)
+ end
+ for i = 1,#shortv do
+ inside = string.gsub(inside, shortv[i].a, shortv[i].b)
+ end
+ for i = 1,#punctuation do
+ inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
+ end
+ for i = 1,#null do
+ inside = string.gsub(inside, null[i].a, null[i].b)
+ end
+ inside = indnum(inside)
+ return string.format("\\txarb{%s}", inside)
+ end)
return str
end
local function fullvoc(str)
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)
- 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)
- end
- for i = 1,#singlefv do
- inside = string.gsub(inside, singlefv[i].a, singlefv[i].b)
- end
- for i = 1,#longv do
- inside = string.gsub(inside, longv[i].a, longv[i].b)
- end
- for i = 1,#shortv do
- inside = string.gsub(inside, shortv[i].a, shortv[i].b)
- end
- for i = 1,#punctuation do
- inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
- end
- for i = 1,#null do
- inside = string.gsub(inside, null[i].a, null[i].b)
- end
- inside = indnum(inside)
- return string.format("\\txarb{%s}", inside)
- end)
+ 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)
+ 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)
+ end
+ for i = 1,#singlefv do
+ inside = string.gsub(inside, singlefv[i].a, singlefv[i].b)
+ end
+ for i = 1,#longv do
+ inside = string.gsub(inside, longv[i].a, longv[i].b)
+ end
+ for i = 1,#shortv do
+ inside = string.gsub(inside, shortv[i].a, shortv[i].b)
+ end
+ for i = 1,#punctuation do
+ inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
+ end
+ for i = 1,#null do
+ inside = string.gsub(inside, null[i].a, null[i].b)
+ end
+ inside = indnum(inside)
+ return string.format("\\txarb{%s}", inside)
+ end)
+return str
+end
+
+local function fullvoceasy(str)
+ str = string.gsub(str, "\\arb(%b{})", function(inside)
+ inside = string.sub(inside, 2, -2)
+ for i = 1,#hamzafveasy do
+ inside = string.gsub(inside, hamzafveasy[i].a, hamzafveasy[i].b)
+ end
+ for i = 1,#tanwinfveasy do
+ inside = string.gsub(inside, tanwinfveasy[i].a, tanwinfveasy[i].b)
+ end
+ for i = 1,#trigraphsfveasy do
+ inside = string.gsub(inside, trigraphsfveasy[i].a, trigraphsfveasy[i].b)
+ end
+ for i = 1,#digraphsfveasy do
+ inside = string.gsub(inside, digraphsfveasy[i].a, digraphsfveasy[i].b)
+ end
+ for i = 1,#singlefveasy do
+ inside = string.gsub(inside, singlefveasy[i].a, singlefveasy[i].b)
+ end
+ for i = 1,#longv do
+ inside = string.gsub(inside, longv[i].a, longv[i].b)
+ end
+ for i = 1,#shortv do
+ inside = string.gsub(inside, shortv[i].a, shortv[i].b)
+ end
+ for i = 1,#punctuation do
+ inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
+ end
+ for i = 1,#null do
+ inside = string.gsub(inside, null[i].a, null[i].b)
+ end
+ inside = indnum(inside)
+ return string.format("\\txarb{%s}", inside)
+ end)
return str
end
local function novoc(str)
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,#tanwinnv do
- inside = string.gsub(inside, tanwinnv[i].a, tanwinnv[i].b)
- end
- for i = 1,#trigraphsnv do
- inside = string.gsub(inside, trigraphsnv[i].a, trigraphsnv[i].b)
- end
- for i = 1,#digraphs do
- inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
- end
- for i = 1,#single do
- inside = string.gsub(inside, single[i].a, single[i].b)
- end
- for i = 1,#longvnv do
- inside = string.gsub(inside, longvnv[i].a, longvnv[i].b)
- end
- for i = 1,#shortvnv do
- inside = string.gsub(inside, shortvnv[i].a, shortvnv[i].b)
- end
- for i = 1,#punctuation do
- inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
- end
- for i = 1,#null do
- inside = string.gsub(inside, null[i].a, null[i].b)
- end
- inside = indnum(inside)
- return string.format("\\txarb{%s}", inside)
- end)
+ for i = 1,#hamza do
+ inside = string.gsub(inside, hamza[i].a, hamza[i].b)
+ end
+ for i = 1,#tanwinnv do
+ inside = string.gsub(inside, tanwinnv[i].a, tanwinnv[i].b)
+ end
+ for i = 1,#trigraphsnv do
+ inside = string.gsub(inside, trigraphsnv[i].a, trigraphsnv[i].b)
+ end
+ for i = 1,#digraphs do
+ inside = string.gsub(inside, digraphs[i].a, digraphs[i].b)
+ end
+ for i = 1,#single do
+ inside = string.gsub(inside, single[i].a, single[i].b)
+ end
+ for i = 1,#longvnv do
+ inside = string.gsub(inside, longvnv[i].a, longvnv[i].b)
+ end
+ for i = 1,#shortvnv do
+ inside = string.gsub(inside, shortvnv[i].a, shortvnv[i].b)
+ end
+ for i = 1,#punctuation do
+ inside = string.gsub(inside, punctuation[i].a, punctuation[i].b)
+ end
+ for i = 1,#null do
+ inside = string.gsub(inside, null[i].a, null[i].b)
+ end
+ inside = indnum(inside)
+ return string.format("\\txarb{%s}", inside)
+ end)
return str
end
local function transdmg(str)
str = string.gsub(str, "\\arb(%b{})", function(inside)
inside = string.sub(inside, 2, -2)
- 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,#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)
+ 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,#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)
+ 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 transloc(str)
str = string.gsub(str, "\\arb(%b{})", function(inside)
inside = string.sub(inside, 2, -2)
- for i = 1,#hamzatrloc do
- inside = string.gsub(inside, hamzatrloc[i].a, hamzatrloc[i].b)
- end
- for i = 1,#tanwintrloc do
- inside = string.gsub(inside, tanwintrloc[i].a, tanwintrloc[i].b)
- end
- for i = 1,#trigraphstrloc do
- inside = string.gsub(inside, trigraphstrloc[i].a, trigraphstrloc[i].b)
- end
- for i = 1,#digraphstrloc do
- inside = string.gsub(inside, digraphstrloc[i].a, digraphstrloc[i].b)
- end
- for i = 1,#singletrloc do
- inside = string.gsub(inside, singletrloc[i].a, singletrloc[i].b)
- end
- for i = 1,#longvtrloc do
- inside = string.gsub(inside, longvtrloc[i].a, longvtrloc[i].b)
- end
- for i = 1,#shortvtrloc do
- inside = string.gsub(inside, shortvtrloc[i].a, shortvtrloc[i].b)
- end
- for i = 1,#finaltrloc do
- inside = string.gsub(inside, finaltrloc[i].a, finaltrloc[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)
+ for i = 1,#hamzatrloc do
+ inside = string.gsub(inside, hamzatrloc[i].a, hamzatrloc[i].b)
+ end
+ for i = 1,#tanwintrloc do
+ inside = string.gsub(inside, tanwintrloc[i].a, tanwintrloc[i].b)
+ end
+ for i = 1,#trigraphstrloc do
+ inside = string.gsub(inside, trigraphstrloc[i].a, trigraphstrloc[i].b)
+ end
+ for i = 1,#digraphstrloc do
+ inside = string.gsub(inside, digraphstrloc[i].a, digraphstrloc[i].b)
+ end
+ for i = 1,#singletrloc do
+ inside = string.gsub(inside, singletrloc[i].a, singletrloc[i].b)
+ end
+ for i = 1,#longvtrloc do
+ inside = string.gsub(inside, longvtrloc[i].a, longvtrloc[i].b)
+ end
+ for i = 1,#shortvtrloc do
+ inside = string.gsub(inside, shortvtrloc[i].a, shortvtrloc[i].b)
+ end
+ for i = 1,#finaltrloc do
+ inside = string.gsub(inside, finaltrloc[i].a, finaltrloc[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
-function processvoc(str)
+function processvoc(str, rules)
str = "\\arb{".. str.."}"
str = takeoutcap(str)
str = protectarb(str)
str = breakcmd(str)
str = holdcmd(str)
- str = voc(str)
+ if rules == "easy" then
+ str = voceasy(str)
+ elseif rules == "dflt" then
+ str = voc(str)
+ else end
str = unprotectarb(str)
return str
end
-function processfullvoc(str)
+function processfullvoc(str, rules)
str = "\\arb{".. str.."}"
str = takeoutcap(str)
str = protectarb(str)
str = breakcmd(str)
str = holdcmd(str)
- str = fullvoc(str)
+ if rules == "easy" then
+ str = fullvoceasy(str)
+ elseif rules == "dflt" then
+ str = fullvoc(str)
+ else end
str = unprotectarb(str)
return str
end
@@ -345,14 +460,18 @@ function processnovoc(str)
return str
end
-function processtrans(str, mode)
+function processtrans(str, mode, rules)
str = "\\arb{".. str.."}"
str = takeoutabjad(str)
str = protectarb(str)
str = breakcmd(str)
str = holdcmd(str)
if mode == "dmg" then
- str = transdmg(str)
+ if rules == "easy" then
+ str = transdmgeasy(str)
+ elseif rules == "dflt" then
+ str = transdmg(str)
+ else end
elseif mode == "loc" then
str = transloc(str)
else end
@@ -403,5 +522,5 @@ function abjadify(n)
if n >= 1 then
abjadnum = abjadnum .. abjad[1][math.floor(n/1)]
end
- return "\\arb{"..abjadnum.."}"
+ return "\\arb[novoc]{"..abjadnum.."}"
end
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
index 91c59c02461..48b9b43447e 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/04/27 v1.1.1 ArabTeX-like interface for LuaLaTeX]
+[2016/05/09 v1.2 ArabTeX-like interface for LuaLaTeX]
\RequirePackage{ifluatex}
\ifluatex\else
\PackageError{arabluatex}{lualatex needed}{%
@@ -83,6 +83,9 @@
\AtBeginDocument{\ifdef{\aemph}%
{\RenewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}
{\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}}
+\def\al@arb@rules{dflt}
+\NewDocumentCommand{\SetArbEasy}{}{\def\al@arb@rules{easy}}
+\NewDocumentCommand{\SetArbDflt}{}{\def\al@arb@rules{dflt}}
\def\al@trans@style{\itshape}%
\NewDocumentCommand{\SetTranslitStyle}{m}{\def\al@trans@style{#1}}
\def\al@trans@convention{dmg}
@@ -97,11 +100,13 @@
{\edef\@tempa{#1}%
\ifx\@tempa\al@mode@voc%
\bgroup\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processvoc(\luastringN{#2}))}\egroup%
+ \luadirect{tex.sprint(processvoc(\luastringN{#2},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@fullvoc%
\bgroup\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processfullvoc(\luastringN{#2}))}\egroup%
+ \luadirect{tex.sprint(processfullvoc(\luastringN{#2},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@novoc%
\bgroup\textdir TRT\arabicfont%
@@ -110,18 +115,21 @@
\ifx\@tempa\al@mode@trans%
\bgroup\textdir TLT\al@trans@style%
\luadirect{tex.sprint(processtrans(\luastringN{#2},
- \luastringO{\al@trans@convention}))}\egroup%
+ \luastringO{\al@trans@convention},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\fi\fi\fi\fi}
\NewEnviron{arab}[1][\al@mode]%
{\par\edef\@tempa{#1}%
\ifx\@tempa\al@mode@voc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processvoc(\luastringO{\BODY}))}\egroup%
+ \luadirect{tex.sprint(processvoc(\luastringO{\BODY},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@fullvoc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
- \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}))}\egroup%
+ \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY},
+ \luastringO{\al@arb@rules}))}\egroup%
\else%
\ifx\@tempa\al@mode@novoc%
\bgroup\pardir TRT\textdir TRT\arabicfont%
@@ -129,10 +137,17 @@
\else \ifx\@tempa\al@mode@trans%
\bgroup\pardir TLT\textdir TLT\al@trans@style%
\luadirect{tex.sprint(processtrans(\luastringO{\BODY},
- \luastringO{\al@trans@convention}))}\egroup%
+ \luastringO{\al@trans@convention},
+ \luastringO{\al@arb@rules}))}\egroup%
\else \fi\fi\fi\fi}[\par]
-\NewDocumentCommand{\abjad}{m}%
+\AtBeginDocument{%
+ \ifdefined\abjad%
+ \RenewDocumentCommand{\abjad}{m}%
+ {\luadirect{tex.sprint(abjadify(#1))}}%
+ \else%
+ \NewDocumentCommand{\abjad}{m}%
{\luadirect{tex.sprint(abjadify(#1))}}
+\fi}
\DeclareDocumentCommand{\LRmarginpar}{m}{\marginpar{\textdir TLT #1}}
\DeclareDocumentCommand{\LRfootnote}{m}{\bgroup\pardir
TLT\LR{\footnote{#1}}\egroup}
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
index 8263734863b..a2676e0be8f 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
@@ -22,7 +22,6 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>.
--]]
--- this is new
hamzafv = {
-- hard coded hamza
{a="|\"'", b="ء"},
@@ -115,6 +114,98 @@ hamzafv = {
{a="(i)(')([^uaiUAI])", b="%1ئْ%3"}
}
+hamzafveasy = { -- differences marked below with 'easy'
+ -- hard coded hamza
+ {a="|\"'", b="ء"},
+ {a="A\"'", b="آ"},
+ {a="[au]\"'", b="أ"},
+ {a="w\"'", b="ؤ"},
+ {a="i\"'", b="إ"},
+ {a="y\"'", b="ئ"},
+ {a="ؤ([^uaiUAI])", b="ؤْ%1"},
+ {a="ؤ$", b="ؤْ"},
+ {a="ؤ(%s)", b="ؤْ%1"},
+ {a="أ([^uaiUAI])", b="أْ%1"},
+ {a="أ$", b="أْ"},
+ {a="أ(%s)", b="أْ%1"},
+ {a="ئ([^uaiUAI])", b="ئْ%1"},
+ {a="ئ$", b="ئْ"},
+ {a="ئ(%s)", b="ئْ%1"},
+ -- hamza takes tašdīd too
+ {a="''([Uu])", b="ؤؤ%1"},
+ {a="''([Aa])", b="أأ%1"},
+ {a="''([Ii])", b="ئئ%1"},
+ -- initial long u and i (for a, see below)
+ {a="%'%_U", b="أU"},
+ {a="%'%_I", b="إI"},
+ -- taḫfīfu 'l-hamza
+ {a="'u'([^uaiUAI])", b="أU%1"},
+ {a="'i'([^uaiUAI])", b="إI%1"},
+ -- madda (historic writing below)
+ {a="'a'([^uaiUAI])", b="آ%1"},
+ {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"},
+--easy {a="(A)(')(uN?)$", b="aآء%3"},
+--easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"},
+--easy {a="(A)(')(iN?)$", b="aآء%3"},
+--easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"},
+--easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda
+--easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda
+--easy {a="(A)(')", b="aآء"}, -- historic madda
+ -- initial (needs both ^ and %W patterns)
+ {a="^(')([ua])", b="أ%2"},
+ {a="^(')(i)", b="إ%2"},
+ {a="(%W)(')([ua])", b="%1أ%3"},
+ {a="(%W)(')(i)", b="%1إ%3"},
+ -- final
+ -- ^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"},
+-- u
+ {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)(')(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)(')$", 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)(')$", b="%1ئْ"},
+ {a="(i)(')(%W)", b="%1ئْ%3"},
+--
+ -- middle
+ {a="(U)(')", b="%1ء"},
+ {a="([Iy])(')", b="%1ئ"},
+ {a="([^uai])(')([uU])", b="%1ؤ%3"},
+ {a="([^uai])(')([aA])", b="%1أ%3"},
+ {a="([^uai])(')([iI])", b="%1ئ%3"},
+ {a="(u)(')([uU])", b="%1ؤ%3"},
+ {a="(u)(')([aA])", b="%1ؤ%3"},
+ {a="(u)(')([iI])", b="%1ئ%3"},
+ {a="(a)(')([aA])", b="%1أ%3"},
+ {a="(a)(')([uU])", b="%1ؤ%3"},
+ {a="(a)(')([iI])", b="%1ئ%3"},
+ {a="(i)(')([aA])", b="%1ئ%3"},
+ {a="(i)(')([uU])", b="%1ئ%3"},
+ {a="(i)(')([iI])", b="%1ئ%3"},
+ {a="(a)(')([^uaiUAI])", b="%1أْ%3"},
+ {a="(u)(')([^uaiUAI])", b="%1ؤْ%3"},
+ {a="(i)(')([^uaiUAI])", b="%1ئْ%3"}
+}
+
tanwinfv = {
{a="uNU", b="ٌو"},
{a="aNU", b="ًوا"},
@@ -150,7 +241,41 @@ tanwinfv = {
{a="(iN)", b="ٍ"}
}
--- this is new
+tanwinfveasy = { -- no assimilations (see below)
+ {a="uNU", b="ٌو"},
+ {a="aNU", b="ًوا"},
+ {a="iNU", b="ٍو"},
+ {a="([uai]N)(%s)([uai])", b="%1%2ٱ"},
+ {a="(aN[%_]?[AY])(%s)([uai])", b="%1%2ٱ"},
+ -- assimilations (begin)
+--easy {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"},
+--easy {a="(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
+--easy {a="(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
+--easy {a="(T)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
+--easy {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
+--easy {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
+--easy {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"},
+ -- assimilations (end)
+ -- quoted tanwīn (begin)
+ {a="(\"uN)", b=""},
+ {a="(B)(\"aN)", b="%1"},
+ {a="(\"aN)(_A)", b="ى"},
+ {a="(\"aN)(Y)", b="ى"},
+ {a="(T)(\"aN)", b="%1"},
+ {a="(ء)(\"aN)", b="%1"},
+ {a="([^TA])(\"aN)", b="%1ا"},
+ {a="(\"iN)", b=""},
+ -- quoted tanwīn (end)
+ {a="(uN)", b="ٌ"},
+ {a="(B)(aN)", b="%1ً"},
+ {a="(aN)(_A)", b="ًى"},
+ {a="(aN)(Y)", b="ًى"},
+ {a="(T)(aN)", b="%1ً"},
+ {a="(ء)(aN)", b="%1ً"},
+ {a="([^TA])(aN)", b="%1ًا"},
+ {a="(iN)", b="ٍ"}
+}
+
trigraphsfv = { -- trigraphs or more
-- 'llatI / 'llad_I
{a="^'ll(a)([%_]?[dt])", b="ٱلّ%1%2"},
@@ -207,7 +332,62 @@ trigraphsfv = { -- trigraphs or more
{a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
}
--- this is new
+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"},
+ -- al- + lām
+ {a="^(a)l%-(l)", b="ا%1ل%2%2"},
+ {a="([%s%-])(a)l%-(l)", b="%1ا%2ل%3%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="ا%1لٱ%2"},
+ {a="([%s%-])(a)l%-(\"?[uai])", b="%1ا%2لٱ%3"},
+ -- li-/la + art. + initial unstable hamza is a special orthography
+ {a="l([ai])%-l%-(\"?[uai])", b="ل%1لٱ%2"},
+ -- al- + lunar consonant (i.e. what remains)
+ {a="^(a)l%-", b="ا%1لْ"},
+ {a="([%s%-])(a)l%-", b="%1ا%2لْ"},
+ -- 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"},
+ {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
+ -- art. with waṣla + lām
+ {a="'l%-(l)", b="ٱل%1%1"},
+ -- art. with waṣla + solar consonant
+ {a="'l%-([%_%^%.]?[tdrzsn])", b="ٱل%1%1"},
+ -- li-/la- + art. + lām
+ {a="l([ai])%-l%-(l)", b="ل%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="ل%1ل%2%2"},
+ -- li-/la- + assim. art. + solar consonant is a special orthography
+ {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3%3"},
+ -- art. with waṣla + initial unstable hamza
+ {a="'l%-(\"?[uai])", b="ٱلٱ%1"},
+ -- art. with waṣla + lunar consonant (i.e. what remains)
+ {a="'l%-", b="ٱلْ"},
+ -- 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="%1وا"},
+ {a="(_a)U", b="%1و"},
+ {a="(_a)I", b="%1ي"},
+ -- assimilations
+--easy {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
+}
+
digraphsfv = {
-- initial straight double quote gives a connective ʾalif
{a="^\"[uai]", b="ٱ"},
@@ -293,6 +473,94 @@ digraphsfv = {
{a="%^d", b="ڊ"}
}
+digraphsfveasy = { -- see the diffenrences under 'easy' marker below
+ -- initial straight double quote gives a connective ʾalif
+ {a="^\"[uai]", b="ٱ"},
+ {a="([%s%-])\"[uai]", b="%1ٱ"},
+ -- 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="%-%-", 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="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 ('easy' needs these rules to be taken out); but
+ -- first take out every previously generated sukūn by hamza rules,
+ -- so there be no need to edit them:
+ {a="ْ", b=""},
+-- {a="([%_%^%.]?[Bbtjghxdrzs%`fqklmnwy])$", b="%1ْ"},
+-- {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="ْ\"", 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="ڊ"}
+}
+
singlefv = {
{a="b", b="ب"},
{a="t", b="ت"},
@@ -320,3 +588,34 @@ singlefv = {
{a="([^0-9])%-([^0-9])", b="%1%2"},
{a="B", b="ـ"},
}
+
+singlefveasy = { -- see the differences under 'easy' tag below
+ {a="b", b="ب"},
+ {a="t", b="ت"},
+ {a="j", b="ج"},
+ {a="x", b="خ"},
+ {a="d", b="د"},
+ {a="r", b="ر"},
+ {a="z", b="ز"},
+ {a="s", b="س"},
+ {a="f", b="ف"},
+ {a="`", b="ع"},
+ {a="f", b="ف"},
+ {a="q", b="ق"},
+ {a="k", b="ك"},
+ {a="l", b="ل"},
+ {a="m", b="م"},
+ {a="n", b="ن"},
+ {a="h", b="ه"},
+ {a="w", b="و"},
+ {a="y", b="ي"},
+ {a="T", b="ة"},
+ -- easy (begin): \" needs to put back the sukūn
+ {a="\"$", b="ْ"},
+ {a="\"(%W)", b="ْ%1"},
+ {a="\"([^uaiUAI])", b="ْ%1"},
+ -- easy (end)
+ {a="([^0-9])%-([^0-9])", b="%1%2"},
+ {a="B", b="ـ"},
+}
+
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
index 6b3f1bc092c..c96a9daa492 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
@@ -201,6 +201,61 @@ trigraphstrdmg = { -- trigraphs or more
{a="(n)(%s)([rlmnwy])", b="%3%2%3"}
}
+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"}
+ -- assimilations
+--easy {a="(n)(%s)([rlmnwy])", b="%3%2%3"}
+}
+
digraphstrdmg = {
{a="([uai]%-)(\"?[uai])", b="%1'"}, -- hyphen + initial alif without hamza
{a="^(\"?[uai])", b="%1"}, -- initial alif without hamza
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
index 5eafca5e1d3..4f5399fc5ac 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
@@ -154,6 +154,89 @@ hamza = {
{a="(i)(')([^uaiUAI])", b="%1ئ%3"}
}
+hamzaeasy = { -- differences marked below with 'easy'
+ -- hard coded hamza
+ {a="|\"'", b="ء"},
+ {a="A\"'", b="آ"},
+ {a="[au]\"'", b="أ"},
+ {a="w\"'", b="ؤ"},
+ {a="i\"'", b="إ"},
+ {a="y\"'", b="ئ"},
+ -- hamza takes tašdīd too
+ {a="''([Uu])", b="ؤؤ%1"},
+ {a="''([Aa])", b="أأ%1"},
+ {a="''([Ii])", b="ئئ%1"},
+ -- initial long u and i (for a, see below)
+ {a="%'%_U", b="أU"},
+ {a="%'%_I", b="إI"},
+ -- taḫfīfu 'l-hamza
+ {a="'u'([^uaiUAI])", b="أU%1"},
+ {a="'i'([^uaiUAI])", b="إI%1"},
+ -- madda (historic writing below)
+ {a="'a'([^uaiUAI])", b="آ%1"},
+ {a="'a?A([%_%^%.]?[%`%'btjghdrzsfqklmnywAY])", b="آ%1"},
+--easy {a="(A)(')(uN?)$", b="aآء%3"},
+--easy {a="(A)(')(uN?)(%W)", b="aآء%3%4"},
+--easy {a="(A)(')(iN?)$", b="aآء%3"},
+--easy {a="(A)(')(iN?)(%W)", b="aآء%3%4"},
+--easy {a="(A)(')(i)", b="aآئ%3"}, -- historic madda
+--easy {a="(A)(')(u)", b="aآؤ%3"}, -- historic madda
+--easy {a="(A)(')", b="aآء"}, -- historic madda
+ -- initial (needs both ^ and %W patterns)
+ {a="^(')([ua])", b="أ%2"},
+ {a="^(')(i)", b="إ%2"},
+ {a="(%W)(')([ua])", b="%1أ%3"},
+ {a="(%W)(')(i)", b="%1إ%3"},
+ -- final
+ -- ^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"},
+-- u
+ {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)(')(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)(')$", 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)(')$", b="%1ئ"},
+ {a="(i)(')(%W)", b="%1ئ%3"},
+--
+ -- middle
+ {a="(U)(')", b="%1ء"},
+ {a="([Iy])(')", b="%1ئ"},
+ {a="([^uai])(')([uU])", b="%1ؤ%3"},
+ {a="([^uai])(')([aA])", b="%1أ%3"},
+ {a="([^uai])(')([iI])", b="%1ئ%3"},
+ {a="(u)(')([uU])", b="%1ؤ%3"},
+ {a="(u)(')([aA])", b="%1ؤ%3"},
+ {a="(u)(')([iI])", b="%1ئ%3"},
+ {a="(a)(')([aA])", b="%1أ%3"},
+ {a="(a)(')([uU])", b="%1ؤ%3"},
+ {a="(a)(')([iI])", b="%1ئ%3"},
+ {a="(i)(')([aA])", b="%1ئ%3"},
+ {a="(i)(')([uU])", b="%1ئ%3"},
+ {a="(i)(')([iI])", b="%1ئ%3"},
+ {a="(a)(')([^uaiUAI])", b="%1أ%3"},
+ {a="(u)(')([^uaiUAI])", b="%1ؤ%3"},
+ {a="(i)(')([^uaiUAI])", b="%1ئ%3"}
+}
+
tanwin = {
{a="uNU", b="ٌو"},
{a="aNU", b="ًوا"},
@@ -187,6 +270,39 @@ tanwin = {
{a="(iN)", b="ٍ"}
}
+tanwineasy = { -- 'easy' requires some lines to be taken out:
+ {a="uNU", b="ٌو"},
+ {a="aNU", b="ًوا"},
+ {a="iNU", b="ٍو"},
+ -- assimilations (begin)
+-- {a="(uN)(%s)([rlmnwy])", b="ٌ%2%3%3"},
+-- {a="(aN)(_A)(%s)([rlmnwy])", b="ًى%3%4%4"},
+-- {a="(aN)(Y)(%s)([rlmnwy])", b="ًى%3%4%4"},
+-- {a="(T)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
+-- {a="(ء)(aN)(%s)([rlmnwy])", b="%1ً%3%4%4"},
+-- {a="([^TA])(aN)(%s)([rlmnwy])", b="%1ًا%3%4%4"},
+-- {a="(iN)(%s)([rlmnwy])", b="ٍ%2%3%3"},
+ -- assimilations (end)
+ -- quoted tanwīn (begin)
+ {a="(\"uN)", b=""},
+ {a="(B)(\"aN)", b="%1"},
+ {a="(\"aN)(_A)", b="ى"},
+ {a="(\"aN)(Y)", b="ى"},
+ {a="(T)(\"aN)", b="%1"},
+ {a="(ء)(\"aN)", b="%1"},
+ {a="([^TA])(\"aN)", b="%1ا"},
+ {a="(\"iN)", b=""},
+ -- quoted tanwīn (end)
+ {a="(uN)", b="ٌ"},
+ {a="(B)(aN)", b="%1ً"},
+ {a="(aN)(_A)", b="ًى"},
+ {a="(aN)(Y)", b="ًى"},
+ {a="(T)(aN)", b="%1ً"},
+ {a="(ء)(aN)", b="%1ً"},
+ {a="([^TA])(aN)", b="%1ًا"},
+ {a="(iN)", b="ٍ"}
+}
+
trigraphs = { -- trigraphs or more
-- 'llatI / 'llad_I
{a="^'ll(a)([%_]?[dt])", b="الّ%1%2"},
@@ -247,6 +363,66 @@ trigraphs = { -- trigraphs or more
{a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
}
+trigraphseasy = { -- differences marked below with 'easy'
+ -- 'llatI / 'llad_I
+ {a="^'ll(a)([%_]?[dt])", b="الّ%1%2"},
+ {a="([%s%-])'ll(a)([%_]?[dt])", b="%1الّ%2%3"},
+ -- al- + lām (easy)
+ {a="^(a)l%-(l)", b="ا%1ل%2"},
+ {a="([%s%-])(a)l%-(l)", b="%1ا%2ل%3"},
+ -- al- + solar consonant (easy)
+ {a="^(a)l%-([%_%^%.]?[tdrzsn])", b="ا%1ل%2"},
+ {a="([%s%-])(a)l%-([%_%^%.]?[tdrzsn])", b="%1ا%2ل%3"},
+ -- assim. art. + solar consonant (easy)
+ {a="^(a)([%_%^%.]?[tdrzsn])%-", b="ا%1ل"},
+ {a="([%s%-])(a)([%_%^%.]?[tdrzsn])%-", b="%1ا%2ل"},
+ -- al- + initial unstable hamza
+ {a="^(a)l%-(\")([uai])", b="ا%1لٱ%3"},
+ {a="([%s%-])(a)l%-(\")([uai])", b="%1ا%2لٱ%4"},
+ {a="^(a)l%-([uai])", b="ا%1لا%2"},
+ {a="([%s%-])(a)l%-([uai])", b="%1ا%2لا%3"},
+ -- 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ل"},
+ -- 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"},
+ {a="(ay)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
+ -- art. with waṣla + lām (easy)
+ {a="'l%-(l)", b="ال%1"},
+ -- art. with waṣla + solar consonant (easy)
+ {a="'l%-([%_%^%.]?[tdrzsn])", b="ال%1"},
+ -- li-/la- + art. + lām (easy)
+ {a="l([ai])%-l%-(l)", b="ل%1%2"},
+ -- assim. art. with waṣla + solar consonant (easy)
+ {a="'([%_%^%.]?[tdrzsn])%-", b="ال"},
+ -- li-/la- + art. + solar consonant is a special orthography (easy)
+ {a="l([ai])%-l%-([%_%^%.]?[tdrzsn])", b="ل%1ل%2"},
+ -- li-/la + assim. art. + solar consonant is a special orthography (easy)
+ {a="l([ai])%-([%_%^%.]?[tdrzsn])%-([%_%^%.]?[tdrzsn])", b="ل%1ل%3"},
+ -- art. with waṣla + initial unstable hamza
+ {a="'l%-(\")([uai])", b="الٱ%2"},
+ {a="'l%-([uai])", b="الا%1"},
+ -- art. with waṣla + lunar consonant (i.e. what remains)
+ {a="'l%-", b="ال"},
+ -- 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="%1وا"},
+ {a="(_a)U", b="%1و"},
+ {a="(_a)I", b="%1ي"},
+ -- assimilations
+--easy {a="(n)(%s)([rlmnwy])", b="%1%2%3%3"}
+}
+
digraphs = {
-- initial straight double quote gives a connective ʾalif
{a="^\"[uai]", b="ٱ"},