From e80c0d99f7d2511e6e3f3e70cd922f119a1fc217 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 8 May 2016 11:24:20 +0200 Subject: first implementation of 'easy' rules set --- arabluatex.dtx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'arabluatex.dtx') diff --git a/arabluatex.dtx b/arabluatex.dtx index dc7193f..f44b309 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -189,7 +189,7 @@ % % \fi % -% \CheckSum{286} +% \CheckSum{0} % % \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 @@ -2060,6 +2060,23 @@ wa-ya.sIru ta.hta 'l-jildi {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}} % \end{macrocode} % \end{macro} +% \begin{macro}{\SetArbEasy} +% \begin{macro}{\SetArbDeflt} +% By default, \package{arabluatex} applies complex rules to generate +% euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT} +% \linebreak and \arb[trans]{sukUn} depending on the modes which are +% selected, either |voc|, |fullvoc| or |trans|. Such refinements can +% be discarded with \cs{SetArbEasy}, either globally in the preamble +% or at any point of the document. Default complex rules can be set +% back at any point of the document with \cs{\SetArbDflt} +% \changes{}{}{} +% \begin{macrocode} +\def\al@arb@rules{dflt} +\NewDocumentCommand{\SetArbEasy}{}{\def\al@arb@rules{easy}} +\NewDocumentCommand{\SetArbDflt}{}{\def\al@arb@rules{default}} +% \end{macrocode} +% \end{macro} +% \end{macro} % \begin{macro}{\SetTranslitStyle} By default any transliterated % Arabic text is printed in italics. This can be changed globally in % the preamble or at any point of the document: @@ -2108,7 +2125,8 @@ wa-ya.sIru ta.hta 'l-jildi {\edef\@tempa{#1}% \ifx\@tempa\al@mode@voc% \bgroup\textdir TRT\arabicfont% - \luadirect{tex.sprint(processvoc(\luastringN{#2}))}\egroup% + \luadirect{tex.sprint(processvoc(\luastringN{#2}, + \luastringO{\al@arb@rules}))}\egroup% \else% \ifx\@tempa\al@mode@fullvoc% \bgroup\textdir TRT\arabicfont% -- cgit v1.2.3