From 775480ef50d7ef9930bb2432b3f08611ce683f01 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 26 Jun 2018 21:55:06 +0000 Subject: arabluatex (26jun18) git-svn-id: svn://tug.org/texlive/trunk@48094 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/lualatex/arabluatex/arabluatex.el | 6 + .../doc/lualatex/arabluatex/arabluatex.pdf | Bin 565427 -> 626929 bytes .../doc/lualatex/arabluatex/samples/al-Jahiz.pdf | Bin 111755 -> 111577 bytes .../lualatex/arabluatex/samples/template-01.pdf | Bin 65049 -> 64725 bytes .../source/lualatex/arabluatex/arabluatex.dtx | 1094 +++++++++++++++----- .../tex/lualatex/arabluatex/arabluatex.lua | 268 +++-- .../tex/lualatex/arabluatex/arabluatex.sty | 54 +- .../tex/lualatex/arabluatex/arabluatex_fullvoc.lua | 151 +-- .../tex/lualatex/arabluatex/arabluatex_novoc.lua | 18 +- .../tex/lualatex/arabluatex/arabluatex_trans.lua | 160 +-- .../tex/lualatex/arabluatex/arabluatex_voc.lua | 159 +-- 11 files changed, 1317 insertions(+), 593 deletions(-) diff --git a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.el b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.el index 73258721ba8..810917b4a2d 100644 --- a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.el +++ b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.el @@ -44,6 +44,9 @@ ("utf" ("true" "false"))) "Key=value options for arabverse environment.") +(defvar LaTeX-arabluatex-color-options + '(())) + (TeX-add-style-hook "arabluatex" (lambda () @@ -69,6 +72,9 @@ '("arb" [ (TeX-arg-eval completing-read "Mode: " LaTeX-arabluatex-mode-options) ] t) + '("arbcolor" [ (TeX-arg-eval completing-read "Color: " + LaTeX-arabluatex-color-options) ] + t) "SetHemistichDelim" '("bayt" 2) "abjad" diff --git a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf index 6177eaa750f..45e35cdc3ff 100644 Binary files a/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf and b/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/arabluatex/samples/al-Jahiz.pdf b/Master/texmf-dist/doc/lualatex/arabluatex/samples/al-Jahiz.pdf index 7b03abe94c9..80027660218 100644 Binary files a/Master/texmf-dist/doc/lualatex/arabluatex/samples/al-Jahiz.pdf and b/Master/texmf-dist/doc/lualatex/arabluatex/samples/al-Jahiz.pdf differ diff --git a/Master/texmf-dist/doc/lualatex/arabluatex/samples/template-01.pdf b/Master/texmf-dist/doc/lualatex/arabluatex/samples/template-01.pdf index 2fc7e20782f..1a0f8078bfb 100644 Binary files a/Master/texmf-dist/doc/lualatex/arabluatex/samples/template-01.pdf and b/Master/texmf-dist/doc/lualatex/arabluatex/samples/template-01.pdf differ diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx index 4b88bf9cd8e..2f6c92a7cdf 100644 --- a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx +++ b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -% Copyright (C) 2016--2018 Robert Alessi +% Copyright (C) 2016--2018 Robert Alesssi % % Please send error reports and suggestions for improvements to Robert % Alessi @@ -27,7 +27,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{arabluatex} %<*package-info> - [2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX] + [2018/06/24 v1.12 An ArabTeX-like interface for LuaLaTeX] % % %<*driver> @@ -74,7 +74,7 @@ maintainer = {Hosny, Khaled}, title = {Amiri}, indextitle = {Amiri}, - date = {2015-09-20}, + date = {2017-12-13}, url = {http://www.amirifont.org/} } @@ -150,18 +150,19 @@ \usepackage[english]{babel} \usepackage{dox} \doxitem{Option}{option}{options} -%\def\actualchar{ =} % there's a bug in doxitem; quick fix. -\usepackage{fontspec,luatextra} +\usepackage{fontspec} +\usepackage{hologo} \defaultfontfeatures{RawFeature={+liga}} \setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, RawFeature={+mark;+ccmp;+ss05;+ss06}] -\usepackage{arabluatex}[2018/03/31] +\usepackage{arabluatex}[2018/06/24] \usepackage[nopar]{quran} \usepackage[noindex]{nameauth} \usepackage{varioref} \usepackage{hyperxmp} \PassOptionsToPackage{pdfa}{hyperref} \usepackage{hypdoc} +\usepackage{bookmark} \usepackage{authblk} \hypersetup{unicode=true, colorlinks, allcolors=blue, linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The @@ -177,9 +178,15 @@ pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={Arabic language, arabtex, luatex}} \usepackage[scale=1.5]{ccicons} -\usepackage[toc,lot]{multitoc} -\usepackage{paralist} -\setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} +\usepackage[lot]{multitoc} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} +\newlist{enumabjad}{enumerate}{10} +\setlist[enumabjad]{label={\abjad{\arabic*}}} +\usepackage{multicol} \usepackage{cleveref} \usepackage{quoting} \quotingsetup{noorphans, rightmargin=0pt} @@ -189,6 +196,7 @@ \usepackage{longtable} \usepackage{booktabs} \usepackage[defaultlines=3,all]{nowidow} +\usepackage{needspace} \usepackage{tikz} \usepackage[breakable, skins, listings, xparse]{tcolorbox} \DeclareTCBListing{arabluacode}{s O{}}{colback=white, boxrule=.15mm, @@ -213,6 +221,26 @@ \usepackage[style=authoryear, indexing=cite]{biblatex} \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} \addbibresource{arabluatex.bib} +\usepackage{etoc} +\etocsettocdepth{paragraph} +\newcommand{\altableofcontents}{% + \begingroup + \etocsetstyle{section}{}{} + {\etocsavedsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{} + \etocsetstyle{subsection}{}{} + {\etocsavedsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{subsubsection}{}{} + {\etocsavedsubsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip + 0pt plus 1fil\relax \nobreak} + {\noindent\etocname{} \etocpage{} }{\par}% + \etocmulticolstyle[2]{\section*{Contents}} + \pdfbookmark[1]{Contents}{toc} + \tableofcontents + \endgroup} \EnableCrossrefs \RecordChanges \CodelineIndex @@ -229,7 +257,7 @@ % % \fi % -% \CheckSum{728} +% \CheckSum{784} % % \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 @@ -290,21 +318,17 @@ % % \author{Robert Alessi \\ % \href{mailto:alessi@robertalessi.net?Subject=arabluatex}% -% {\texttt{alessi@robertalessi.net}}\thanks{Institutional email: -% \href{mailto:robert.alessi@cnrs.fr?Subject=arabluatex}% -% {\texttt{robert.alessi@cnrs.fr}}}} -% \affil{\normalsize CNRS UMR 8167 Paris (France)} +% {\texttt{alessi@robertalessi.net}}} % \date{} % % \maketitle % \footnotesize -% \tableofcontents -% \pagebreak +% \altableofcontents % \listoftables % \normalsize % % \begin{abstract} -% This package provides for \LuaLaTeX\ an Arab{\TeX}-like interface +% This package provides for \hologo{LuaLaTeX} an Arab{\TeX}-like interface % to generate Arabic writing from an \textsc{ascii} % transliteration. It is particularly well-suited for complex % documents such as technical documents or critical editions where a @@ -330,14 +354,14 @@ % % Please send error reports and suggestions for improvements to Robert % Alessi: -% \begin{compactitem} +% \begin{itemize} % \item email: <\href{mailto:alessi@robertalessi.net?Subject=arabluatex}% % {\texttt{alessi@robertalessi.net}}> % \item website: \url{http://www.robertalessi.net/arabluatex} % \item development: \url{http://git.robertalessi.net/arabluatex} % \item comments, feature requests, bug reports: % \url{https://notabug.org/ralessi/arabluatex/issues} -% \end{compactitem} +% \end{itemize} % % \marginpar{\texttt{gpl3+}} % This program is free software: you can redistribute it and/or modify @@ -356,7 +380,7 @@ % % This release of \package{arabluatex} consists of the following % source files: -% \begin{compactitem} +% \begin{itemize} % \item |arabluatex.ins| % \item |arabluatex.dtx| % \item |arabluatex.lua| @@ -365,7 +389,7 @@ % \item |arabluatex_novoc.lua| % \item |arabluatex_trans.lua| % \item |arabluatex.el| -% \end{compactitem} +% \end{itemize} % % \subsection*{License applicable to this document} % \label{sec:documentation-license} @@ -381,10 +405,10 @@ % % \section{Introduction} % In comparison to Prof. Lagally's outstanding Arab\TeX,\footnote{See -% \url{http://ctan.org/pkg/arabtex}} Arab\LuaTeX\ is at present +% \url{http://ctan.org/pkg/arabtex}} Arab\hologo{LuaTeX} is at present % nothing more than a modest piece of software. Hopefully---if I may % say so---it will eventually provide all of its valuable qualities to -% the \LuaLaTeX\ users. +% the \hologo{LuaLaTeX} users. % % \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 @@ -445,18 +469,18 @@ % lexicons that can be searched, analyzed and correlated in various % ways. % -%\subsection{\package{arabluatex} is for \LuaLaTeX} +%\subsection{\package{arabluatex} is for \hologo{LuaLaTeX}} % It goes without saying that \package{arabluatex} requires -% \LuaLaTeX. \TeX\ and \LaTeX\ have \package{arabtex}, and \XeLaTeX\ -% has \package{arabxetex}. Both of them are much more advanced than -% \package{arabluatex}, as they can process a number of different -% languages,\footnote{\label{fn:arabtex-languages}To date, both -% packages support Arabic, Maghribi, Urdu, Pashto, Sindhi, Kashmiri, -% Uighuric and Old Malay; in addition to these, \package{arabtex} also -% has a Hebrew mode, including Judeo-Arabic and Yiddish.} whereas -% \package{arabluatex} can process only Arabic for the time -% being. More languages will be included in future releases of -% \package{arabluatex}. +% \hologo{LuaLaTeX}. \TeX\ and \LaTeX\ have \package{arabtex}, and +% \hologo{XeLaTeX} has \package{arabxetex}. Both of them are much more +% advanced than \package{arabluatex}, as they can process a number of +% different languages,\footnote{\label{fn:arabtex-languages}To date, +% both packages support Arabic, Maghribi, Urdu, Pashto, Sindhi, +% Kashmiri, Uighuric and Old Malay; in addition to these, +% \package{arabtex} also has a Hebrew mode, including Judeo-Arabic and +% Yiddish.} whereas \package{arabluatex} can process only Arabic for +% the time being. More languages will be included in future releases +% of \package{arabluatex}. % % In comparison to \package{arabxetex}, \package{arabluatex} works in % a very different way. The former relies on the @@ -476,22 +500,22 @@ % % \section{The basics of \package{arabluatex}} % \subsection{Activating \package{arabluatex}} -% As usual put in your preamble:\\ +% \package{arabluatex} is loaded the usual way:\\ % \arabluaverb{\usepackage{arabluatex}}\\ -% The only requirement of \package{arabluatex} is \LuaLaTeX; it will -% complain if you try to compile your document with another +% The only requirement of \package{arabluatex} is \hologo{LuaLaTeX}; +% it will complain if the document is compiled with another % engine. That aside, \package{arabluatex} does not load packages such -% as \package{polyglossia} or \package{luabidi}. It can work with -% \package{polyglossia} though, but does not require it. +% as \package{polyglossia}. Although it can work with +% \package{polyglossia}, it does not require it. % % \paragraph{Font setup} -% If you wish to use your own Arabic font, you can define it before -% loading \package{arabluatex}. Assuming that \package{fontspec} is -% loaded, put this in your preamble just above the line that loads -% \package{arabluatex}: +% Any Arabic font can be defined to be used with +% \package{arabluatex}. For example, assuming that \package{fontspec} +% is loaded, this line may be inserted in the preamble, just above the +% line that loads \package{arabluatex}: % \arabluabox{\cs{newfontfamily}\cs{arabicfont}\marg{fontname}[Script=Arabic]} % \noindent where \meta{fontname} is the standard name of the Arabic -% font you wish to use. +% font to be used. % % By default, if no Arabic font is selected, \package{arabluatex} will % issue a warning message and attempt to load the Amiri @@ -507,7 +531,7 @@ % of the \arb[trans]{kasraT} above the consonant may be obtained by % selecting the |ss05| feature of the Amiri font, like % so:---\footnote{See the documentation of \package{amiri}, -% \textcite[5]{pkg:amiri}.}\\ +% \textcite[6]{pkg:amiri}.}\\ % \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]} % % Other Arabic fonts may behave differently. @@ -544,12 +568,12 @@ % transliterates the Arab\TeX\ input into one of the accepted % standards. At present, three standards are supported (see below % \vref{sec:transliteration} for more details): -% \begin{compactdesc} +% \begin{description} % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which is % selected by default; % \item[loc] \emph{Library of Congress}; % \item[arabica] \emph{Arabica}. -% \end{compactdesc} +% \end{description} % More standards will be included in future releases of % \package{arabluatex}. % @@ -558,7 +582,7 @@ % \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} +% \begin{itemize} % \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 @@ -592,62 +616,61 @@ advisable to use \cs{SetArbEasy}. % \iffalse % % \fi -% \end{compactitem} +% \end{itemize} % -% \DescribeMacro{\SetArbEasy} \NEWfeature{v1.4.4} -% \DescribeMacro{\SetArbEasy*} \DescribeMacro{\SetArbDflt} Such -% refinements as \enquote*{classic} \arb[trans]{maddaT} may be -% discarded by the \cs{SetArb\allowbreak{}Easy} command, either -% globally in the preamble or locally at any point of the -% document. The difference between \cs{SetArbEasy} and its -% \enquote*{starred} version \cs{SetArbEasy*} is that the former keeps -% the \arb[trans]{sukUn} that is generated by the |fullvoc| mode, -% while the latter further takes it away. Default \enquote*{classic} -% rules may be set back at any point of the document with the -% \cs{SetArbDflt} command. \NEWfeature{v1.6} -% \DescribeMacro{\SetArbDflt*}Assimilation rules laid on -% \vref{ref:assimilation} may also be applied by the +% \DescribeMacro{\SetArbEasy} \NEWfeature{v1.4.4} Such refinements as +% \enquote*{classic} \arb[trans]{maddaT} may be discarded by the +% \cs{SetArbEasy} command, either globally in the preamble or locally +% at any point of the document. The difference between \cs{SetArbEasy} +% and its \enquote*{starred} version +% \DescribeMacro{\SetArbEasy*}\cs{SetArbEasy*} is that the former +% keeps the \arb[trans]{sukUn} that is generated by the |fullvoc| +% mode, while the latter further takes it away. Default +% \enquote*{classic} rules may be set back at any point of the +% document with the \DescribeMacro{\SetArbDflt}\cs{SetArbDflt} +% command. \NEWfeature{v1.6} \DescribeMacro{\SetArbDflt*}Assimilation +% rules laid on \vref{ref:assimilation} may also be applied by the % \enquote*{starred} version of this command \cs{SetArbDflt*} either % in the preamble or at any point of the document.\footnote{For an % example, see \vref{sec:poetry-example}.} Examples follow:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \cs{SetArbDflt}: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbDflt*}: -% \begin{compactenum}[i.]\SetArbDflt* +% \begin{enumerate}\SetArbDflt* % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbEasy}: -% \begin{compactenum}[i.]\SetArbEasy +% \begin{enumerate}\SetArbEasy % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbEasy*}: -% \begin{compactenum}[i.]\SetArbEasy* +% \begin{enumerate}\SetArbEasy* % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} -% \end{compactenum} +% \end{enumerate} +% \end{enumerate} % % \iffalse %<*example> @@ -694,9 +717,9 @@ vowels (see §~3). %<*example> % \fi \begin{arabluacode} - \begin{enumerate}[XVI.] + \begin{enumerate}[label=\Roman*., start=16] \item \indent\arb{fawA`ilu}*. - \begin{enumerate}[1.] + \begin{enumerate}[label=\arabic*.] \item \indent\arb{fA`aluN}; as \arb{_hAtamuN} \emph{a signet-ring}, ... \end{enumerate} @@ -755,12 +778,12 @@ vowels (see §~3). % document, as the \cs{arb} command may take any of the |voc|, % |fullvoc|, |novoc| or |trans| modes as optional argument, like % so:--- -% \begin{compactitem} +% \begin{itemize} % \item \DescribeOption{voc} \cs{arb}|[voc]|\marg{Arabic text}; % \item \DescribeOption{fullvoc} \cs{arb}|[fullvoc]|\marg{Arabic text}; % \item \DescribeOption{novoc} \cs{arb}|[novoc]|\marg{Arabic text}; % \item \DescribeOption{trans} \cs{arb}|[trans]|\marg{Arabic text}. -% \end{compactitem} +% \end{itemize} % % The same optional arguments may be passed to the environment |arab|: % one may have \cs{begin}|{arab}|\oarg{mode}|...|\cs{end}|{arab}|, @@ -771,7 +794,8 @@ vowels (see §~3). %\subsection{Consonants} % \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for % all of the Arabic consonants. -% +% +% \needspace{7\baselineskip} % \newcommand{\dmg}[1]{% % \SetTranslitConvention{dmg}% % \arb[trans]{#1}} @@ -782,6 +806,10 @@ vowels (see §~3). % \SetTranslitConvention{arabica}% % \arb[trans]{#1}\SetTranslitConvention{dmg}} % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\ +% (consonants)} +% \endfoot % \captionlistentry{Arab\TeX\ consonants}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -830,8 +858,6 @@ vowels (see §~3). % the letter \arb[novoc]{.y} with no diacritical points below, see % \emph{Rem{.} b.} below.} \\ % \arb[novoc]{T} & \dmg{aT} & \loc{aT} & \brill{aT} & |T| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\ (consonants)} % \end{longtable} % \begin{quoting} % \textsc{Rem.}~\emph{a.} Please note that in all cases of elision, @@ -873,6 +899,10 @@ vowels (see §~3). % the Arab\TeX\ equivalents for some additional Persian characters. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-additional-characters}: Standard +% Arab\TeX\ (additional characters)} +% \endfoot % \captionlistentry{Arab\TeX\ additional characters}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -901,9 +931,6 @@ vowels (see §~3). % \arb[novoc]{g} & \dmg{g} & \loc{g} & \brill{g} & \verb|g| \\ % \arb[novoc]{^n}\footnote{See \cref{fn:not-in-dmg}.} & \dmg{^n} & % \loc{^n} & \brill{^n} & \verb|^n| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-additional-characters}: Standard -% Arab\TeX\ (additional characters)} % \end{longtable} % \begin{quoting} % \textsc{Rem.} The alveolar consonants \arb[novoc]{^c} and @@ -915,8 +942,13 @@ vowels (see §~3). % \subsubsection{Long vowels} % \Cref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for % the Arabic long vowels. -% +% +% \needspace{7\baselineskip} % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-long-vowels}: Standard Arab\TeX\ (long +% vowels)} +% \endfoot % \captionlistentry{Arab\TeX\ long vowels}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -939,8 +971,6 @@ vowels (see §~3). % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\ % \arb[novoc]{B_u} & \dmg{B_u} & \loc{B_u} & \brill{B_u} & \verb|_u| \\ % \arb[novoc]{B_i} & \dmg{B_i} & \loc{B_i} & \brill{B_i} & \verb|_i| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-long-vowels}: Standard Arab\TeX\ (long vowels)} % \end{longtable} % % \begin{quoting} @@ -977,6 +1007,10 @@ vowels (see §~3). % the Arabic short vowels. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-short-vowels}: Standard Arab\TeX\ +% (short vowels)} +% \endfoot % \captionlistentry{Arab\TeX\ short vowels}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -995,8 +1029,6 @@ vowels (see §~3). % \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \brill{BaN} & \verb|aN| \\ % \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \brill{BuN} & \verb|uN| \\ % \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \brill{BiN} & \verb|iN| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-short-vowels}: Standard Arab\TeX\ (short vowels)} % \end{longtable} % % Whether Arabic texts be vocalized or not is essentially a matter of @@ -1021,7 +1053,7 @@ vowels (see §~3). % That said, there is no need to write the short vowels % \arb[trans]{fat.haT}, \arb[trans]{.dammaT} or \arb[trans]{kasraT} % except in the following cases:--- -% \begin{compactitem} +% \begin{itemize} % \item at the commencement of a word, to indicate that a connective % \arb[trans]{'alif} is needed, with the exception of the article (see % below \vref{sec:quoting}); @@ -1029,7 +1061,7 @@ vowels (see §~3). % analysis to determine the carrier of the \arb[trans]{hamzaT}; % \item in the various transliteration modes, as vowels are always % expressed in romanized Arabic. -% \end{compactitem} +% \end{itemize} % %\section{\package{arabluatex} in action} %\subsection{The vowels and diphthongs} @@ -1055,19 +1087,19 @@ vowels (see §~3). % \arb[voc]{murU'aTuN} \arb[trans]{murU'aTuN}. % \end{quote} % -% \paragraph{\arb[trans]{'alif maq.sUraT}} It is written \meta{\_A} or -% \meta{Y}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif maq.sUraT}}{ʾalif +% maqṣūrah}} It is written \meta{\_A} or \meta{Y}: % \begin{quote} % |al-fat_A| \arb[voc]{al-fat_A} \arb[trans]{al-fat_A}, |al-maqh_A| % \arb[voc]{al-maqh_A} \arb[trans]{al-maqh_A}, |'il_A| % \arb[voc]{'il_A} \arb[trans]{'il_A}. % \end{quote} % -% \paragraph{\arb[trans]{'alif} \emph{otiosum}} Said -% \arb[trans]{'alif-u 'l-wiqAyaT-i}, \enquote{the guarding -% \arb[trans]{'alif}}\,, after \arb[novoc]{U} at the end of a word, both -% when preceded by \arb[trans]{.dammaT} and by \arb[trans]{fat.haT} is -% written \meta{UA} or \meta{aW, aWA}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif} \emph{otiosum}}{ʾalif +% otiosum}} Said \arb[trans]{'alif-u 'l-wiqAyaT-i}, \enquote{the +% guarding \arb[trans]{'alif}}\,, after \arb[novoc]{U} at the end of a +% word, both when preceded by \arb[trans]{.dammaT} and by +% \arb[trans]{fat.haT} is written \meta{UA} or \meta{aW, aWA}: % \begin{quote} % |na.sarUA| \arb[voc]{na.sarUA} \arb[trans]{na.sarUA}, |katabUA| % \arb[voc]{katabUA} \arb[trans]{katabUA}, |ya.gzUA| @@ -1076,8 +1108,9 @@ vowels (see §~3). % \arb[fullvoc]{banaWA}, \arb[trans]{banaWA}. % \end{quote} % -% \paragraph{\arb[trans]{'alif ma.h_dUfaT} and defective \arb[trans]{U, -% I}} They are written \meta{\_a, \_i \_u}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif ma.h_dUfaT} and +% defective \arb[trans]{U, I}}{ʾalif maḥḏūfah and defective ū, ī}} +% They are written \meta{\_a, \_i \_u}: % \begin{quote} % |al-l_ah-u| \arb[voc]{al-l_ah-u} \arb[trans]{al-l_ah-u}, % |'il_ahuN| \arb[voc]{'il_ahuN} \arb[trans]{'il_ahuN}. @@ -1092,7 +1125,8 @@ vowels (see §~3). % \arb[trans]{al-\uc{`A.s_i}}. % \end{quote} % -% \paragraph{Silent \arb[novoc]{U}/\arb[novoc]{I}} +% \paragraph{\texorpdfstring{Silent +% \arb[novoc]{U}/\arb[novoc]{I}}{Silent ي/و}} % 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 that @@ -1110,11 +1144,12 @@ vowels (see §~3). % \arb[trans]{al-rib_aIT-u}. % \end{quote} % -% \paragraph{\arb[trans]{\uc{`amruNU}}, and the silent -% \arb[novoc]{U}} To that name a silent \arb[novoc]{U} is added to -% distinguish it from \arb[trans]{\uc{`umar-u}}: 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: +% \paragraph{\texorpdfstring{\arb[trans]{\uc{`amruNU}}, and the silent +% \arb[novoc]{U}}{ʿAmrun, and the silent و}} To that name a silent +% \arb[novoc]{U} is added to distinguish it from +% \arb[trans]{\uc{`umar-u}}: 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: % \begin{quote} % |`amruNU| \arb[voc]{`amruNU} \arb[trans]{`amruNU}, |`amraNU| % \arb[voc]{`amraNU} \arb[trans]{`amraNU}, |`amriNU| @@ -1133,7 +1168,7 @@ vowels (see §~3). % \arb[trans]{ribaNU}. % \end{quote} % -%\paragraph{\arb[trans]{tanwIn}} +% \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}} % The marks of doubled short vowels, \arb{BuN}, \arb{BaN}, \arb{BiN}, % are written \meta{uN, aN, iN} respectively. \package{arabluatex} % deals with special cases, such as \arb{BaN} taking an \arb[novoc]{A} @@ -1166,7 +1201,7 @@ vowels (see §~3). % \end{quote} % % \subsection{Other orthographic signs} -% \paragraph{\arb[trans]{tA' marbU.taT}} +% \paragraph{\texorpdfstring{\arb[trans]{tA' marbU.taT}}{tāʾ marbūṭah}} % It is written \meta{T}: % \begin{quote} % |madInaTuN| \arb[voc]{madInaTuN} \arb[trans]{madInaTuN}, @@ -1174,11 +1209,11 @@ vowels (see §~3). % |madInaTiN| \arb[voc]{madInaTiN} \arb[trans]{madInaTiN}. % \end{quote} % -% \paragraph{\arb[trans]{hamzaT}} \label{ref:hamza}It is written -% \meta{\texttt{'}}, its carrier being determined by contextual -% analysis. In case one wishes to bypass this mechanism, he can use -% the \enquote{quoting} feature that is described below in -% \vref{sec:quoting}. +% \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}} +% \label{ref:hamza}It is written \meta{\texttt{'}}, its carrier being +% determined by contextual analysis. In case one wishes to bypass this +% mechanism, he can use the \enquote{quoting} feature that is +% described below in \vref{sec:quoting}. % \begin{quote} % \textbf{Initial \arb[trans]{hamzaT}}: |'asaduN| \arb[voc]{'asaduN} % \arb[trans]{'asaduN}, |'u_htuN| \arb[voc]{'u_htuN} @@ -1300,14 +1335,14 @@ vowels (see §~3). % \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}. % \end{quote} % -% \paragraph{\arb[trans]{maddaT}} \label{ref:madda}At the beginning of -% a syllabe, \arb[trans]{'alif} with \arb[trans]{hamzaT} and -% \arb[trans]{fat.haT} (\arb[voc]{'a}) followed by \arb[trans]{'alifu -% 'l-maddi} (\arb[trans]{'alif} of prolongation) or \arb[trans]{'alif} -% with \arb[trans]{hamzaT} and \arb[trans]{jazmaT} (\arb[voc]{a"'"}) -% are both represented in writing \arb[trans]{'alif} with -% \arb[trans]{maddaT}: \arb[voc]{A"'} \parencite[see][i. 25 -% A--B]{Wright}. +% \paragraph{\texorpdfstring{\arb[trans]{maddaT}}{maddah}} +% \label{ref:madda}At the beginning of a syllabe, \arb[trans]{'alif} +% with \arb[trans]{hamzaT} and \arb[trans]{fat.haT} (\arb[voc]{'a}) +% followed by \arb[trans]{'alifu 'l-maddi} (\arb[trans]{'alif} of +% prolongation) or \arb[trans]{'alif} with \arb[trans]{hamzaT} and +% \arb[trans]{jazmaT} (\arb[voc]{a"'"}) are both represented in +% writing \arb[trans]{'alif} with \arb[trans]{maddaT}: \arb[voc]{A"'} +% \parencite[see][i. 25 A--B]{Wright}. % % \iffalse %<*example> @@ -1337,13 +1372,13 @@ vowels (see §~3). % \arb[voc]{yaxba'Ani} \arb[trans]{yaxba'Ani}. % \end{quote} % -% \paragraph{\arb[trans]{^saddaT}} +% \paragraph{\texorpdfstring{\arb[trans]{^saddaT}}{šaddah}} % \arb[trans]{ta^sdId} is either \emph{necessary} or \emph{euphonic}. % -% \subparagraph{The necessary -% \arb[trans]{ta^sdId}} \label{ref:necessary-tashdid}always follows a -% vowel, whether short or long \parencite[see][i. 15 A--B]{Wright}. It -% is encoded in writing the consonant that carries it twice: +% \subparagraph{The necessary \arb[trans]{ta^sdId}} +% \label{ref:necessary-tashdid}always follows a vowel, whether short +% or long \parencite[see][i. 15 A--B]{Wright}. It is encoded in +% writing the consonant that carries it twice: % \begin{quote} % |`allaqa| \arb[voc]{`allaqa} \arb[trans]{`allaqa}, |mAdduN| % \arb[voc]{mAdduN} \arb[trans]{mAdduN}, |'ammara| @@ -1355,7 +1390,7 @@ vowels (see §~3). % \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)] +% \begin{enumerate} % \item With the \emph{solar} letters \arb[novoc]{t}, \arb[novoc]{_t}, % \arb[novoc]{d}, \arb[novoc]{_d}, \arb[novoc]{r}, \arb[novoc]{z}, % \arb[novoc]{s}, \arb[novoc]{^s}, \arb[novoc]{.s}, \arb[novoc]{.d}, @@ -1419,9 +1454,11 @@ vowels (see §~3). % \arb[voc]{labi_ttu} \arb[trans]{labi_ttu}, will be discarded here, % as it is largely condemned by the % grammarians \parencite[see][i. 16 B--C]{Wright}. -% \end{compactenum} +% \end{enumerate} % -% \paragraph{The definite article and the \arb[trans]{'alif-u 'l-wa.sl-i}} +% \paragraph{\texorpdfstring{The definite article and the +% \arb[trans]{'alif-u 'l-wa.sl-i}}{The definite article and the ʾalifu +% 'l-waṣli}} % \label{ref:definite-article} % At the beginning of a sentence, \arb[fullvoc]{"a} is never written, % as \arb[fullvoc]{'l-.hamd-u li-ll_ah-i}; instead, to indicate that @@ -1438,7 +1475,7 @@ vowels (see §~3). % doing that automatically provided that the vowel which is to be % absorbed by the final vowel of the preceding word be properly % encoded, like so:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Definite article at the beginning of a sentence is encoded\\ % \arabluaverb{al-}, or \arabluaverb{a-}\\ if one % wishes to mark the assimilation---which is in no way required, as @@ -1448,7 +1485,7 @@ vowels (see §~3). % \item In all remaining cases of elision, the \arb[trans]{'alifu % 'l-wa.sli} is expressed by the vowel that accompanies the omitted % \arb[trans]{hamzaT}: \meta{u, a, i}. -% \end{compactenum} +% \end{enumerate} % \begin{quote} % \textbf{Article}: |bAb-u| |'l-madrasaT-i| \arb[fullvoc]{bAb-u % 'l-madrasaT-i} \arb[trans]{bAb-u 'l-madrasaT-i}, @@ -1466,7 +1503,7 @@ vowels (see §~3). % 'l-najm-a} \arb[trans]{fa-lammA ra'aW 'l-najm-a}. % % \textbf{Particles}:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \arb[trans]{li-}: \arb[trans]{'alif-u 'l-wa.sl-i} is omitted % in the article \arb[fullvoc]{al} when it is preceded by the % preposition \arb[fullvoc]{li}: |li-l-rajul-i| @@ -1486,7 +1523,7 @@ vowels (see §~3). % |bi-'l-|\allowbreak|qalam-i| \arb[fullvoc]{bi-'l-qalam-i} % \arb[trans]{bi-'l-qalam-i}, |bi-'l-ru`b-i| % \arb[fullvoc]{bi-'l-ru`b-i} \arb[trans]{bi-'l-ru`b-i}. -% \end{compactenum} +% \end{enumerate} % % \textbf{Perfect active, imperative, nomen actionis}: |qAla| % |isma`| \arb[fullvoc]{qAla isma`} \arb[trans]{qAla isma`}, |qAla| @@ -1581,11 +1618,11 @@ vowels (see §~3). % |mu.hammaduN| |'l-nabI| \arb[fullvoc]{mu.hammaduN 'l-nabI} % \arb[trans]{\uc{m}u.hammaduN 'l-nabI}, |salAmuN| |ud_hulUA| % \arb[fullvoc]{salAmuN ud_hulUA} \arb[trans]{salAmuN ud_hulUA}, -% |qa.sIdata-hu| |fI| |qatl-i| |\uc{'a}bI| |\uc{m}uslimiN| -% |'llatI| |yaqUlu| |fI-hA| \arb[fullvoc]{qa.sIdata-hu fI qatl-i -% \uc{'a}bI \uc{m}uslimiN 'llatI yaqUlu fI-hA} -% \arb[trans]{qa.sIdata-hu fI qatl-i \uc{'a}bI \uc{m}uslimiN -% 'llatI yaqUlu fI-hA}. +% |qa.sIdata-hu| |fI| |qatl-i| |\uc{'a}bI| +% |\uc{m}|\allowbreak|uslimiN| |'llatI| |yaqUlu| |fI-hA| +% \arb[fullvoc]{qa.sIdata-hu fI qatl-i \uc{'a}bI \uc{m}uslimiN +% 'llatI yaqUlu fI-hA} \arb[trans]{qa.sIdata-hu fI qatl-i \uc{'a}bI +% \uc{m}uslimiN 'llatI yaqUlu fI-hA}. % \end{quote} % % \subsection{Special orthographies} @@ -1627,7 +1664,8 @@ vowels (see §~3). % \arb[trans]{li-l-l_ah-i 'l-qA'il-u}. % \end{quote} % -% \paragraph{The conjunctive \arb[voc]{alla_dI}} +% \paragraph{\texorpdfstring{The conjunctive \arb[voc]{alla_dI}}{The +% conjunctive اَلَّذِي}} % Although it is compounded of the article \arb[fullvoc]{al}, the % demonstrative letter \arb[novoc]{l} and the demonstrative pronoun % \arb[voc]{_dA}, both masculine and feminine forms that are written @@ -1705,7 +1743,7 @@ vowels (see §~3). % % \paragraph{\texttt{novoc}} In this mode, \enquote{quoting} % essentially means make visible something that ought not to be so. -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Quoting a vowel, either short or long, makes the % \arb[trans]{.dammaT}, \arb[trans]{fat.haT} or \arb[trans]{kasraT} % appear above the appropriate consonant:--- @@ -1739,13 +1777,13 @@ vowels (see §~3). % "inhazama} \arb[trans]{huwa "inhazama}, |al-"intiqA.d-u| % \arb[novoc]{al-"intiqA.d-u} \arb[trans]{al-"intiqA.d-u}. % \end{quote} -% \end{compactenum} +% \end{enumerate} % % \paragraph{\texttt{voc}} % In accordance with the general rule, in this mode, \enquote{quoting} % makes the vowels and the \arb[trans]{tanwIn} disappear, should this % feature be required for some reason:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Short and long vowels:--- % \begin{quote} % |q"Ala q"A'iluN| \arb[voc]{q"Ala q"A'iluN} \arb[trans]{q"Ala @@ -1760,12 +1798,12 @@ vowels (see §~3). % \arb[voc]{hud"aN_A} \arb[trans]{hud"aN_A}, |^say'"iN| % \arb[voc]{^say'"iN} \arb[trans]{^say'"iN}. % \end{quote} -% \end{compactenum} +% \end{enumerate} % One may more usefully \enquote{quote} the initial vowels to write % the \arb[trans]{wa.slaT} above the \arb[trans]{'alif} or insert a % straight double quote after a consonant not followed by a vowel to % make the \arb[trans]{sukUn} appear:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \arb[trans]{'alif-u 'l-wa.sl-i}:--- % \begin{quote} % |fI "istiq.sA'-iN| \arb[voc]{fI "istiq.sA'-iN} \arb[trans]{fI @@ -1784,7 +1822,7 @@ vowels (see §~3). % \arb[trans]{kam" qad" ma.dat" min" % laylaTiN}.\label{ref:quoted-sukun-e} % \end{quote} -% \end{compactenum} +% \end{enumerate} % % \paragraph{\texttt{fullvoc}} % In this mode, \enquote{quoting} can be used to take away any short @@ -1809,27 +1847,29 @@ vowels (see §~3). % possible carriers the \arb[trans]{hamzaT} may take. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:quoted-hamza}: \enquote{Quoted} +% \arb[trans]{hamzaT}} +% \endfoot % \captionlistentry{\enquote{Quoted} \arb[trans]{hamzaT}}\\[-1em] -% \toprule -% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} +% \toprule Letter & \multicolumn{3}{l}{Transliteration\footnotemark} % & Arab\TeX\ notation \\ -% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule % \endfirsthead -% \toprule -% Letter & \multicolumn{3}{l}{Transliteration} +% \toprule Letter & \multicolumn{3}{l}{Transliteration} % & Arab\TeX\ notation \\ -% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule -% \endhead \footnotetext{See below \vref{sec:transliteration}.} +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endhead +% \footnotetext{See below \vref{sec:transliteration}.} % \label{tab:quoted-hamza} % \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \brill{|"'} & \verb+|"'+ \\ +% \pagebreak[1] % \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \brill{A"'} & \verb|A"'| \\ % \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \brill{a"'} & \verb|a"'| \\ % \arb[novoc]{u"'} & \dmg{u"'} & \loc{u"'} & \brill{u"'} & \verb|u"'| \\ % \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \brill{w"'} & \verb|w"'| \\ % \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \brill{i"'} & \verb|i"'| \\ % \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \brill{y"'} & \verb|y"'| \\ -% \bottomrule -% \caption*{\Cref*{tab:quoted-hamza}: \enquote{Quoted} \arb[trans]{hamzaT}} % \end{longtable} % % As one can see from \vref{tab:quoted-hamza}, the carrier of the @@ -1888,7 +1928,7 @@ vowels (see §~3). \begin{arabluacode} This is wrong: \begin{arab}[fullvoc] - fa-lammA ra'aW\LRfootnote{A footnote that interferes with the + fa-lammA ra'aW\LRfootnote{A footnote which interferes with the contextual analysis.} 'l-na^gma... \end{arab} \end{arabluacode} @@ -1924,20 +1964,23 @@ word that \cs{arbnull} is applied to. % \fi \begin{arabluacode} \begin{arab}[fullvoc] - fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote that + fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote which interferes with the contextual analysis.} 'l-na^gma... - qAla\LRfootnote{A footnote that interferes with the contextual + qAla\LRfootnote{A footnote which interferes with the contextual analysis.} \arbnull{qAla}uhrub fa-lan tuqtala. - \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes - with the contextual analysis.} \arbnull{zayduN}ibn-u - \uc{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which + interferes with the contextual analysis.} + \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See + \vref{fn:zayd-is-son}.} \end{arab} + \begin{arab}[trans] - \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes - with the contextual analysis.} \arbnull{zayduN}ibn-u - \uc{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which + interferes with the contextual analysis.} + \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See + \vref{fn:zayd-is-son}.} \end{arab} \end{arabluacode} % \iffalse @@ -2009,6 +2052,24 @@ word that \cs{arbnull} is applied to. % \end{quote} % \end{quoting} % +% \NEWfeature{v1.12}\cs{abjad} may also be used to convert values of +% counters into \arb[trans]{'ab^gad} numbers, like so:--- % +% \changes{v1.12}{2018/06/24}{\cs{abjad} can now process \LaTeX\ +% counters}% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + The \arb[trans]{'ab^gad} number for the current page (\thepage) is + \abjad{\thepage}. +\end{arabluacode} +% \iffalse +% +% \fi% +% +% This technique can be used to produce abjad-numbered lists as will +% be demonstrated \vpageref{ref:abjad-list}. +% % \subsection{Additional characters} % \label{sec:additional-characters} % In the manuscripts, the unpointed letters, \arb[trans]{al-.hurUfu @@ -2022,6 +2083,10 @@ word that \cs{arbnull} is applied to. % % For the time being, the following is included:--- % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:additional-arabic-codings}: Additional Arabic +% codings} +% \endfoot % \captionlistentry{Additional Arabic codings}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -2041,10 +2106,8 @@ word that \cs{arbnull} is applied to. % \arb[novoc]{.k} & \dmg{.k} & \loc{.k} & \brill{.k} & |.k| \\ % \arb[novoc]{.n} & \dmg{.n} & \loc{.n} & \brill{.n} & |.n| \\ % \arb[novoc]{((} & \dmg{((} & \loc{((} & \brill{((} & |((| \\ +% \pagebreak % \arb[novoc]{))} & \dmg{))} & \loc{))} & \brill{))} & |))| \\ -% \bottomrule -% \caption*{\Cref*{tab:additional-arabic-codings}: Additional Arabic -% codings} % \end{longtable} % % \begin{quote} @@ -2167,7 +2230,7 @@ word that \cs{arbnull} is applied to. % to the following or the preceding ones over the % \arb[trans]{tadwIr}. The optional argument of the \cs{bayt} command % is designed to deal with the various situations that may arise:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item If the two hemistichs be connected with one another by a % prominent horizontal flexible stroke, the \arb[trans]{ta.twIl} should % be used, like so: |[--]| (see \vref{sec:tatwil}). Of course, the @@ -2238,7 +2301,7 @@ word that \cs{arbnull} is applied to. % write it all inside the \arb[trans]{tadwIr}. In that case, as the % word is to be placed in the middle, it has been surrounded by % spaces. -% \end{compactenum} +% \end{enumerate} % % \paragraph{Scaling and distortion of characters} % The |arabverse| environment and the \cs{bayt} command are designed @@ -2255,9 +2318,11 @@ word that \cs{arbnull} is applied to. % there are two easy ways to have them printed. % % If they are little in number, each footnote may be split into pairs -% of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces) in -% the argument of the \cs{bayt} command and \cs{footnotetext} outside -% the \cs{bayt} command. +% of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces or +% \enquote{declare} |footnotemark| using \cs{MkArbBreak} to take it +% out of the Arabic environment\footnote{See +% \vref{sec:declare-new-commands}.}) in the argument of the \cs{bayt} +% command and \cs{footnotetext} outside the \cs{bayt} command. % % If the footnotes are abundant in number, it is advised to load the % \package{footnotehyper} package which \package{arabluatex} will then @@ -2368,6 +2433,7 @@ word that \cs{arbnull} is applied to. % % \section{Special applications} % \label{sec:special-applications} +% \phantomsection % \paragraph{Linguistics} % The same horizontal stroke as the \arb[trans]{ta.twIl} (see % \vref{sec:tatwil}) may be encoded \meta{B}; \meta{BB} will receive @@ -2381,18 +2447,19 @@ word that \cs{arbnull} is applied to. % \end{quote} % % \paragraph{Brackets} +% \phantomsection % \NEWfeature{v1.4.3} The various bracket symbols are useful in % technical documents such as critical editions for indicating that % some words or some letters must be added or % removed. \package{arabluatex} will automatically fit those symbols % to the direction of the text. For the time being, the following % symbols are supported: -% \begin{compactitem} +% \begin{itemize} % \item parentheses: |()| % \item square brackets: |[]| % \item angle brackets: |<>| % \item braces: |{}| -% \end{compactitem} +% \end{itemize} % % \DescribeMacro{\abraces} Parentheses, square and angle brackets may % be input directly at the keyboard; however, words or letters that @@ -2412,6 +2479,7 @@ word that \cs{arbnull} is applied to. % \fi % % \paragraph{Additional Arabic marks} +% \label{sec:arabic-marks} % In addition to common letters, many symbols and ligatures are % encoded in Arabic Unicode standard, such as honorifics consisting of % complex ligatures, and annotation signs used in the @@ -2424,6 +2492,10 @@ word that \cs{arbnull} is applied to. % a default list which consists of the following % at the time of writing:---\\ % \begin{longtable}{llp{.3\linewidth}p{.3\linewidth}} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic +% marks} +% \endfoot % \captionlistentry{Additional Arabic marks}\\[-1em] % \toprule % Codepoint & Shorthand & Glyph & Transliteration \\ \midrule @@ -2436,16 +2508,13 @@ word that \cs{arbnull} is applied to. % |FDF5| & |salam| & \arb{\arbmark{salam}} & \arbmark{salam} \\ % |FDFA| & |slm| & \arb{\arbmark{slm}} & \arbmark{slm} \\ % |FDFB| & |jalla| & \arb{\arbmark{jalla}} & \arbmark{jalla} \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic -% marks} % \end{longtable} % % \DescribeMacro{\newarbmark} \NEWfeature{v1.11} \cs{newarbmark} is % also provided should one wish to define new marks in addition to the % marks defined above. This command takes three arguments, like so:--- % \arabluabox{\cs{newarbmark}\marg{shorthand}\marg{RTL -% codepoint}\marg{LTR rendition}}. +% codepoint}\marg{LTR rendition}} % % As regards the right-to-left codepoint, it may be either typed in % Unicode or selected as Unicode codepoint. To that end, the \LaTeX\ @@ -2474,15 +2543,15 @@ word that \cs{arbnull} is applied to. % \fi% % % The example below provides an implementation of this technique. It -% may be observed that \cs{textcolor} is used so as to have the marks +% may be observed that \cs{arbcolor} is used so as to have the marks % printed in red:---% % \iffalse %<*example> % \fi \begin{arabluacode} \SetArbDflt* - \newarbmark{sly}{\textcolor{red}{^^^^06d6}}{} - \newarbmark{jim}{\textcolor{red}{^^^^06da}}{} + \newarbmark{sly}{\arbcolor[red]{^^^^06d6}}{} + \newarbmark{jim}{\arbcolor[red]{^^^^06da}}{} \begin{arab} sUraTu 'l-nisA'i, 19: \end{arab} @@ -2505,6 +2574,335 @@ word that \cs{arbnull} is applied to. % % \fi % +% \section{Color} +% \label{sec:color} +% \NEWfeature{v1.12}\package{arabluatex} is able to render in color +% either words, parts of words or diacritics. As the techniques +% implemented in this section may lead to some complexity, the reader +% should first become well acquainted with the following +% points:\footnote{Regarding the colors themselves and the way new +% colors can be defined in addition to those that are already +% available, please refer to the \package{xcolor} package.}--- +% \begin{enumerate} +% \item The \enquote{pipe} character (\textbar, \vref{sec:pipe}); +% \item \enquote*{Quoting} technique (\vref{sec:quoting}), and more +% specifically \enquote*{quoting the \arb[trans]{hamzaT}} +% (\vpageref{sec:quoting-hamza}); +% \item Putting back on broken contextual analysis rules +% (\vref{sec:arbnull}); +% \item Arabic marks (\vref{sec:arabic-marks}). +% \end{enumerate} +% +% \DescribeMacro{\arbcolor} \cs{arbcolor} takes the text to be colored +% into \meta{color} as an argument:--- +% \arabluabox{\cs{arbcolor}\oarg{color}\marg{Arabic text}} +% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \begin{arab} + \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i + 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN + min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN + kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna + `alay-hi... + \end{arab} + \begin{arab}[trans] + \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i + 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN + min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN + kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna + `alay-hi... + \end{arab} +\end{arabluacode} +% \iffalse +% +% \fi +% +% As this example shows, \cs{arbcolor} has been used to render +% headings in red with the same encoding both in vocalized and in +% romanized Arabic. The same technique also applies to syllabes inside +% words. \package{arabluatex} takes care of selecting the appropriate +% shape of the letters while coloring them:--- +% \begin{quote}\textbf{\enquote*{voc} mode}:\\ +% |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}| +% |'a`\arbcolor[blue]{^ga}ba-ka| +% \arb{i^stara\arbcolor[brown]{y}tu-hu bi-_tama\arbcolor[red]{niN} +% 'a`\arbcolor[blue]{^ga}ba-ka} +% \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}. +% \end{quote} +% \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\ +% |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}| +% |'a`\arbcolor[blue]{^ga}ba-ka| +% \arb[fullvoc]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka} +% \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}. +% \end{quote} +% +% \subsection{Tricks of the trade} +% \label{sec:color-tricks} +% \paragraph{Diacritics} +% Depending on the mode selected, either |voc|, |novoc| or |fullvoc|, +% coloring the diacritics requires more attention for the insertion of +% \cs{arbcolor} may prevent contextual analysis from being applied. +% +% Furthermore, depending on the surrounding letters, the standard +% encoding of short vowels \meta{u, a, i} may result either in +% diacritics or in a connective \arb[trans]{'alif} with the +% \arb[trans]{wa.slaT} or its accompanying vowel. As for the +% \arb[trans]{sukUn}, it is generated by contextual analysis. Thus +% applying colors to bare diacritics requires them to have specific +% encodings. +% +% \Cref{tab:arbcolor-diacritics} gives the Arab\TeX\ equivalents for +% the diacritics to be printed inside or just after \cs{arbcolor}. +% +% \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arbcolor-diacritics}: Arab\TeX\ diacritics +% for \cs{arbcolor}} +% \endfoot +% \captionlistentry{Arab\TeX\ diacritics for \cs{arbcolor}}\\[-1em] +% \toprule +% Diacritic & \multicolumn{3}{l}{Transliteration\footnotemark} +% & Arab\TeX\ notation \\ +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endfirsthead +% \toprule +% Diacritic & \multicolumn{3}{l}{Transliteration} +% & Arab\TeX\ notation \\ +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endhead \footnotetext{See below \vref{sec:transliteration}.} +% \label{tab:arbcolor-diacritics} +% \arb{B.a} & \dmg{.a} & \loc{.a} & \brill{.a} & \verb|.a| \\ +% \pagebreak[1] +% \arb{B.u} & \dmg{.u} & \loc{.u} & \brill{.u} & \verb|.u| \\ +% \arb{B.i} & \dmg{.i} & \loc{.i} & \brill{.i} & \verb|.i| \\ \midrule +% \arb{Bo} & \dmg{o} & \loc{o} & \brill{o} & \verb|o| \\ +% \end{longtable} +% +% The following examples show how the letters, or the diacritics above +% or under them or both the letters and the diacritics can be rendered +% in different colors:--- +% \begin{quote}\textbf{\enquote*{voc} mode}:\\ +% |i^staraytu-hu| |bi-_taman\arbcolor[red]{iN}| +% |'a`^g\arbcolor[red]|\allowbreak|{.a}ba-ka| +% \arb{i^staraytu-hu bi-_taman\arbcolor[red]{iN} +% 'a`^g\arbcolor[red]{.a}ba-ka} +% \arb[trans]{i^staraytu-hu bi-_taman\arbcolor[red]{iN} +% 'a`^g\arbcolor[red]{.a}ba-ka}. +% +% |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}iN| +% |'a`\arbcolor[red]|\allowbreak|{^g}.aba-ka| +% \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN +% 'a`\arbcolor[red]{^g}.aba-ka} +% \arb[trans]{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN +% 'a`\arbcolor[red]{^g}.aba-ka}. +% +% |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN}| +% |'a`\arbcolor[red]|\allowbreak|{^g}\arbcolor[blue]{.a}ba-ka| +% \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka} \linebreak +% \arb[trans]{i^staraytu-hu +% bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka}. +% \end{quote} +% +% \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\ +% |i^staray"\arbcolor[red]{o}tu-hu| |bi-_taman"\arbcolor[red]{iN}| +% |'a`^g"\arbcolor[red]{.a}ba-ka| +% \arb[fullvoc]{i^staray"\arbcolor[red]{o}tu-hu +% bi-_taman"\arbcolor[red]{iN} 'a`^g"\arbcolor[red]{.a}ba-ka} +% \arb[trans]{i^staray"\arbcolor[red]{o}tu-hu +% bi-_taman"\arbcolor[red]{iN} +% \linebreak 'a`^g"\arbcolor[red]{.a}ba-ka}. +% +% |i^stara\arbcolor[red]{y"}otu-hu| |bi-_tama\arbcolor[red]{n"}iN| +% |'a`\arbcolor[red]|\allowbreak|{^g"}.aba-ka| +% \arb[fullvoc]{i^stara\arbcolor[red]{y"}otu-hu +% bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka} +% \arb[trans]{i^stara\arbcolor[red]{y"}otu-hu +% bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka}. +% +% |i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu| +% |bi-_tama\arb|\allowbreak|color[red]{n"}\arbcolor[blue]{iN}| +% |'a`\arbcolor[red]|\allowbreak|{^g"}\arb|\allowbreak% +% |color[blue]{.a}ba-ka| +% \arb[fullvoc]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu +% bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka} +% \arb[trans]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu +% bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka}. +% \end{quote} +% +% As can be seen, |fullvoc| required the letters |y|, |n| and |^g| +% before \cs{arbcolor} to be \enquote*{quoted}. Otherwise, unwanted +% \arb[trans]{sukUn}\txtrans{s} would have been generated because of +% the absence of a vowel after those consonants. +% +% \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}} +% \cs{arbnull} must be used with \arb[trans]{fat.haTAn} (\arb{BaN}) so +% as to put back on contextual analysis rules:--- +% \begin{quote} +% |mu`allim\arbcolor[red]{\arbnull{m}aN}| +% \arb{mu`allim\arbcolor[red]{\arbnull{m}aN}} +% \arb[trans]{mu`allim\arbcolor[red]{\arbnull{m}aN}},\\ +% |istisqA'\arbcolor[red]{\arbnull{A'}aN}| +% \arb{istisqA'\arbcolor[red]{\arbnull{A'}aN}} +% \arb[trans]{istisqA'\arbcolor[red]{\arbnull{A'}aN}},\\ +% |^say'\arbcolor[red]{\arbnull{ay'}aN}| +% \arb{^say'\arbcolor[red]{\arbnull{ay'}aN}} +% \arb[trans]{^say'\arbcolor[red]{\arbnull{ay'}aN}},\\ +% \verb+^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}+ +% \arb{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}} +% \arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}. +% \end{quote} +% \begin{quoting} +% \textsc{Rem.} Note that in the last example +% (\arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}), the +% \enquote*{pipe} character has been inserted before +% \cs{arbcolor}. Otherwise, the |dmg| mode of the transliteration +% rules would have interpreted the \arb[trans]{tA' marbU.taT} as +% \emph{final} (e.g. \txtrans{h} instead of the expected +% \txtrans{t}).\footnote{See also \vpageref{ref:ta-marbutah-pipe} +% \enquote{Discarding the \arb[trans]{'i`rAb}} for more +% information.} +% \end{quoting} +% +% The \arb[trans]{tanwIn} preceding a \arb[novoc]{_A} conveys even +% more intricate business to the rendering with the utmost accuracy in +% both romanized and non-romanized modes. First, a new Arabic mark +% needs to be defined. It should print \arb[novoc]{_A} in Arabic +% script and not a thing in transliteration. It is to be appended after +% \cs{arbcolor}, like so:--- +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{Y}{^^^^0649}{} + \arb{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}} + \arb[trans]{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}} +\end{arabluacode} +% \iffalse +% +% \fi% +% +% \paragraph{\texorpdfstring{\arb[trans]{wa.slaT} and +% \arb[trans]{maddaT}}{waṣlah and maddah}} +% Both can be generated with the help of \cs{arbnull}:--- +% \begin{quote} +% |wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN| +% \arb[fullvoc]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN} +% \arb[trans]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN}\footnote{To +% the knowledge of the writer, the \arb[trans]{wa.slaT} alone is not +% part of the Arabic Unicode block.}. +% +% |fI| |"al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i| +% \arb[fullvoc]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i} +% \linebreak +% \arb[trans]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i}. +% +% |\arbcolor[red]{'a'\arbnull{k}}kulu| +% \arb{\arbcolor[red]{'a'\arbnull{k}}kulu} +% \arb[trans]{\arbcolor[red]{'a'\arbnull{k}}kulu},\\ +% |\arbcolor[red]{'A\arbnull{k}}kiluN| +% \arb{\arbcolor[red]{'A\arbnull{k}}kiluN} +% \arb[trans]{\arbcolor[red]{'A\arbnull{k}}kiluN}. +% \end{quote} +% +% The Unicode codepoint of the \arb[trans]{maddaT} is 0653, while bare +% \arb[trans]{'alif} is 0627. So:--- % +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{alifmaddahred}{^^^^0627\arbcolor[red]{^^^^0653}}% + {\arb[trans]{\arbcolor[red]{'a'\arbnull{k}}}} + \arb{\arbmark{alifmaddahred}kulu} + \arb[trans]{\arbmark{alifmaddahred}kulu}. +\end{arabluacode} +% \iffalse +% +% \fi% +% +% \begin{quoting} +% \textsc{Rem.} In the preceding example, any consonant could have +% been passed as argument to the \cs{arbnull} command. +% \end{quoting} +% +% \paragraph{\texorpdfstring{\arb[trans]{^sad\-daT}}{šaddah}} +% In the following example, it is assumed that the +% \arb[trans]{^saddaT} above the letter \arb[novoc]{l} in +% \arb[fullvoc]{al-mu`allimUna}, \arb[trans]{al-mu`allimUna}, is to be +% rendered in red. Thus the Arabic mark must generate the +% \arb[trans]{^saddaT} alone---of which the Unicode codepoint is +% 0651---in Arabic script and the letter \enquote*{l} in +% transliteration:--- % +%\iffalse +%<*example> +% \fi +\begin{arabluacode} +\newarbmark{lamshaddah}{^^^^0651}{l} +\arb[fullvoc]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna} +\arb[trans]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna}. +\end{arabluacode} +% \iffalse +% +% \fi% +% +% \paragraph{\texorpdfstring{The definite article and the euphonic +% \arb[trans]{ta^sdId}}{The definite article and the euphonic tašdīd}} +% The intricate business of rendering in color the initial +% \arb[trans]{'alif al-wa.sl} of the definite article followed by a +% solar consonant must be unraveled. +% +% From the examples provided above, in |fI 'l-nAsi| \arb[fullvoc]{fI +% 'l-nAsi} \arb[trans]{fI 'l-nAsi}, the initial \arb[trans]{'alif-u +% 'l-wa.sl-i} can be rendered in red like so: +% |\arbcolor[red]{\arbnull{al-}a}| +% \arb[fullvoc]{\arbcolor[red]{\arbnull{al-}a}}. Then, the following +% two letters, namely |l-n|, must print the string \arb[trans]{lAm} +% $+$ \arb[trans]{nUn} $+$ \arb[trans]{^saddaT} in Arabic, and exactly +% \txtrans{n-n} in transliteration. Thus an Arabic mark is +% needed:--- % +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{lnn}{^^^^0644^^^^0646^^^^0651}{n-n} + \arb[fullvoc]{fI\arbnull{al-} + \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi} + \arb[trans]{fI\arbnull{al-} + \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi}. +\end{arabluacode} +% \iffalse +% +% \fi% +% +% \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}} +% The \enquote*{quoting} technique provides an easy way to determine +% the carrier of the \arb[trans]{hamzaT}, as shown in +% \vref{tab:quoted-hamza}---: +% \begin{quote} +% \verb+yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna+ +% \arb{yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna} +% \arb[trans]{yatasA\arbnull{'a}\-\arbcolor[red]{|"'}.a\-lUna}, +% \verb+^say\arbcolor[red]{|"'}\arbnull{'}aN+ +% \arb{^say\arbcolor[red]{|"'}\arbnull{'}aN} +% \arb[trans]{^say\arbcolor[red]{|"'}\arbnull{'}aN}, +% \verb+^say\ar+\allowbreak\verb+bcolor[red]{|"'}iN+ +% \arb{^say\arbcolor[red]{|"'}iN} +% \arb[trans]{^say\arbcolor[red]{|"'}iN}, +% |\arbcolor[red]{a"'}.as\arbcolor|\allowbreak|[red]{y"'}.ilaTuN| +% \arb{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN} +% \arb[trans]{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN}. +% \end{quote} +% +% % \section{Transliteration} % \label{sec:transliteration} % It may be more appropriate to speak of \enquote{romanization} than @@ -2515,7 +2913,7 @@ word that \cs{arbnull} is applied to. % This mode transliterates the Arab\TeX\ input into one of the % accepted standards. As said above \vpageref{ref:describe-trans}, % three standards are supported at present: -% \begin{compactdesc} +% \begin{description} % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which was % adopted by the International Convention of Orientalist Scholars in % Rome in 1935.\footnote{See \textcite{dmg}.} |dmg| transliteration @@ -2534,7 +2932,7 @@ word that \cs{arbnull} is applied to. % is most widely used by scholars in the field of Arabic % studies.\footnote{See % \url{http://www.brill.nl/files/brill.nl/specific/authors_instructions/ARAB.pdf}.} -% \end{compactdesc} +% \end{description} % More standards will be included in future releases of % \package{arabluatex}. % @@ -2544,7 +2942,7 @@ word that \cs{arbnull} is applied to. % \cs{SetTranslitConvention}\marg{mode} command , where \meta{mode} % may be either |dmg|, |loc| or |arabica|. This command is also % accepted in the preamble should one wish to set the transliteration -% mode globally, eg.:---% +% mode globally, e.g.:---% % \iffalse %<*example> % \fi @@ -2561,7 +2959,7 @@ word that \cs{arbnull} is applied to. % also can be changed either globally in the preamble or locally at % any point of the document by the \cs{SetTranslitStyle}\marg{style} % command, where \meta{style} may be any font shape selection -% command, eg. \cs{upshape}, \cs{itshape}, \cs{slshape}, and so forth. +% command, e.g. \cs{upshape}, \cs{itshape}, \cs{slshape}, and so forth. % % \paragraph{Font} \NEWfeature{v1.4} \DescribeMacro{\SetTranslitFont} % \cs{SetTranslitFont}\marg{font selection command} allows any @@ -2633,7 +3031,7 @@ word that \cs{arbnull} is applied to. % \uc{'l-rAziyyu}}. % \end{quote} % -% \paragraph{\enquote*{Long} proper names} +% \paragraph{\enquote*{Long} pro\-per names} % \NEWfeature{v1.10} \cs{uc} is also able to process proper names % consisting of several subsequent words:--- % \begin{quote} @@ -2693,13 +3091,13 @@ Then as \Hunayn, \Razi. % \NEWfeature{v1.3} According to \textcite[6]{dmg}, Arabic % \arb[trans]{'i`rAb} may be rendered into |dmg| in three different % ways: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \label{ref:dmg-full-rend}In full: % \NoArbUp\arb[trans]{\uc{`amruNU}}\ArbUpDflt\,; % \item \label{ref:dmg-up-rend}As superscript text: % \arb[trans]{\uc{`amruNU}}\,; % \item \label{ref:irab-discarded}Discarded: \arb[trans]{\uc{`amr}}. -% \end{compactenum} +% \end{enumerate} % \DescribeMacro{\arbup} By default, \package{arabluatex} applies rule % \ref{ref:dmg-up-rend}. Once delimited by a set of Lua functions, % \arb[trans]{'i`rAb} is passed as an argument on to a \cs{arbup} @@ -2732,7 +3130,8 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % with the actual \arb[trans]{tanwIn} in the formatting directives of % the \cs{SetArbUp} command. % -% \paragraph{\arb[trans]{'i`rAb} boundaries} +% \paragraph{\texorpdfstring{\arb[trans]{'i`rAb} boundaries}{ʾiʿrāb +% boundaries}} % Every declinable noun (\arb[trans]{mu`rab}) may be declined either % with or without \arb[trans]{tanwIn}, viz. \arb[trans]{mun.sarifuN} % or \arb[trans]{.gayr-u mun.sarifiN}. The former is automatically @@ -2780,20 +3179,22 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % 'l-nAs-a kAffaT-aN min mu_hA.tabati-hi 'a.had-uN bi-sayyidi-nA}. % \end{quoting} % -% \paragraph{Discarding the \arb[trans]{'i`rAb}} +% \paragraph{\texorpdfstring{Discar\-ding the +% \arb[trans]{'i`rAb}}{Discarding the ʾiʿrāb}} +% \label{ref:ta-marbutah-pipe} % As said above (\vref{ref:irab-discarded}), the \arb[trans]{'i`rAb} % may be discarded in some cases, as in transliterated proper names or % book titles. \package{arabluatex} is able to render words ending % with \arb[trans]{tA' marbU.taT} in different ways, depending on % their function:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Nouns followed by an adjective in apposition: |madInaT| % |kabIraT| \arb[trans]{madInaT kabIraT}, |al-madInaT| |al-kabIraT| % \arb[trans]{al-madInaT al-kabIraT}. % \item Nouns followed by another noun in the genitive (contruct % state): |.hikmaT| |al-l_ah| \arb[trans]{.hikmaT| \uc{al-l_ah}}, % |fi.d.daT| |al-darAhim| \arb[trans]{fi.d.daT al-darAhim}. -% \end{compactenum} +% \end{enumerate} % \begin{quoting} % \textsc{Rem.} It may so happen, as in the absence of the article % before the annexed word, that \package{arabluatex} be unable to @@ -2919,6 +3320,9 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % are also available. % % \begin{longtable}{llllll} +% \bottomrule +% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme} +% \endfoot % \captionlistentry{Buckwalter scheme}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -2936,6 +3340,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{a} & \dmg{a} & \loc{a} & \brill{a} & |A| & |A| \\ % \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| & |b| \\ % \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| & |t| \\ +% \pagebreak[1] % \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & \brill{_t} & |v| & |v| \\ % \arb[novoc]{j} & \dmg{j} & \loc{j} & \brill{j} & |j| & |j| \\ % \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & \brill{.h} & |H| & |H| \\ @@ -2947,6 +3352,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{s} & \dmg{s} & \loc{s} & \brill{s} & |s| & |s| \\ % \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & \brill{^s} & |$| & |c| \\ % \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & \brill{.s} & |S| & |S| \\ +% \pagebreak[1] % \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & \brill{.d} & |D| & |D| \\ % \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & \brill{.t} & |T| & |T| \\ % \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & \brill{.z} & |Z| & |Z| \\ @@ -2985,8 +3391,6 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & |`| & |e| \\ % \midrule % \arb[novoc]{--} (\arb[trans]{ta.twIl}) & --- & --- & --- & |_| & |_| \\ -% \bottomrule -% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme} % \end{longtable} % % \paragraph{Transliteration} @@ -3037,7 +3441,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % % That said, there are two ways of inserting Unicode % Arabic: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \DescribeMacro{\txarb} The \cs{txarb}\marg{Unicode Arabic} % command for inserting Unicode Arabic text in paragraphs; % \item The \DescribeEnv{txarab} |txarab| environment for inserting @@ -3053,16 +3457,18 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \iffalse % % \fi -% \end{compactenum} +% \end{enumerate} % +% \needspace{4\baselineskip} % \section{\LaTeX\ Commands in Arabic environments} % \label{sec:commands-in-arb} % \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\ % commands are accepted in Arabic environments. The general principle -% which applies is that single-argument commands -% (\cs{command}\marg{arg}) such as \cs{emph}\marg{text}, -% \cs{textbf}\marg{text} and the like, are assumed to have Arabic text -% as their arguments:--- +% which applies is that any single-argument command with up to +% \emph{two optional arguments}---that is: +% \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg}---such as +% \cs{emph}\marg{text}, \cs{textbf}\marg{text} and the like, is +% assumed to have Arabic text in its mandatory argument:--- % \begin{quote} % |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\uc{`AdAt-i}}| % \arb[voc]{\abjad{45} kitAbu-hu \emph{fI 'l-\uc{`AdAt-i}}} @@ -3070,6 +3476,9 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % 'l-\uc{`AdAt-i}}}.\footnote{This is odd in Arabic script, but % using such features as \cs{emph} or \cs{textbf} is a matter of % personal taste.} +% +% |\arb{\abjad{45} \framebox[1in][s]{kitAbu-hu fI 'l-`AdAti}}|\\ +% \arb{\abjad{45} \framebox[1in][s]{kitAbu-hu fI 'l-`AdAti}} % \end{quote} % % The same applies to footnotes:--- @@ -3091,7 +3500,7 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i % \fi % % Some commands, however, do not expect running text in their -% arguments, or one may wish to insert English text eg. in footnotes +% arguments, or one may wish to insert English text e.g. in footnotes % or in marginal notes. \package{arabluatex} provides a set of % commands to handle such cases. % @@ -3119,11 +3528,13 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i %<*example> % \fi \begin{arabluacode} -\arb[fullvoc]{\uc{z}ayd-uN\LRfootnote{% -\enquote{\arb[trans]{\uc{z}ayd} is the son of -\arb[trans]{\uc{`a}mr}}: the second -noun is not in apposition to the first, but forms -part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU} + \begin{arab}[fullvoc] + \uc{z}ayd-uN\arbnull{ibnu}\LRfootnote{% + \enquote{\arb[trans]{\uc{z}ayd} is the son of + \arb[trans]{\uc{`a}mr}}: the second noun is not in + apposition to the first, but forms part of the + predicate\ldots} \arbnull{zayduN}ibn-u \uc{`a}mr-iNU + \end{arab} \end{arabluacode} % \iffalse % @@ -3144,9 +3555,10 @@ part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU} % the documentation of \package{KOMA-script} for details about the % \cs{deffootnotemark} and \cs{deffootnote} commands.} % -% \DescribeMacro{\LRmarginpar} The \cs{LRmarginpar} command does for -% marginal notes the same as \cs{LRfootnote} does for footnotes. Of -% course, it is supposed to be used in Arabic environments. Note that +% \DescribeMacro{\LRmarginpar} The +% \cs{LRmarginpar}\oarg{left}\marg{right} command does for marginal +% notes the same as \cs{LRfootnote} does for footnotes. Of course, it +% is supposed to be used in Arabic environments. Note that % \cs{marginpar} also works in Arabic environments, but it acts as any % other single-argument command inserted in Arabic environments. The % general principle laid \vpageref{ref:cmd-inside-arabic} applies. @@ -3188,23 +3600,22 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of % commands} command can be used in the preamble to give any -% \emph{single-argument} command---either new or already -% existing---the precedence over \package{arabluatex} inside Arabic -% environments. It takes as argument a comma-separated list of -% commands each of which must be stripped of its leading character +% command---either new or already existing---the precedence over +% \package{arabluatex} inside Arabic environments. It takes as +% argument a comma-separated list of commands each of which must be +% stripped of its leading character % |\|, like so:---\\ % \arabluaverb{\MkArbBreak{onecmd, anothercmd, yetanothercmd, ...}} % % For example, here follows a way to define a new command |\fvred| to % distinguish words with a different color and always print them in -% fully vocalized Arabic:---\footnote{See below \vref{sec:textcolor} for -% more information on two-argument commands.} % +% fully vocalized Arabic:--- % % \iffalse %<*example> % \fi \begin{arabluacode} \MkArbBreak{fvred} - \newcommand{\fvred}[1]{\textcolor{red}{\arb[fullvoc]{#1}}} + \newcommand{\fvred}[1]{\arbcolor[red]{\arb[fullvoc]{#1}}} \begin{arab}[voc] _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI \fvred{((ma.tli`-i 'l-^sams-i))} wa-lA binA'-a la-hum @@ -3215,6 +3626,50 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \fi % +% It must be noted that the arguments, either optional or mandatory, +% of commands declared with \cs{MkArbBreak} are not to be processed by +% \package{arabluatex}. Therefore, as in the previous example, any of +% their argument to be rendered in Arabic must be inserted again in +% \cs{arb}. \NEWfeature{v1.12}These commands themselves may have up to +% two optional and/or mandatory arguments followed by one optional +% argument, like so:--- +% \begin{enumerate} +% \item \cs{command} (no argument, lowermost combination) +% \item \cs{command}\oarg{opt1} (one optional argument) +% \item \cs{command}\marg{arg1} (one mandatory argument) +% \item \cs{command}\oarg{opt1}\marg{arg1} (one optional and one +% mandatory argument) +% \item{} [\ldots] +% \item \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2} +% \item +% \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2}\oarg{opt3} +% (uppermost combination) +% \end{enumerate} +% +% \DescribeMacro{\MkArbBreak*}\NEWfeature{v1.12} As said above, +% \cs{MkArbBreak} prevents \package{arabluatex} from processing the +% arguments of \enquote*{declared} commands as Arabic text. This +% technique proves sufficient in most cases. However, a +% \enquote*{starred} version of this +% command---\cs{MkArbBreak*}\marg{csv list of commands}---is also +% provided. It goes a step further, as it directs \package{arabluatex} +% to \emph{close} the current Arabic environment before any of the +% \enquote*{declared} commands, then \emph{resume} it just after. +% +% \iffalse +%<*example> +% \fi +\begin{arabluacode}[text only] + It must be noted that \cs{MkArbBreak*} must be used with the utmost + care and \emph{should never be used} if \cs{MkArbBreak} gives + satisfaction. At any rate, the latter must always be tested before + the former. +\end{arabluacode} +% \iffalse +% +% \fi% +% +% % \subsection{Environments} % \label{sec:environments} % \changes{v1.5}{2016/11/14}{Environments may be nested inside the @@ -3248,18 +3703,19 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI 'ahdA-hA dUna mA kAna yuttaxa_du li-\uc{muwaysiN}. wa-l_akinna-hu bi-karami-hi wa-bi-.husni xuluqi-hi 'a.zhara 'l-ta`ajjuba min simani-hA - wa-.tIbi la.hmi-hA. wa-kAna <\uc{'abU} \uc{'l-hu_dayli}> yu`rafu - bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA - \uc{'abA} \uc{`imrAna} tilka 'l-dajAjaTa?} qAla: + wa-.tIbi la.hmi-hA. wa-kAna <\uc{'abU} \uc{'l-hu_dayli}> + yu`rafu bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa + ra'ayta yA \uc{'abA} \uc{`imrAna} tilka 'l-dajAjaTa?} qAla: \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: - \begin{quoting}[begintext=», endtext=«] + \begin{quoting}[begintext=\textquotedblright, + endtext=\textquotedblleft] wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? fa-'inna - 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni. wa-tadrI - bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi makAniN kunnA - na`lifu-hA? + 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni. + wa-tadrI bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi + makAniN kunnA na`lifu-hA? \end{quoting} - fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN na`rifu-hu - na.hnu wa-lA ya`rifu-hu \uc{'abU} \uc{'l-hu_dayli}. + fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN + na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'abU} \uc{'l-hu_dayli}. \end{arab} \end{arabluacode} % \iffalse @@ -3270,9 +3726,9 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % \label{sec:lists} % Lists environments are also accepted inside the |arab| % environment. One may either use any of the three standard list -% environments, viz. |itemize|, |enumerate| and |description| or use a -% package that provides additional refinements such as -% \package{paralist}. +% environments, viz. |itemize|, |enumerate| and |description| or use +% packages that provide additional refinements such as +% \package{paralist} or \package{enumitem}. % % To take a first example, should one wish to typeset a list of % manuscripts, the |description| environment can be used like so:--- @@ -3320,6 +3776,53 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \fi % +% \label{ref:abjad-list} +% As a third example, abjad-numbered lists can be typeset in +% conjunction with the \package{enumitem} package,\footnote{See the +% documentation of \package{enumitem} for more details: +% \url{https://ctan.org/pkg/enumitem}} like so:--- +% \iffalse +%<*example> +% \fi +\begin{arabluaverbatim} + % preamble:--- + \usepackage{enumitem} + \newlist{enumabjad}{enumerate}{10} + \setlist[enumabjad]{nosep, label={\abjad{\arabic*}}} + \usepackage{multicol} +\end{arabluaverbatim} +\begin{arabluacode} + From \textcite[i. 29 B--C]{Wright}:--- The derived forms of the + triliteral verb are usually reckoned fifteen in number, but the + learner may pass over the last four, because (with the exception + of the twelfth) they are of very rare occurrence. + \RLmulticolcolumns + \begin{multicols}{3} + \begin{arab}[fullvoc] + \begin{enumabjad} + \item fa`ala + \item fa``ala + \item fA`ala + \item 'af`ala + \item tafa``ala + \item tafA`ala + \item infa`ala + \item ifta`ala + \item if`alla + \item istaf`ala + \item if`Alla + \item if`aw`ala + \item if`awwala + \item if`anlala + \item if`anl_A + \end{enumabjad} + \end{arab} + \end{multicols} +\end{arabluacode} +% \iffalse +% +% \fi +% % \paragraph{Caveat} % The various French definition files of the \package{babel} package % viz. |acadian|, |canadien|, |francais|, |frenchb| or |french| all @@ -3338,9 +3841,9 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \fi% % This option will prevent \package{babel-french} from interfering -% with the layout of the document. Then the package \package{paralist} -% can be used to make the lists \enquote*{compact} as -% \package{babel-french} do. +% with the layout of the document. Then the \package{paralist} or +% \package{enumitem} packages can be used to make the lists +% \enquote*{compact} as \package{babel-french} do. % % \subsection{\package{csquotes}} % \label{sec:csquotes} @@ -3354,8 +3857,8 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... \begin{arabluaverbatim} \usepackage{csquotes} \DeclareQuoteStyle{arabic} -{\rmfamily\textquotedblright}{\rmfamily\textquotedblleft} -{\rmfamily\textquoteright}{\rmfamily\textquoteleft} +{\textquotedblright}{\textquotedblleft} +{\textquoteright}{\textquoteleft} \end{arabluaverbatim} % \iffalse % @@ -3381,14 +3884,17 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % line in the code above. % \end{quoting} % -% \subsection{Two-argument commands} +% \subsection{Two-argument special commands} % \label{sec:two-arg-cmds} % -% \paragraph{Color} +% \paragraph{textcolor} % \label{sec:textcolor} -% The two-argument command \cs{textcolor}\marg{color}\marg{Arabic +% The two-argument command \cs{textcolor}\marg{color}\marg{Ara\-bic % text} is supported inside \cs{begin}|{arab}| \ldots\ -% \cs{end}|{arab}|. One simple example follows:--- % +% \cs{end}|{arab}|. One simple example +% follows:\footnote{\package{arabluatex} provides its own +% \cs{arbcolor} command which is able to render syllabes or diacritics +% in colors. See \vref{sec:color}.}--- % % \iffalse %<*example> % \fi @@ -3417,9 +3923,11 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % \paragraph{\package{reledmac}} % \label{sec:reledmac} % The two-argument command \cs{edtext}\marg{lemma}\marg{commands} is -% supported inside \cs{begin}|{arab}| \ldots\ \cs{end}|{arab}|. As an -% example, one may get \package{arabluatex} and \package{reledmac} to -% work together like so:--- +% supported inside \cs{begin}|{arab}| \ldots\ +% \cs{end}|{arab}|.\footnote{\cs{pstart} and \cs{pend} are also +% supported inside the |arab| environment.} As an example, one may get +% \package{arabluatex} and \package{reledmac} to work together like +% so:--- % % \iffalse %<*example> % \fi @@ -3483,25 +3991,25 @@ wa-ya.sIru ta.hta 'l-jild-i % \label{sec:future-work} % A short, uncommented, list of what is planned in the versions of % \package{arabluatex} to come follows: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Short-term: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item \texttt{TEI xml} support: \package{arabluatex} will % interoperate with \texttt{TEI xml} through new global and local % options that will output Arabic in a \texttt{TEI xml} compliant % file in addition to the usual PDF output: see % \vpageref{ref:tei-to-come}. -% \end{compactenum} +% \end{enumerate} % \item Medium-term: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item More languages: the list of supported languages will % eventually be the same as \package{arabtex}: see % \vref{fn:arabtex-languages}. % \item Formulate propositions for extending the Arab\TeX\ notation % and the transliteration tables. Include them in % \package{arabluatex}. See \vref{sec:additional-characters}. -% \end{compactenum} -% \end{compactenum} +% \end{enumerate} +% \end{enumerate} % % \StopEventually{} % @@ -3517,11 +4025,11 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \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} % \end{macrocode} -% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning -% if the document is processed with another engine. +% \package{arabluatex} requires \hologo{LuaLaTeX} of course. Issue a +% warning if the document is processed with another engine. % \begin{macrocode} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -3547,6 +4055,8 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macrocode} % Packages that are required by \package{arabluatex}: % \begin{macrocode} +\RequirePackage{xcolor} +\RequirePackage{luacolor} \RequirePackage{etoolbox} \RequirePackage{arabluatex-patch} \RequirePackage{fontspec} @@ -3564,12 +4074,6 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \luadirect{dofile(kpse.find_file("arabluatex.lua"))} % \end{macrocode} -% This is needed by the current versions of \package{polyglossia} and -% \package{luabidi}. \package{luabidi} provides a \cs{Footnote} -% command. Use it as well if it is loaded. -% \begin{macrocode} -\luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))} -% \end{macrocode} % Font setup. If no Arabic font is selected, issue a warning message % and attempt to load the Amiri font which is included in \TeX{}live: % \begin{macrocode} @@ -3579,8 +4083,7 @@ wa-ya.sIru ta.hta 'l-jild-i \newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}% % \end{macrocode} % \begin{macro}{\setRL} -% This neutralizes what is defined by the same command in -% \package{luabidi}: +% This neutralizes what may be defined by other packages: % \begin{macrocode} \AtBeginDocument{\def\setRL{\booltrue{al@rlmode}\pardir TRT\textdir TRT}} % \end{macrocode} @@ -3609,17 +4112,28 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macrocode} % \end{macro} % \begin{macro}{\MkArbBreak} -% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for inserting -% user-defined macros in Arabic environments} -% The \cs{MkArbBreak}\marg{csv list of commands} command can be used -% to give any command---either new or already existing---the -% precedence over \package{arabluatex} inside Arabic environments. It -% is actually coded in Lua. +% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for +% inserting user-defined macros in Arabic environments} The +% \cs{MkArbBreak}\marg{csv list of commands} command can be used to +% give any command---either new or already existing---the precedence +% over \package{arabluatex} inside Arabic environments. It is +% actually coded in Lua. +% \begin{macro}{\MkArbBreak*} +% \changes{v1.12}{2018/06/24}{\enquote*{starred} version which +% closes Arabic environments before processing declared commands.} +% \cs{MkArbBreak*} goes a step further as it directs +% \package{arabluatex} to close the current Arabic environment before +% processing any \enquote*{declared} command then resume it just +% after. % \begin{macrocode} -\DeclareDocumentCommand{\MkArbBreak}{m}{% - \luadirect{mkarbbreak(\luastringN{#1})}} +\NewDocumentCommand{\MkArbBreak}{s m}{% + \IfBooleanTF{#1} + {\luadirect{mkarbbreak(\luastringN{#2}, "out")}} + {\luadirect{mkarbbreak(\luastringN{#2}, "dflt")}} +} % \end{macrocode} % \end{macro} +% \end{macro} % \begin{macro}{\aemph} Arabic emphasis. Needs to be redefined as % well. The function is actually coded in Lua. % \begin{macro}{\aemph*} The \enquote*{starred} version of this @@ -3630,15 +4144,25 @@ wa-ya.sIru ta.hta 'l-jild-i \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"))}}}}} % \end{macrocode} % \end{macro} % \end{macro} +% \begin{macro}{\arbcolor}\changes{v1.12}{2018/06/24}{Standard color +% command for Arabic environments} +% \cs{arbcolor}\oarg{color}\marg{Arabic text} takes the Arabic text to +% be colored as argument. +% \begin{macrocode} +\NewDocumentCommand{\arbcolor}{o m}{% + \IfNoValueTF{#1}{#2}{\textcolor{#1}{#2}}} +% \end{macrocode} +% +% \end{macro} % \begin{macro}{\SetInputScheme} % \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} can be used to % process other input schemes such as \enquote*{Buckwalter}} @@ -3789,7 +4313,7 @@ wa-ya.sIru ta.hta 'l-jild-i \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} % \end{macrocode} % \end{macro} % \end{macro} @@ -3813,19 +4337,25 @@ wa-ya.sIru ta.hta 'l-jild-i \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% @@ -3988,11 +4518,15 @@ wa-ya.sIru ta.hta 'l-jild-i \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} % \end{macrocode} % \end{macro} % \begin{macro}{\arbnull} @@ -4020,7 +4554,10 @@ wa-ya.sIru ta.hta 'l-jild-i % inserted in an Arabic environment. It typsets his argument in a % marginal note from left to right. % \begin{macrocode} -\DeclareDocumentCommand{\LRmarginpar}{m}{\marginpar{\textdir TLT #1}} +\DeclareDocumentCommand{\LRmarginpar}{o m}{% + \IfNoValueTF{#1} + {\marginpar{\textdir TLT #2}} + {\marginpar[\textdir TLT #1]{\textdir TLT #2}}} % \end{macrocode} % \end{macro} % \begin{macro}{\LRfootnote} \cs{LRfootnote} and \cs{RLfootnote} are @@ -4049,6 +4586,19 @@ wa-ya.sIru ta.hta 'l-jild-i \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}} % \end{macrocode} % \end{macro} +% \subsection*{Errors and Warnings} +% \begin{macrocode} +\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}} +% \end{macrocode} +% % That is it. Say goodbye before leaving. % % \iffalse @@ -4073,7 +4623,7 @@ wa-ya.sIru ta.hta 'l-jild-i % % The following is taken from |latex.ltx|. I had to make this patch % for I could not find a way to process the list environments in -% right-to-left mode. The \LuaTeX\ primitives \cs{bodydir} and +% right-to-left mode. The \hologo{LuaTeX} primitives \cs{bodydir} and % \cs{pagedir} will eventually allow us to get rid of this: % \begin{macrocode} \def\list#1#2{% 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"} } -- cgit v1.2.3