aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2017-07-04 20:59:47 +0200
committerRobert Alessi <alessi@robertalessi.net>2017-07-04 20:59:47 +0200
commite501d995d5e549ed421e3134433c1554da85ac26 (patch)
tree7312417225ef5e4cf818d5cdf99ecd303349644a
parentca731fe0d91b4f741ba1745ff3fc5b22a5d1472a (diff)
downloadarabluatex-e501d995d5e549ed421e3134433c1554da85ac26.tar.gz
documentation updated; getting close to v1.9
-rw-r--r--arabluatex.dtx107
1 files 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 @@
27%<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 27%<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
28%<package-info>\ProvidesPackage{arabluatex} 28%<package-info>\ProvidesPackage{arabluatex}
29%<*package-info> 29%<*package-info>
30 [2017/06/20 v1.8.5 An ArabTeX-like interface for LuaLaTeX] 30 [2017/07/05 v1.9 An ArabTeX-like interface for LuaLaTeX]
31%</package-info> 31%</package-info>
32% 32%
33%<*driver> 33%<*driver>
@@ -155,7 +155,7 @@
155\defaultfontfeatures{RawFeature={+liga}} 155\defaultfontfeatures{RawFeature={+liga}}
156\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, 156\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps},
157 RawFeature={+mark;+ccmp;+ss05;+ss06}] 157 RawFeature={+mark;+ccmp;+ss05;+ss06}]
158\usepackage{arabluatex}[2017/06/20] 158\usepackage{arabluatex}[2017/07/05]
159\usepackage[nopar]{quran} 159\usepackage[nopar]{quran}
160\usepackage{varioref} 160\usepackage{varioref}
161\usepackage{hyperxmp} 161\usepackage{hyperxmp}
@@ -227,7 +227,7 @@
227%</driver> 227%</driver>
228% \fi 228% \fi
229% 229%
230% \CheckSum{0} 230% \CheckSum{704}
231% 231%
232% \CharacterTable 232% \CharacterTable
233% {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 233% {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).
760% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 760% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
761% \endhead \footnotetext{See below \vref{sec:transliteration}.} 761% \endhead \footnotetext{See below \vref{sec:transliteration}.}
762% \label{tab:arabtex-consonants} 762% \label{tab:arabtex-consonants}
763% \arb[voc]{'i 'a 'u}\footnote{For \arb[trans]{'alif} as a consonant, 763% \arb[voc]{'i 'a 'u}\footnote{See below, \emph{Rem{.} a.} For
764% see \textcite[i. 16 D]{Wright}. The \arb[trans]{hamzaT} itself is 764% \arb[trans]{'alif} as a consonant, see \textcite[i. 16
765% encoded \texttt{<'>} and may be followed by either \meta{u, a} or 765% D]{Wright}. The \arb[trans]{hamzaT} itself is encoded \texttt{<'>}
766% \meta{i}. See below \vref{ref:hamza}.} & \dmg{'u 'a 'i} & 766% and may be followed by either \meta{u, a} or \meta{i}. See below
767% \vref{ref:hamza}.} & \dmg{'u 'a 'i} &
767% \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\ 768% \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\
768% \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\ 769% \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\
769% \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\ 770% \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\
@@ -791,11 +792,45 @@ vowels (see §~3).
791% \arb[novoc]{n} & \dmg{n} & \loc{n} & \brill{n} & |n| \\ 792% \arb[novoc]{n} & \dmg{n} & \loc{n} & \brill{n} & |n| \\
792% \arb[novoc]{h} & \dmg{h} & \loc{h} & \brill{h} & |h| \\ 793% \arb[novoc]{h} & \dmg{h} & \loc{h} & \brill{h} & |h| \\
793% \arb[novoc]{w} & \dmg{w} & \loc{w} & \brill{w} & |w| \\ 794% \arb[novoc]{w} & \dmg{w} & \loc{w} & \brill{w} & |w| \\
794% \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y| \\ 795% \arb[novoc]{y} & \dmg{y} & \loc{y} & \brill{y} & |y|\footnote{For
796% the letter \arb[novoc]{.y} with no diacritical point below, see
797% \emph{Rem{.} b.} below.} \\
795% \arb[novoc]{T} & \dmg{aT} & \loc{aT} & \brill{aT} & |T| \\ 798% \arb[novoc]{T} & \dmg{aT} & \loc{aT} & \brill{aT} & |T| \\
796% \bottomrule 799% \bottomrule
797% \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\ (consonants)} 800% \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\ (consonants)}
798% \end{longtable} 801% \end{longtable}
802% \begin{quoting}
803% \textsc{Rem.}~\emph{a.} Please note that in all cases of elision,
804% the \arb[trans]{'alifu 'l-wa.sli} is expressed only by the vowel
805% that accompanies the omitted \arb[trans]{hamzaT}: \meta{u, a, i}
806% as in |wa-inhazama| \arb[fullvoc]{wa-inhazama}
807% \arb[trans]{wa-inhazama}. For more details on the definite article
808% and the \arb[trans]{'alifu 'l-wa.sli} see
809% \vref{ref:definite-article}.
810%
811% That said, \arb{.A} as a consonant is actually the \emph{spiritus
812% lenis} of the Greeks and is distinguished by the
813% \arb[trans]{hamzaT} \arb[novoc]{(|"')} as it is shown in the above
814% table. However, the bare \arb[trans]{'alif} may also be encoded as
815% |.A| whether it be followed by a vowel or not, like so: |wa-.An|
816% \arb{wa-.An} \arb[trans]{wa-.An} (where the dot symbolizes the
817% absence of vowel), |wa-.Aan| \arb{wa-.Aan} \arb[trans]{wa-.Aan},
818% |wa-.Ain| \arb{wa-.Ain} \arb[trans]{wa-.Ain}.
819%
820% \textsc{Rem.}~\emph{b.} The letter \arb[novoc]{y} with two points
821% below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be
822% written without diacritical points as \arb[novoc]{Y}. When it is
823% used as a consonant, it is encoded |aY|, where |a| recalls the
824% \arb[trans]{fat.haT} placed above the preceding letter in
825% vocalized Arabic, like so: |qaY'uN| \arb{qaY'uN}
826% \arb[trans]{qaY'uN}, |^saY'uN| \arb{^saY'uN} \arb[trans]{^saY'uN},
827% |^saY'aN| \arb[trans]{^saY'aN} \arb{^saY'aN}.
828%
829% The same result may be achieved by encoding this letter as |.y|,
830% like so: |qa.y'uN| \arb{qa.y'uN} \arb[trans]{qa.y'uN}, |^sa.y'uN|
831% \arb{^sa.y'uN} \arb[trans]{^sa.y'uN}, |^sa.y'aN|
832% \arb[trans]{^sa.y'aN} \arb{^sa.y'aN}.
833% \end{quoting}
799% 834%
800% \subsection{Additional characters} 835% \subsection{Additional characters}
801% \changes{v1.8.5}{2017/06/20}{Six additional Persian characters are 836% \changes{v1.8.5}{2017/06/20}{Six additional Persian characters are
@@ -823,7 +858,7 @@ vowels (see §~3).
823% included in this standard. However, as \texttt{arabica} is based on 858% included in this standard. However, as \texttt{arabica} is based on
824% \texttt{dmg}, the \texttt{dmg} equivalents have been used here.} 859% \texttt{dmg}, the \texttt{dmg} equivalents have been used here.}
825% \label{tab:arabtex-additional-characters} 860% \label{tab:arabtex-additional-characters}
826% \arb[novoc]{p} & \dmg{p} & \loc{p} & \brill{p} & \verb|p| \\ 861% \hskip-1em\arb[novoc]{p} & \dmg{p} & \loc{p} & \brill{p} & \verb|p| \\
827% \arb[novoc]{^c} & \dmg{^c} & \loc{^c} & \brill{^c} & \verb|^c| \\ 862% \arb[novoc]{^c} & \dmg{^c} & \loc{^c} & \brill{^c} & \verb|^c| \\
828% \arb[novoc]{^z} & \dmg{^z} & \loc{^z} & \brill{^z} & \verb|^z| \\ 863% \arb[novoc]{^z} & \dmg{^z} & \loc{^z} & \brill{^z} & \verb|^z| \\
829% \arb[novoc]{v}\footnote{\label{fn:not-in-dmg}This character is not found in 864% \arb[novoc]{v}\footnote{\label{fn:not-in-dmg}This character is not found in
@@ -862,7 +897,9 @@ vowels (see §~3).
862% \label{tab:arabtex-long-vowels} 897% \label{tab:arabtex-long-vowels}
863% \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\ 898% \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\
864% \arb[novoc]{U} & \dmg{U} & \loc{U} & \brill{U} & \verb|U| \\ 899% \arb[novoc]{U} & \dmg{U} & \loc{U} & \brill{U} & \verb|U| \\
865% \arb[novoc]{I} & \dmg{I} & \loc{I} & \brill{I} & \verb|I| \\ 900% \arb[novoc]{I} & \dmg{I} & \loc{I} & \brill{I} &
901% \verb|I|\footnote{For the letter \arb[novoc]{I} with no diacritical
902% points, see \emph{Rem{.} c.} below.} \\
866% \arb[novoc]{_A}\footnote{$=$ \arb[trans]{al-'alif-u 'l-maq.sUraT-u}.} 903% \arb[novoc]{_A}\footnote{$=$ \arb[trans]{al-'alif-u 'l-maq.sUraT-u}.}
867% & \dmg{_A} & \loc{_A} & \brill{_A} & \verb|_A| or \verb|Y| \\ 904% & \dmg{_A} & \loc{_A} & \brill{_A} & \verb|_A| or \verb|Y| \\
868% \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\ 905% \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\
@@ -895,7 +932,7 @@ vowels (see §~3).
895% \textsc{Rem.}~\emph{c.} The letter \arb[novoc]{y} with two points 932% \textsc{Rem.}~\emph{c.} The letter \arb[novoc]{y} with two points
896% below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be 933% below, \arb{al-yA'u 'l-mu_tannATu min ta.hti-hA}, may also be
897% written without diacritical points as \arb[novoc]{Y}. When it is 934% written without diacritical points as \arb[novoc]{Y}. When it is
898% used as a long vowel, it is encoded |iY|, which recalls the 935% used as a long vowel, it is encoded |iY|, where |i| recalls the
899% \arb[trans]{kasraT} placed below the preceding letter in vocalized 936% \arb[trans]{kasraT} placed below the preceding letter in vocalized
900% Arabic, like so: |liY| \arb{liY} \arb[trans]{liY}, |yam^siY| 937% Arabic, like so: |liY| \arb{liY} \arb[trans]{liY}, |yam^siY|
901% \arb{yam^siY} \arb[trans]{yam^siY}. 938% \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...
2870%</example> 2907%</example>
2871% \fi 2908% \fi
2872% 2909%
2873% \section{New commands to be inserted in Arabic 2910% \subsection{New commands}
2874% environments}
2875% \label{sec:declare-new-commands} 2911% \label{sec:declare-new-commands}
2912% \NEWfeature{v1.9}%
2876% In some particular cases, it may be useful to define new commands to 2913% In some particular cases, it may be useful to define new commands to
2877% be inserted in Arabic environments. From the general principle laid 2914% be inserted in Arabic environments. From the general principle laid
2878% \vpageref{ref:cmd-inside-arabic}, it follows that 2915% \vpageref{ref:cmd-inside-arabic}, it follows that any command that
2879% 2916% is found inside an Arabic environment is assumed to have Arabic text
2880% For example, to distinguish words with a different 2917% in its argument which \package{arabluatex} will process as such
2881% color,\footnote{See below \vref{sec:textcolor} for more information 2918% before passing it on to the command itself for any further
2882% on two-argument commands.} one may proceed like so:--- % 2919% processing. As a result of this feature, such a command as:\\
2920% \arabluaverb{\newcommand{\fvarabic}[1]{\arb[fullvoc]{#1}}}\\
2921% will work as expected, but will always output non-vocalized Arabic
2922% if it is inserted in a |novoc| Arabic environment because its
2923% argument will have been processed by the |novoc| rules before the
2924% command |\fvarabic| itself can see it.
2925%
2926% \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of
2927% commands} command may be used to give any command---either new or
2928% already existing---the precedence over \package{arabluatex} inside
2929% Arabic environments. It takes as argument a comma-separated list of
2930% commands each of which must be stripped of its leading
2931% character |\|, like so:---\\
2932% \arabluaverb{\MkBreakArb{onecmd, anothercmd, yetanothercmd, ...}}
2933%
2934% For example, here follows a way to define a new command |\fvred| to
2935% distinguish words with a different color and always print them in
2936% fully vocalized Arabic:---\footnote{See below \vref{sec:textcolor} for
2937% more information on two-argument commands.} %
2883% \iffalse 2938% \iffalse
2884%<*example> 2939%<*example>
2885% \fi 2940% \fi
2886\begin{arabluacode} 2941\begin{arabluacode}
2887\begin{arab} 2942 \MkArbBreak{fvred}
2943 \newcommand{\fvred}[1]{\textcolor{red}{\arb[fullvoc]{#1}}}
2944\begin{arab}[voc]
2888 _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI 2945 _tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI
2889 \textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}} wa-lA 2946 \fvred{((ma.tli`-i 'l-^sams-i))} wa-lA binA'-a la-hum
2890 binA'-a la-hum yu'amminu-hum mina 'l-^sams-i. 2947 yu'amminu-hum mina 'l-^sams-i.
2891\end{arab} 2948\end{arab}
2892\end{arabluacode} 2949\end{arabluacode}
2893% \iffalse 2950% \iffalse
@@ -3196,7 +3253,7 @@ wa-ya.sIru ta.hta 'l-jild-i
3196% \begin{macrocode} 3253% \begin{macrocode}
3197\NeedsTeXFormat{LaTeX2e} 3254\NeedsTeXFormat{LaTeX2e}
3198\ProvidesPackage{arabluatex}% 3255\ProvidesPackage{arabluatex}%
3199[2017/06/20 v1.8.5 An ArabTeX-like interface for LuaLaTeX] 3256[2017/07/05 v1.9 An ArabTeX-like interface for LuaLaTeX]
3200\RequirePackage{ifluatex} 3257\RequirePackage{ifluatex}
3201% \end{macrocode} 3258% \end{macrocode}
3202% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning 3259% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning
@@ -3288,8 +3345,12 @@ wa-ya.sIru ta.hta 'l-jild-i
3288% \end{macrocode} 3345% \end{macrocode}
3289% \end{macro} 3346% \end{macro}
3290% \begin{macro}{\MkArbBreak} 3347% \begin{macro}{\MkArbBreak}
3291% \changes{v1.9}{2017/07/02}{New \cs{MkArbBreak} command for inserting 3348% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for inserting
3292% user-defined macros in Arabic environments} 3349% user-defined macros in Arabic environments}
3350% The \cs{MkArbBreak}\marg{csv list of commands} command may be used
3351% to give any command---either new or already existing---the
3352% precedence over \package{arabluatex} inside Arabic environments. It
3353% is actually coded in Lua.
3293% \begin{macrocode} 3354% \begin{macrocode}
3294\DeclareDocumentCommand{\MkArbBreak}{m}{% 3355\DeclareDocumentCommand{\MkArbBreak}{m}{%
3295 \luadirect{mkarbbreak(\luastringN{#1})}} 3356 \luadirect{mkarbbreak(\luastringN{#1})}}