From 901646a7dc08022c61ca4180302ac58296ec5443 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Thu, 30 Jun 2016 19:19:53 +0200
Subject: started implementing Buckwalter input scheme

---
 arabluatex.dtx | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

(limited to 'arabluatex.dtx')

diff --git a/arabluatex.dtx b/arabluatex.dtx
index 8554fc3..d7a4adb 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -2262,17 +2262,29 @@ wa-ya.sIru ta.hta 'l-jild-i
   {\RenewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}
   {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}}
 %    \end{macrocode}
+% \begin{macro}{\SetInputScheme}
+%   \changes{v1.4}{2016/06/30}{\cs{SetInputScheme} may be used to
+%   process other input schemes such as \enquote*{Buckwalter}}
+%   \package{arabluatex} is designed for processing Arab\TeX\ input
+%   notation. \cs{SetInputScheme} may be used in the preamble or at
+%   any point of the document should the user wish to use a different
+%   notation such as the \enquote*{Buckwalter scheme}.
+%    \begin{macrocode}
+\def\al@input@scheme{arabtex}
+\NewDocumentCommand{\SetInputScheme}{m}{\def\al@input@scheme{#1}}
+%    \end{macrocode}
+% \end{macro}
 % \end{macro}
 % \begin{macro}{\SetArbEasy}
 %   \changes{v1.2}{2016/05/09}{New \cs{SetArbEasy}/\cs{SetArbDflt} for
 %   \enquote*{modern} or \enquote*{classic} Arabic styles.}
 % \begin{macro}{\SetArbDflt}
 %   By default, \package{arabluatex} applies complex rules to generate
-%   euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT}
-%   \linebreak and \arb[trans]{sukUn} depending on the modes which are
-%   selected, either |voc|, |fullvoc| or |trans|. Such refinements can
-%   be discarded with \cs{SetArbEasy}, either globally in the preamble
-%   or at any point of the document. Default complex rules can be set
+%   euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT} and
+%   \arb[trans]{sukUn} depending on the modes which are selected,
+%   either |voc|, |fullvoc| or |trans|. Such refinements can be
+%   discarded with \cs{SetArbEasy}, either globally in the preamble or
+%   at any point of the document. Default complex rules can be set
 %   back at any point of the document with \cs{SetArbDflt}.
 %    \begin{macrocode}
 \def\al@arb@rules{dflt}
@@ -2289,7 +2301,6 @@ wa-ya.sIru ta.hta 'l-jild-i
 \def\al@trans@font{\rmfamily}%
 \NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}}
 %    \end{macrocode}
-%   
 % \end{macro}
 % \end{macro}
 % \begin{macro}{\SetTranslitStyle} By default any transliterated
@@ -2369,7 +2380,7 @@ wa-ya.sIru ta.hta 'l-jild-i
   \ifx\@tempa\al@mode@voc%
   \bgroup\textdir TRT\arabicfont%
   \luadirect{tex.sprint(processvoc(\luastringN{#2},
-    \luastringO{\al@arb@rules}))}\egroup%
+    \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
   \else%
   \ifx\@tempa\al@mode@fullvoc%
   \bgroup\textdir TRT\arabicfont%
@@ -2399,7 +2410,7 @@ wa-ya.sIru ta.hta 'l-jild-i
   \ifx\@tempa\al@mode@voc%
   \bgroup\pardir TRT\textdir TRT\arabicfont%
   \luadirect{tex.sprint(processvoc(\luastringO{\BODY},
-    \luastringO{\al@arb@rules}))}\egroup%
+    \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup%
   \else%
   \ifx\@tempa\al@mode@fullvoc%
   \bgroup\pardir TRT\textdir TRT\arabicfont%
-- 
cgit v1.2.3

