summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-05 21:09:03 +0000
committerKarl Berry <karl@freefriends.org>2017-07-05 21:09:03 +0000
commitef1531fb8bdf4a1e28e97cc10e3aacd9228e7d0c (patch)
treeffb320f47bca9a18c20a5f9436dc0c73f737ad64 /Master/texmf-dist/source/lualatex
parent1481c02c171fb8ab30680dc4f3fbc5b872f2de16 (diff)
arabluatex (5jul17)
git-svn-id: svn://tug.org/texlive/trunk@44754 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/lualatex')
-rw-r--r--Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx190
1 files changed, 157 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
index 4da27457c37..3cd91982679 100644
--- a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
+++ b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
@@ -27,7 +27,7 @@
%<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package-info>\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]
%</package-info>
%
%<*driver>
@@ -109,7 +109,7 @@
title = {Information and Documentation - Romanization of the
Arabic Alphabet for Arabic, Ottoman-Turkish,
Persian, Kurdish, Urdu and Pushto},
- date = {2011/07},
+ date = {2011-07},
url = {http://www.din.de}
}
@@ -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 @@
%</driver>
% \fi
%
-% \CheckSum{700}
+% \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,12 @@ vowels (see §~3).
% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule
% \endhead \footnotetext{See below \vref{sec:transliteration}.}
% \label{tab:arabtex-consonants}
-% \arb[novoc]{a}\footnote{For \arb[trans]{'alif} as a consonant, see
-% \textcite[i. 16 D]{Wright}. The \arb[trans]{hamzaT} itself is
-% encoded \texttt{<'>}. See below \vref{ref:hamza}.} & \dmg{a} &
-% \loc{a} & \brill{a} & \verb|a| \\
+% \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| \\
% \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & \brill{_t} & |_t| \\
@@ -790,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
@@ -822,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
@@ -861,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| \\
@@ -890,6 +928,14 @@ vowels (see §~3).
% \arb[voc]{al-mal_a'ikaT-u 'l-ra.hm_an-u}, |.hu_dayfaT-u| |bn-u|
% |'l-yamAn_i| \arb[fullvoc]{.hu_dayfaT-u bn-u 'l-yamAn_i} for
% \arb[trans]{\cap{.hu_dayfaT-u} bn-u 'l-\cap{yamAn_i}}, etc.
+%
+% \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|, 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}.
% \end{quoting}
%
% \subsubsection{Short vowels}
@@ -1161,7 +1207,11 @@ vowels (see §~3).
% |.daw'uN| \arb[voc]{.daw'uN} \arb[trans]{.daw'uN}, |qay'iN|
% \arb[voc]{qay'iN} \arb[trans]{qay'iN}, |^sifA'I|
% \arb[voc]{^sifA'I} \arb[trans]{^sifA'I}, |man^sa'I|
-% \arb[trans]{man^sa'I} \arb[voc]{man^sa'I}.
+% \arb[trans]{man^sa'I} \arb[voc]{man^sa'I}, |nisA'uN|
+% \arb[voc]{nisA'uN} \arb[trans]{ni\-sA'uN}, |nisA'u-hu|
+% \arb[voc]{nisA'u-hu} \arb[trans]{nisA'u-hu}, |nisA'i-hi|
+% \arb[voc]{nisA'i-hi} \arb[trans]{nisA'i-hi}, |nisA'I|
+% \arb[voc]{nisA'I} \arb[trans]{nisA'I}.
%
% |^say'uN| \arb[voc]{^say'uN} \arb[trans]{^say'uN}, |^say'aN|
% \arb[voc]{^say'aN} \arb[trans]{^say'aN}, |^say'iN|
@@ -2794,23 +2844,7 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i
% \DescribeMacro{\RL} \cs{RL}\marg{arg} does the same as
% \cs{LR}\marg{arg}, but typesets its argument from right to left. Even
% in an Arabic environment, this command may be useful.
-%
-% For example, to distinguish words with a different color, one may
-% proceed like so:---
-% \iffalse
-%<*example>
-% \fi
-\begin{arabluacode}
-\begin{arab}
-_tumma "intalaqa _dU 'l-qarn-ayni 'il_A 'ummaT-iN 'u_hr_A fI
-\LR{\textcolor{red}{\arb[fullvoc]{((ma.tli`-i 'l-^sams-i))}}}
-wa-lA binA'-a la-hum yu'amminu-hum mina 'l-^sams-i.
-\end{arab}
-\end{arabluacode}
-% \iffalse
-%</example>
-% \fi
-%
+%
% \DescribeMacro{\LRfootnote} \DescribeMacro{\RLfootnote}
% \cs{LRfootnote}\marg{text} and \cs{RLfootnote}\marg{text} typeset
% left-to-right and right-to-left footnotes respectively in Arabic
@@ -2873,6 +2907,51 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
%</example>
% \fi
%
+% \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 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 in the preamble to give any
+% \emph{single-argument} 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{\MkArbBreak{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}
+ \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
+ \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
+%</example>
+% \fi
+%
% \subsection{Environments}
% \label{sec:environments}
% \changes{v1.5}{2016/11/14}{Environments may be nested inside the
@@ -3038,10 +3117,43 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
% initial state once the Arabic environment is closed. See the last
% line in the code above.
% \end{quoting}
-%
-% \subsection{\package{reledmac}}
+%
+% \subsection{Two-argument commands}
+% \label{sec:two-arg-cmds}
+%
+% \paragraph{Color}
+% \label{sec:textcolor}
+% The two-argument command \cs{textcolor}\marg{color}\marg{Arabic
+% text} is supported inside \cs{begin}|{arab}| \ldots\
+% \cs{end}|{arab}|. One simple example follows:--- %
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}
+\begin{arab}
+ \textcolor{red}{\cap{m}uha_d_dabu \cap{'l-d}Ini \cap{`a}bdu
+ \cap{'l-r}a.hImi bnu \cap{`a}liyyiN} huwa ^say_hu-nA 'l-'imAmu
+ 'l-.sadru 'l-kabIru 'l-`Alimu 'l-fA.dilu \cap{m}uha_d_dabu
+ \cap{'l-d}Ini \cap{'a}bU \cap{m}u.hammadiN \cap{`a}bdu
+ \cap{'l-r}a.hImi bnu \cap{`a}liyyi bni \cap{.h}AmidiN wa-yu`rafu
+ bi-\cap{'l-d}a_hwari.
+\end{arab}
+\begin{arab}[trans]
+ \textcolor{red}{\cap{m}uha_d_dabu \cap{'l-d}Ini \cap{`a}bdu
+ \cap{'l-r}a.hImi bnu \cap{`a}liyyiN} huwa ^say_hu-nA 'l-'imAmu
+ 'l-.sadru 'l-kabIru 'l-`Alimu 'l-fA.dilu \cap{m}uha_d_dabu
+ \cap{'l-d}Ini \cap{'a}bU \cap{m}u.hammadiN \cap{`a}bdu
+ \cap{'l-r}a.hImi bnu \cap{`a}liyyi bni \cap{.h}AmidiN wa-yu`rafu
+ bi-\cap{'l-d}a_hwari.
+\end{arab}
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi
+%
+% \paragraph{\package{reledmac}}
% \label{sec:reledmac}
-% The two-arguments command \cs{edtext}\marg{lemma}\marg{commands} is
+% The two-argument command \cs{edtext}\marg{lemma}\marg{commands} is
% supported inside \cs{begin}|{arab}| \ldots\ \cs{end}|{arab}|. As an
% example, one may get \package{arabluatex} and \package{reledmac} to
% work together like so:---
@@ -3142,7 +3254,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
@@ -3233,6 +3345,18 @@ wa-ya.sIru ta.hta 'l-jild-i
{\NewDocumentCommand{\RL}{m}{\bgroup\textdir TRT#1\rmfamily\egroup}}}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\MkArbBreak}
+% \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})}}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\aemph} Arabic emphasis. Needs to be redefined as well.
% \begin{macrocode}
\AtBeginDocument{\ifdef{\aemph}%