From 7193b19d4a2bc3edc1c5f3cc024380d1d2cf4938 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 24 Dec 2016 16:37:11 +0100 Subject: arabnull: done documenting; some corrections; checksum updated. getting close to v1.7 --- arabluatex.dtx | 82 ++++++++++++++++++++++++++++++++++++++++++++++---- arabluatex_fullvoc.lua | 6 ++++ arabluatex_voc.lua | 6 ++++ 3 files changed, 88 insertions(+), 6 deletions(-) diff --git a/arabluatex.dtx b/arabluatex.dtx index 93ce3a4..c5cf1da 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -27,7 +27,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{arabluatex} %<*package-info> - [2016/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX] + [2016/12/24 v1.7 An ArabTeX-like interface for LuaLaTeX] % % %<*driver> @@ -145,7 +145,7 @@ \defaultfontfeatures{RawFeature={+liga}} \setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, RawFeature={+mark;+ccmp;+ss05;+ss06}] -\usepackage{arabluatex}[2016/12/17] +\usepackage{arabluatex}[2016/12/24] \usepackage[nopar]{quran} \usepackage{varioref} \usepackage{hypdoc} @@ -203,7 +203,7 @@ % % \fi % -% \CheckSum{0} +% \CheckSum{697} % % \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 @@ -257,7 +257,7 @@ % \pagebreak % \listoftables % \normalsize -% +% % \begin{abstract} % This package provides for \LuaLaTeX\ an Arab{\TeX}-like interface % to generate Arabic writing from an \textsc{ascii} @@ -1320,6 +1320,7 @@ vowels (see §~3). % \end{quote} % % \subparagraph{\arb[trans]{'alif-u 'l-wa.sl-i} preceded by a diphthong} +% \label{sec:diphthong-alif} % The diphthong is resolved into two simple vowels \parencite[i. 21 % D--22 A]{Wright} viz. \emph{ay}~→ \emph{\u{a}\u{i}} and \emph{aw}~→ % \emph{\u{a}\u{u}}. \package{arabluatex} detects the cases in which @@ -1656,6 +1657,75 @@ vowels (see §~3). % \meta{n} prevents the necessary \arb[trans]{ta^sdId} rule % (\cpageref{ref:necessary-tashdid}) from being applied. % +% \subsection{Putting back on broken contextual analysis rules} +% \label{sec:arbnull} +% \NEWfeature{v1.7} In complex documents such as critical editions +% where footnotes and other kind of annotations can be particularly +% abundant, the contextual analysis rules that are described above may +% be broken by \LaTeX\ commands. To take an example, consider the +% following:---% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + This is wrong: + \begin{arab}[fullvoc] + fa-lammA ra'aW\LRfootnote{A footnote that interferes with the + contextual analysis.} 'l-na^gma... + \end{arab} +\end{arabluacode} +% \iffalse +% +% \fi% +% According to the rule stated \vpageref{sec:diphthong-alif}, the +% diphthong in \arb[trans]{ra'aW} must be resolved into two simple +% vowels before the \arb[trans]{'alif-u 'l-wa.sl-i}, as +% \arb[fullvoc]{ra'aW 'l-na^gma}. +% +% \DescribeMacro{\arbnull} The \cs{arbnull} command is provided so as +% to put back on contextual analysis rules in such situations. It +% takes as argument the word that must be brought back for any given +% rule to be applied as it ought to. Depending on the contexts that +% have to be restored, \cs{arbnull} may be found just after or before +% Arabic words.% +% \iffalse +%<*example> +% \fi +\begin{arabluacode}[text only] +In any case, \emph{no space must be left} after or before the Arabic +word that \cs{arbnull} is applied to. +\end{arabluacode} +% \iffalse +% +% \fi% +% The following shows how the Arabic should have been written in the +% preceding example and gives further illustrations of the same +% technique:---% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \begin{arab}[fullvoc] + fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote that + interferes with the contextual analysis.} 'l-na^gma... + + qAla\LRfootnote{A footnote that interferes with the contextual + analysis.} \arbnull{qAla}uhrub fa-lan tuqtala. + + zayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes with + the contextual analysis.} \arbnull{zayduN}ibn-u + `amriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \end{arab} + \begin{arab}[trans] + zayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes with + the contextual analysis.} \arbnull{zayduN}ibn-u + `amriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \end{arab} +\end{arabluacode} +% \iffalse +% +% \fi% +% % \subsection{\texorpdfstring{Stretching characters: the % \arb[trans]{ta.twIl}}{Stretching characters: the taṭwīl}} % \label{sec:tatwil} @@ -2939,7 +3009,7 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabluatex}% -[2016/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX] +[2016/12/24 v1.7 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} % \end{macrocode} % \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning @@ -3345,7 +3415,7 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macrocode} % \end{macro} % \begin{macro}{\arbnull} -% \changes{v1.7}{2016/12/23}{New \cs{arbnull} command for putting +% \changes{v1.7}{2016/12/24}{New \cs{arbnull} command for putting % back on any contextual analysis broken by other commands.} The % \cs{arbnull} command does nothing by itself. It is processed only % if it is found in Arabic context so as to put back on contextual diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua index 0b558df..31956a6 100644 --- a/arabluatex_fullvoc.lua +++ b/arabluatex_fullvoc.lua @@ -245,6 +245,7 @@ tanwinfv = { -- with assimilations (\SetArbDflt*) {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="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -264,6 +265,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="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -289,6 +292,7 @@ tanwinfveasy = { -- no assimilations (see below) --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="%-?(uNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(aNU)(%s)([uai])", b="%1%2ٱ"}, {a="%-?(iNU)(%s)([uai])", b="%1%2ٱ"}, @@ -308,6 +312,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="ٱ"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua index a17a453..6be30d1 100644 --- a/arabluatex_voc.lua +++ b/arabluatex_voc.lua @@ -372,6 +372,7 @@ tanwin = { {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="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, @@ -386,6 +387,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"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, @@ -411,6 +414,7 @@ tanwineasy = { -- 'easy' requires some lines to be taken out: -- {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="%-?uNU", b="ٌو"}, {a="%-?aNU", b="ًوا"}, {a="%-?iNU", b="ٍو"}, @@ -425,6 +429,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"}, -- quoted tanwīn (begin) {a="%-?(\"uN)", b=""}, {a="(B)%-?(\"aN)", b="%1"}, -- cgit v1.2.3