From e501d995d5e549ed421e3134433c1554da85ac26 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 4 Jul 2017 20:59:47 +0200 Subject: documentation updated; getting close to v1.9 --- arabluatex.dtx | 107 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 84 insertions(+), 23 deletions(-) diff --git a/arabluatex.dtx b/arabluatex.dtx index c50ab6c..87a2604 100644 --- a/arabluatex.dtx +++ b/arabluatex.dtx @@ -27,7 +27,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{arabluatex} %<*package-info> - [2017/06/20 v1.8.5 An ArabTeX-like interface for LuaLaTeX] + [2017/07/05 v1.9 An ArabTeX-like interface for LuaLaTeX] % % %<*driver> @@ -155,7 +155,7 @@ \defaultfontfeatures{RawFeature={+liga}} \setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, RawFeature={+mark;+ccmp;+ss05;+ss06}] -\usepackage{arabluatex}[2017/06/20] +\usepackage{arabluatex}[2017/07/05] \usepackage[nopar]{quran} \usepackage{varioref} \usepackage{hyperxmp} @@ -227,7 +227,7 @@ % % \fi % -% \CheckSum{0} +% \CheckSum{704} % % \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 @@ -760,10 +760,11 @@ vowels (see §~3). % & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule % \endhead \footnotetext{See below \vref{sec:transliteration}.} % \label{tab:arabtex-consonants} -% \arb[voc]{'i 'a 'u}\footnote{For \arb[trans]{'alif} as a consonant, -% see \textcite[i. 16 D]{Wright}. The \arb[trans]{hamzaT} itself is -% encoded \texttt{<'>} and may be followed by either \meta{u, a} or -% \meta{i}. See below \vref{ref:hamza}.} & \dmg{'u 'a 'i} & +% \arb[voc]{'i 'a 'u}\footnote{See below, \emph{Rem{.} a.} For +% \arb[trans]{'alif} as a consonant, see \textcite[i. 16 +% D]{Wright}. The \arb[trans]{hamzaT} itself is encoded \texttt{<'>} +% and may be followed by either \meta{u, a} or \meta{i}. See below +% \vref{ref:hamza}.} & \dmg{'u 'a 'i} & % \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\ % \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\ % \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\ @@ -791,11 +792,45 @@ vowels (see §~3). % \arb[novoc]{n} & \dmg{n} & \loc{n} & \brill{n} & |n| \\ % \arb[novoc]{h} & \dmg{h} & \loc{h} & \brill{h} & |h| \\ % \arb[novoc]{w} & \dmg{w} & \loc{w} & \brill{w} & |w| \\ -% \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y| \\ +% \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y|\footnote{For +% the letter \arb[novoc]{.y} with no diacritical point 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, +% the \arb[trans]{'alifu 'l-wa.sli} is expressed only by the vowel +% that accompanies the omitted \arb[trans]{hamzaT}: \meta{u, a, i} +% as in |wa-inhazama| \arb[fullvoc]{wa-inhazama} +% \arb[trans]{wa-inhazama}. For more details on the definite article +% and the \arb[trans]{'alifu 'l-wa.sli} see +% \vref{ref:definite-article}. +% +% That said, \arb{.A} as a consonant is actually the \emph{spiritus +% lenis} of the Greeks and is distinguished by the +% \arb[trans]{hamzaT} \arb[novoc]{(|"')} as it is shown in the above +% table. However, the bare \arb[trans]{'alif} may also be encoded as +% |.A| whether it be followed by a vowel or not, like so: |wa-.An| +% \arb{wa-.An} \arb[trans]{wa-.An} (where the dot symbolizes the +% absence of vowel), |wa-.Aan| \arb{wa-.Aan} \arb[trans]{wa-.Aan}, +% |wa-.Ain| \arb{wa-.Ain} \arb[trans]{wa-.Ain}. +% +% \textsc{Rem.}~\emph{b.} The letter \arb[novoc]{y} with two points +% below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be +% written without diacritical points as \arb[novoc]{Y}. When it is +% used as a consonant, it is encoded |aY|, where |a| recalls the +% \arb[trans]{fat.haT} placed above the preceding letter in +% vocalized Arabic, like so: |qaY'uN| \arb{qaY'uN} +% \arb[trans]{qaY'uN}, |^saY'uN| \arb{^saY'uN} \arb[trans]{^saY'uN}, +% |^saY'aN| \arb[trans]{^saY'aN} \arb{^saY'aN}. +% +% The same result may be achieved by encoding this letter as |.y|, +% like so: |qa.y'uN| \arb{qa.y'uN} \arb[trans]{qa.y'uN}, |^sa.y'uN| +% \arb{^sa.y'uN} \arb[trans]{^sa.y'uN}, |^sa.y'aN| +% \arb[trans]{^sa.y'aN} \arb{^sa.y'aN}. +% \end{quoting} % % \subsection{Additional characters} % \changes{v1.8.5}{2017/06/20}{Six additional Persian characters are @@ -823,7 +858,7 @@ vowels (see §~3). % included in this standard. However, as \texttt{arabica} is based on % \texttt{dmg}, the \texttt{dmg} equivalents have been used here.} % \label{tab:arabtex-additional-characters} -% \arb[novoc]{p} & \dmg{p} & \loc{p} & \brill{p} & \verb|p| \\ +% \hskip-1em\arb[novoc]{p} & \dmg{p} & \loc{p} & \brill{p} & \verb|p| \\ % \arb[novoc]{^c} & \dmg{^c} & \loc{^c} & \brill{^c} & \verb|^c| \\ % \arb[novoc]{^z} & \dmg{^z} & \loc{^z} & \brill{^z} & \verb|^z| \\ % \arb[novoc]{v}\footnote{\label{fn:not-in-dmg}This character is not found in @@ -862,7 +897,9 @@ vowels (see §~3). % \label{tab:arabtex-long-vowels} % \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\ % \arb[novoc]{U} & \dmg{U} & \loc{U} & \brill{U} & \verb|U| \\ -% \arb[novoc]{I} & \dmg{I} & \loc{I} & \brill{I} & \verb|I| \\ +% \arb[novoc]{I} & \dmg{I} & \loc{I} & \brill{I} & +% \verb|I|\footnote{For the letter \arb[novoc]{I} with no diacritical +% points, see \emph{Rem{.} c.} below.} \\ % \arb[novoc]{_A}\footnote{$=$ \arb[trans]{al-'alif-u 'l-maq.sUraT-u}.} % & \dmg{_A} & \loc{_A} & \brill{_A} & \verb|_A| or \verb|Y| \\ % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\ @@ -895,7 +932,7 @@ vowels (see §~3). % \textsc{Rem.}~\emph{c.} The letter \arb[novoc]{y} with two points % below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be % written without diacritical points as \arb[novoc]{Y}. When it is -% used as a long vowel, it is encoded |iY|, which recalls the +% used as a long vowel, it is encoded |iY|, where |i| recalls the % \arb[trans]{kasraT} placed below the preceding letter in vocalized % Arabic, like so: |liY| \arb{liY} \arb[trans]{liY}, |yam^siY| % \arb{yam^siY} \arb[trans]{yam^siY}. @@ -2870,24 +2907,44 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \fi % -% \section{New commands to be inserted in Arabic -% environments} +% \subsection{New commands} % \label{sec:declare-new-commands} +% \NEWfeature{v1.9}% % In some particular cases, it may be useful to define new commands to % be inserted in Arabic environments. From the general principle laid -% \vpageref{ref:cmd-inside-arabic}, it follows that -% -% For example, to distinguish words with a different -% color,\footnote{See below \vref{sec:textcolor} for more information -% on two-argument commands.} one may proceed like so:--- % +% \vpageref{ref:cmd-inside-arabic}, it follows that any command that +% is found inside an Arabic environment is assumed to have Arabic text +% in its argument which \package{arabluatex} will process as such +% before passing it on to the command itself for any further +% processing. As a result of this feature, such a command as:\\ +% \arabluaverb{\newcommand{\fvarabic}[1]{\arb[fullvoc]{#1}}}\\ +% will work as expected, but will always output non-vocalized Arabic +% if it is inserted in a |novoc| Arabic environment because its +% argument will have been processed by the |novoc| rules before the +% command |\fvarabic| itself can see it. +% +% \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of +% commands} command may be used to give any 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{\MkBreakArb{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.} % % \iffalse %<*example> % \fi \begin{arabluacode} -\begin{arab} + \MkArbBreak{fvred} + \newcommand{\fvred}[1]{\textcolor{red}{\arb[fullvoc]{#1}}} +\begin{arab}[voc] _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI - \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA - binA'-a la-hum yu'amminu-hum mina 'l-^sams-i. + \fvred{((ma.tli`-i 'l-^sams-i))} wa-lA binA'-a la-hum + yu'amminu-hum mina 'l-^sams-i. \end{arab} \end{arabluacode} % \iffalse @@ -3196,7 +3253,7 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabluatex}% -[2017/06/20 v1.8.5 An ArabTeX-like interface for LuaLaTeX] +[2017/07/05 v1.9 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} % \end{macrocode} % \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning @@ -3288,8 +3345,12 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macrocode} % \end{macro} % \begin{macro}{\MkArbBreak} -% \changes{v1.9}{2017/07/02}{New \cs{MkArbBreak} command for inserting +% \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 may 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{macrocode} \DeclareDocumentCommand{\MkArbBreak}{m}{% \luadirect{mkarbbreak(\luastringN{#1})}} -- cgit v1.2.3