diff options
author | Karl Berry <karl@freefriends.org> | 2018-06-26 21:55:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-06-26 21:55:06 +0000 |
commit | 775480ef50d7ef9930bb2432b3f08611ce683f01 (patch) | |
tree | a61b08c56f979f1f81003a6551e087b13b00561d /Master/texmf-dist/source | |
parent | a781f9769e9b30ef860595d168a44217c2c57734 (diff) |
arabluatex (26jun18)
git-svn-id: svn://tug.org/texlive/trunk@48094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx | 1094 |
1 files changed, 822 insertions, 272 deletions
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx index 4b88bf9cd8e..2f6c92a7cdf 100644 --- a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx +++ b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX -% Copyright (C) 2016--2018 Robert Alessi +% Copyright (C) 2016--2018 Robert Alesssi % % Please send error reports and suggestions for improvements to Robert % Alessi <alessi@robertalessi.net> @@ -27,7 +27,7 @@ %<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package-info>\ProvidesPackage{arabluatex} %<*package-info> - [2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX] + [2018/06/24 v1.12 An ArabTeX-like interface for LuaLaTeX] %</package-info> % %<*driver> @@ -74,7 +74,7 @@ maintainer = {Hosny, Khaled}, title = {Amiri}, indextitle = {Amiri}, - date = {2015-09-20}, + date = {2017-12-13}, url = {http://www.amirifont.org/} } @@ -150,18 +150,19 @@ \usepackage[english]{babel} \usepackage{dox} \doxitem{Option}{option}{options} -%\def\actualchar{ =} % there's a bug in doxitem; quick fix. -\usepackage{fontspec,luatextra} +\usepackage{fontspec} +\usepackage{hologo} \defaultfontfeatures{RawFeature={+liga}} \setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}, RawFeature={+mark;+ccmp;+ss05;+ss06}] -\usepackage{arabluatex}[2018/03/31] +\usepackage{arabluatex}[2018/06/24] \usepackage[nopar]{quran} \usepackage[noindex]{nameauth} \usepackage{varioref} \usepackage{hyperxmp} \PassOptionsToPackage{pdfa}{hyperref} \usepackage{hypdoc} +\usepackage{bookmark} \usepackage{authblk} \hypersetup{unicode=true, colorlinks, allcolors=blue, linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The @@ -177,9 +178,15 @@ pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={Arabic language, arabtex, luatex}} \usepackage[scale=1.5]{ccicons} -\usepackage[toc,lot]{multitoc} -\usepackage{paralist} -\setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash} +\usepackage[lot]{multitoc} +\usepackage{enumitem} +\setlist{nosep} +\setlist[itemize]{label=\textendash} +\setlist[enumerate,1]{label=(\alph*)} +\setlist[enumerate,2]{label=\roman*.} +\newlist{enumabjad}{enumerate}{10} +\setlist[enumabjad]{label={\abjad{\arabic*}}} +\usepackage{multicol} \usepackage{cleveref} \usepackage{quoting} \quotingsetup{noorphans, rightmargin=0pt} @@ -189,6 +196,7 @@ \usepackage{longtable} \usepackage{booktabs} \usepackage[defaultlines=3,all]{nowidow} +\usepackage{needspace} \usepackage{tikz} \usepackage[breakable, skins, listings, xparse]{tcolorbox} \DeclareTCBListing{arabluacode}{s O{}}{colback=white, boxrule=.15mm, @@ -213,6 +221,26 @@ \usepackage[style=authoryear, indexing=cite]{biblatex} \DeclareIndexFieldFormat{indextitle}{\index{#1=\emph{#1}}} \addbibresource{arabluatex.bib} +\usepackage{etoc} +\etocsettocdepth{paragraph} +\newcommand{\altableofcontents}{% + \begingroup + \etocsetstyle{section}{}{} + {\etocsavedsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{} + \etocsetstyle{subsection}{}{} + {\etocsavedsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{subsubsection}{}{} + {\etocsavedsubsubsectiontocline{% + \numberline{\etocnumber}\etocname}{\etocpage}}{}% + \etocsetstyle{paragraph}{}{\leftskip2cm\rightskip 2.2em \parfillskip + 0pt plus 1fil\relax \nobreak} + {\noindent\etocname{} \etocpage{} }{\par}% + \etocmulticolstyle[2]{\section*{Contents}} + \pdfbookmark[1]{Contents}{toc} + \tableofcontents + \endgroup} \EnableCrossrefs \RecordChanges \CodelineIndex @@ -229,7 +257,7 @@ %</driver> % \fi % -% \CheckSum{728} +% \CheckSum{784} % % \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 @@ -290,21 +318,17 @@ % % \author{Robert Alessi \\ % \href{mailto:alessi@robertalessi.net?Subject=arabluatex}% -% {\texttt{alessi@robertalessi.net}}\thanks{Institutional email: -% \href{mailto:robert.alessi@cnrs.fr?Subject=arabluatex}% -% {\texttt{robert.alessi@cnrs.fr}}}} -% \affil{\normalsize CNRS UMR 8167 Paris (France)} +% {\texttt{alessi@robertalessi.net}}} % \date{} % % \maketitle % \footnotesize -% \tableofcontents -% \pagebreak +% \altableofcontents % \listoftables % \normalsize % % \begin{abstract} -% This package provides for \LuaLaTeX\ an Arab{\TeX}-like interface +% This package provides for \hologo{LuaLaTeX} an Arab{\TeX}-like interface % to generate Arabic writing from an \textsc{ascii} % transliteration. It is particularly well-suited for complex % documents such as technical documents or critical editions where a @@ -330,14 +354,14 @@ % % Please send error reports and suggestions for improvements to Robert % Alessi: -% \begin{compactitem} +% \begin{itemize} % \item email: <\href{mailto:alessi@robertalessi.net?Subject=arabluatex}% % {\texttt{alessi@robertalessi.net}}> % \item website: \url{http://www.robertalessi.net/arabluatex} % \item development: \url{http://git.robertalessi.net/arabluatex} % \item comments, feature requests, bug reports: % \url{https://notabug.org/ralessi/arabluatex/issues} -% \end{compactitem} +% \end{itemize} % % \marginpar{\texttt{gpl3+}} % This program is free software: you can redistribute it and/or modify @@ -356,7 +380,7 @@ % % This release of \package{arabluatex} consists of the following % source files: -% \begin{compactitem} +% \begin{itemize} % \item |arabluatex.ins| % \item |arabluatex.dtx| % \item |arabluatex.lua| @@ -365,7 +389,7 @@ % \item |arabluatex_novoc.lua| % \item |arabluatex_trans.lua| % \item |arabluatex.el| -% \end{compactitem} +% \end{itemize} % % \subsection*{License applicable to this document} % \label{sec:documentation-license} @@ -381,10 +405,10 @@ % % \section{Introduction} % In comparison to Prof. Lagally's outstanding Arab\TeX,\footnote{See -% \url{http://ctan.org/pkg/arabtex}} Arab\LuaTeX\ is at present +% \url{http://ctan.org/pkg/arabtex}} Arab\hologo{LuaTeX} is at present % nothing more than a modest piece of software. Hopefully---if I may % say so---it will eventually provide all of its valuable qualities to -% the \LuaLaTeX\ users. +% the \hologo{LuaLaTeX} users. % % \package{arabtex} dates back to 1992. As far as I know, it was then % the first and only way to typeset Arabic texts with \TeX\ and @@ -445,18 +469,18 @@ % lexicons that can be searched, analyzed and correlated in various % ways. % -%\subsection{\package{arabluatex} is for \LuaLaTeX} +%\subsection{\package{arabluatex} is for \hologo{LuaLaTeX}} % It goes without saying that \package{arabluatex} requires -% \LuaLaTeX. \TeX\ and \LaTeX\ have \package{arabtex}, and \XeLaTeX\ -% has \package{arabxetex}. Both of them are much more advanced than -% \package{arabluatex}, as they can process a number of different -% languages,\footnote{\label{fn:arabtex-languages}To date, both -% packages support Arabic, Maghribi, Urdu, Pashto, Sindhi, Kashmiri, -% Uighuric and Old Malay; in addition to these, \package{arabtex} also -% has a Hebrew mode, including Judeo-Arabic and Yiddish.} whereas -% \package{arabluatex} can process only Arabic for the time -% being. More languages will be included in future releases of -% \package{arabluatex}. +% \hologo{LuaLaTeX}. \TeX\ and \LaTeX\ have \package{arabtex}, and +% \hologo{XeLaTeX} has \package{arabxetex}. Both of them are much more +% advanced than \package{arabluatex}, as they can process a number of +% different languages,\footnote{\label{fn:arabtex-languages}To date, +% both packages support Arabic, Maghribi, Urdu, Pashto, Sindhi, +% Kashmiri, Uighuric and Old Malay; in addition to these, +% \package{arabtex} also has a Hebrew mode, including Judeo-Arabic and +% Yiddish.} whereas \package{arabluatex} can process only Arabic for +% the time being. More languages will be included in future releases +% of \package{arabluatex}. % % In comparison to \package{arabxetex}, \package{arabluatex} works in % a very different way. The former relies on the @@ -476,22 +500,22 @@ % % \section{The basics of \package{arabluatex}} % \subsection{Activating \package{arabluatex}} -% As usual put in your preamble:\\ +% \package{arabluatex} is loaded the usual way:\\ % \arabluaverb{\usepackage{arabluatex}}\\ -% The only requirement of \package{arabluatex} is \LuaLaTeX; it will -% complain if you try to compile your document with another +% The only requirement of \package{arabluatex} is \hologo{LuaLaTeX}; +% it will complain if the document is compiled with another % engine. That aside, \package{arabluatex} does not load packages such -% as \package{polyglossia} or \package{luabidi}. It can work with -% \package{polyglossia} though, but does not require it. +% as \package{polyglossia}. Although it can work with +% \package{polyglossia}, it does not require it. % % \paragraph{Font setup} -% If you wish to use your own Arabic font, you can define it before -% loading \package{arabluatex}. Assuming that \package{fontspec} is -% loaded, put this in your preamble just above the line that loads -% \package{arabluatex}: +% Any Arabic font can be defined to be used with +% \package{arabluatex}. For example, assuming that \package{fontspec} +% is loaded, this line may be inserted in the preamble, just above the +% line that loads \package{arabluatex}: % \arabluabox{\cs{newfontfamily}\cs{arabicfont}\marg{fontname}[Script=Arabic]} % \noindent where \meta{fontname} is the standard name of the Arabic -% font you wish to use. +% font to be used. % % By default, if no Arabic font is selected, \package{arabluatex} will % issue a warning message and attempt to load the Amiri @@ -507,7 +531,7 @@ % of the \arb[trans]{kasraT} above the consonant may be obtained by % selecting the |ss05| feature of the Amiri font, like % so:---\footnote{See the documentation of \package{amiri}, -% \textcite[5]{pkg:amiri}.}\\ +% \textcite[6]{pkg:amiri}.}\\ % \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]} % % Other Arabic fonts may behave differently. @@ -544,12 +568,12 @@ % transliterates the Arab\TeX\ input into one of the accepted % standards. At present, three standards are supported (see below % \vref{sec:transliteration} for more details): -% \begin{compactdesc} +% \begin{description} % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which is % selected by default; % \item[loc] \emph{Library of Congress}; % \item[arabica] \emph{Arabica}. -% \end{compactdesc} +% \end{description} % More standards will be included in future releases of % \package{arabluatex}. % @@ -558,7 +582,7 @@ % \NEWfeature{v.1.2} By default, \package{arabluatex} typesets Arabic % in a classic, traditional style the most prominent features of which % are the following: -% \begin{compactitem} +% \begin{itemize} % \item \enquote*{Classic} \arb[trans]{maddaT}: when % \arb[trans]{'alif} and \arb[trans]{hamzaT} accompanied by a simple % vowel or \arb[trans]{tanwIn} is preceded by an \arb[trans]{'alif} of @@ -592,62 +616,61 @@ advisable to use \cs{SetArbEasy}. % \iffalse %</example> % \fi -% \end{compactitem} +% \end{itemize} % -% \DescribeMacro{\SetArbEasy} \NEWfeature{v1.4.4} -% \DescribeMacro{\SetArbEasy*} \DescribeMacro{\SetArbDflt} Such -% refinements as \enquote*{classic} \arb[trans]{maddaT} may be -% discarded by the \cs{SetArb\allowbreak{}Easy} command, either -% globally in the preamble or locally at any point of the -% document. The difference between \cs{SetArbEasy} and its -% \enquote*{starred} version \cs{SetArbEasy*} is that the former keeps -% the \arb[trans]{sukUn} that is generated by the |fullvoc| mode, -% while the latter further takes it away. Default \enquote*{classic} -% rules may be set back at any point of the document with the -% \cs{SetArbDflt} command. \NEWfeature{v1.6} -% \DescribeMacro{\SetArbDflt*}Assimilation rules laid on -% \vref{ref:assimilation} may also be applied by the +% \DescribeMacro{\SetArbEasy} \NEWfeature{v1.4.4} Such refinements as +% \enquote*{classic} \arb[trans]{maddaT} may be discarded by the +% \cs{SetArbEasy} command, either globally in the preamble or locally +% at any point of the document. The difference between \cs{SetArbEasy} +% and its \enquote*{starred} version +% \DescribeMacro{\SetArbEasy*}\cs{SetArbEasy*} is that the former +% keeps the \arb[trans]{sukUn} that is generated by the |fullvoc| +% mode, while the latter further takes it away. Default +% \enquote*{classic} rules may be set back at any point of the +% document with the \DescribeMacro{\SetArbDflt}\cs{SetArbDflt} +% command. \NEWfeature{v1.6} \DescribeMacro{\SetArbDflt*}Assimilation +% rules laid on \vref{ref:assimilation} may also be applied by the % \enquote*{starred} version of this command \cs{SetArbDflt*} either % in the preamble or at any point of the document.\footnote{For an % example, see \vref{sec:poetry-example}.} Examples follow:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \cs{SetArbDflt}: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbDflt*}: -% \begin{compactenum}[i.]\SetArbDflt* +% \begin{enumerate}\SetArbDflt* % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbEasy}: -% \begin{compactenum}[i.]\SetArbEasy +% \begin{enumerate}\SetArbEasy % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} +% \end{enumerate} % \item \cs{SetArbEasy*}: -% \begin{compactenum}[i.]\SetArbEasy* +% \begin{enumerate}\SetArbEasy* % \item |voc| \arb[voc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |fullvoc| \arb[fullvoc]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i} % \item |trans| \arb[trans]{wa-mAta istisqA'aN qabla 'an yutimma % kitAba-hu fI nujUm-i 'l-samA'-i}\SetArbDflt -% \end{compactenum} -% \end{compactenum} +% \end{enumerate} +% \end{enumerate} % % \iffalse %<*example> @@ -694,9 +717,9 @@ vowels (see §~3). %<*example> % \fi \begin{arabluacode} - \begin{enumerate}[XVI.] + \begin{enumerate}[label=\Roman*., start=16] \item \indent\arb{fawA`ilu}*. - \begin{enumerate}[1.] + \begin{enumerate}[label=\arabic*.] \item \indent\arb{fA`aluN}; as \arb{_hAtamuN} \emph{a signet-ring}, ... \end{enumerate} @@ -755,12 +778,12 @@ vowels (see §~3). % document, as the \cs{arb} command may take any of the |voc|, % |fullvoc|, |novoc| or |trans| modes as optional argument, like % so:--- -% \begin{compactitem} +% \begin{itemize} % \item \DescribeOption{voc} \cs{arb}|[voc]|\marg{Arabic text}; % \item \DescribeOption{fullvoc} \cs{arb}|[fullvoc]|\marg{Arabic text}; % \item \DescribeOption{novoc} \cs{arb}|[novoc]|\marg{Arabic text}; % \item \DescribeOption{trans} \cs{arb}|[trans]|\marg{Arabic text}. -% \end{compactitem} +% \end{itemize} % % The same optional arguments may be passed to the environment |arab|: % one may have \cs{begin}|{arab}|\oarg{mode}|...|\cs{end}|{arab}|, @@ -771,7 +794,8 @@ vowels (see §~3). %\subsection{Consonants} % \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for % all of the Arabic consonants. -% +% +% \needspace{7\baselineskip} % \newcommand{\dmg}[1]{% % \SetTranslitConvention{dmg}% % \arb[trans]{#1}} @@ -782,6 +806,10 @@ vowels (see §~3). % \SetTranslitConvention{arabica}% % \arb[trans]{#1}\SetTranslitConvention{dmg}} % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-consonants}: Standard Arab\TeX\ +% (consonants)} +% \endfoot % \captionlistentry{Arab\TeX\ consonants}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -830,8 +858,6 @@ vowels (see §~3). % the letter \arb[novoc]{.y} with no diacritical points 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, @@ -873,6 +899,10 @@ vowels (see §~3). % the Arab\TeX\ equivalents for some additional Persian characters. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-additional-characters}: Standard +% Arab\TeX\ (additional characters)} +% \endfoot % \captionlistentry{Arab\TeX\ additional characters}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -901,9 +931,6 @@ vowels (see §~3). % \arb[novoc]{g} & \dmg{g} & \loc{g} & \brill{g} & \verb|g| \\ % \arb[novoc]{^n}\footnote{See \cref{fn:not-in-dmg}.} & \dmg{^n} & % \loc{^n} & \brill{^n} & \verb|^n| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-additional-characters}: Standard -% Arab\TeX\ (additional characters)} % \end{longtable} % \begin{quoting} % \textsc{Rem.} The alveolar consonants \arb[novoc]{^c} and @@ -915,8 +942,13 @@ vowels (see §~3). % \subsubsection{Long vowels} % \Cref{tab:arabtex-long-vowels} gives the Arab\TeX\ equivalents for % the Arabic long vowels. -% +% +% \needspace{7\baselineskip} % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-long-vowels}: Standard Arab\TeX\ (long +% vowels)} +% \endfoot % \captionlistentry{Arab\TeX\ long vowels}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -939,8 +971,6 @@ vowels (see §~3). % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & \verb|_a| \\ % \arb[novoc]{B_u} & \dmg{B_u} & \loc{B_u} & \brill{B_u} & \verb|_u| \\ % \arb[novoc]{B_i} & \dmg{B_i} & \loc{B_i} & \brill{B_i} & \verb|_i| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-long-vowels}: Standard Arab\TeX\ (long vowels)} % \end{longtable} % % \begin{quoting} @@ -977,6 +1007,10 @@ vowels (see §~3). % the Arabic short vowels. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-short-vowels}: Standard Arab\TeX\ +% (short vowels)} +% \endfoot % \captionlistentry{Arab\TeX\ short vowels}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -995,8 +1029,6 @@ vowels (see §~3). % \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \brill{BaN} & \verb|aN| \\ % \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \brill{BuN} & \verb|uN| \\ % \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \brill{BiN} & \verb|iN| \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-short-vowels}: Standard Arab\TeX\ (short vowels)} % \end{longtable} % % Whether Arabic texts be vocalized or not is essentially a matter of @@ -1021,7 +1053,7 @@ vowels (see §~3). % That said, there is no need to write the short vowels % \arb[trans]{fat.haT}, \arb[trans]{.dammaT} or \arb[trans]{kasraT} % except in the following cases:--- -% \begin{compactitem} +% \begin{itemize} % \item at the commencement of a word, to indicate that a connective % \arb[trans]{'alif} is needed, with the exception of the article (see % below \vref{sec:quoting}); @@ -1029,7 +1061,7 @@ vowels (see §~3). % analysis to determine the carrier of the \arb[trans]{hamzaT}; % \item in the various transliteration modes, as vowels are always % expressed in romanized Arabic. -% \end{compactitem} +% \end{itemize} % %\section{\package{arabluatex} in action} %\subsection{The vowels and diphthongs} @@ -1055,19 +1087,19 @@ vowels (see §~3). % \arb[voc]{murU'aTuN} \arb[trans]{murU'aTuN}. % \end{quote} % -% \paragraph{\arb[trans]{'alif maq.sUraT}} It is written \meta{\_A} or -% \meta{Y}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif maq.sUraT}}{ʾalif +% maqṣūrah}} It is written \meta{\_A} or \meta{Y}: % \begin{quote} % |al-fat_A| \arb[voc]{al-fat_A} \arb[trans]{al-fat_A}, |al-maqh_A| % \arb[voc]{al-maqh_A} \arb[trans]{al-maqh_A}, |'il_A| % \arb[voc]{'il_A} \arb[trans]{'il_A}. % \end{quote} % -% \paragraph{\arb[trans]{'alif} \emph{otiosum}} Said -% \arb[trans]{'alif-u 'l-wiqAyaT-i}, \enquote{the guarding -% \arb[trans]{'alif}}\,, after \arb[novoc]{U} at the end of a word, both -% when preceded by \arb[trans]{.dammaT} and by \arb[trans]{fat.haT} is -% written \meta{UA} or \meta{aW, aWA}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif} \emph{otiosum}}{ʾalif +% otiosum}} Said \arb[trans]{'alif-u 'l-wiqAyaT-i}, \enquote{the +% guarding \arb[trans]{'alif}}\,, after \arb[novoc]{U} at the end of a +% word, both when preceded by \arb[trans]{.dammaT} and by +% \arb[trans]{fat.haT} is written \meta{UA} or \meta{aW, aWA}: % \begin{quote} % |na.sarUA| \arb[voc]{na.sarUA} \arb[trans]{na.sarUA}, |katabUA| % \arb[voc]{katabUA} \arb[trans]{katabUA}, |ya.gzUA| @@ -1076,8 +1108,9 @@ vowels (see §~3). % \arb[fullvoc]{banaWA}, \arb[trans]{banaWA}. % \end{quote} % -% \paragraph{\arb[trans]{'alif ma.h_dUfaT} and defective \arb[trans]{U, -% I}} They are written \meta{\_a, \_i \_u}: +% \paragraph{\texorpdfstring{\arb[trans]{'alif ma.h_dUfaT} and +% defective \arb[trans]{U, I}}{ʾalif maḥḏūfah and defective ū, ī}} +% They are written \meta{\_a, \_i \_u}: % \begin{quote} % |al-l_ah-u| \arb[voc]{al-l_ah-u} \arb[trans]{al-l_ah-u}, % |'il_ahuN| \arb[voc]{'il_ahuN} \arb[trans]{'il_ahuN}. @@ -1092,7 +1125,8 @@ vowels (see §~3). % \arb[trans]{al-\uc{`A.s_i}}. % \end{quote} % -% \paragraph{Silent \arb[novoc]{U}/\arb[novoc]{I}} +% \paragraph{\texorpdfstring{Silent +% \arb[novoc]{U}/\arb[novoc]{I}}{Silent ي/و}} % Some words ending with \arb[voc]{BAT} are usually written % \arb[voc]{BawT} or \arb[voc]{B_aUT} instead of \arb[voc]{BAT}: see % \textcite[i. 12 A]{Wright}. \package{arabluatex} preserves that @@ -1110,11 +1144,12 @@ vowels (see §~3). % \arb[trans]{al-rib_aIT-u}. % \end{quote} % -% \paragraph{\arb[trans]{\uc{`amruNU}}, and the silent -% \arb[novoc]{U}} To that name a silent \arb[novoc]{U} is added to -% distinguish it from \arb[trans]{\uc{`umar-u}}: see \textcite[i. 12 -% C]{Wright}. In no way this affects the sound of the -% \arb[trans]{tanwIn}, so it has to be discarded in |trans| mode: +% \paragraph{\texorpdfstring{\arb[trans]{\uc{`amruNU}}, and the silent +% \arb[novoc]{U}}{ʿAmrun, and the silent و}} To that name a silent +% \arb[novoc]{U} is added to distinguish it from +% \arb[trans]{\uc{`umar-u}}: see \textcite[i. 12 C]{Wright}. In no way +% this affects the sound of the \arb[trans]{tanwIn}, so it has to be +% discarded in |trans| mode: % \begin{quote} % |`amruNU| \arb[voc]{`amruNU} \arb[trans]{`amruNU}, |`amraNU| % \arb[voc]{`amraNU} \arb[trans]{`amraNU}, |`amriNU| @@ -1133,7 +1168,7 @@ vowels (see §~3). % \arb[trans]{ribaNU}. % \end{quote} % -%\paragraph{\arb[trans]{tanwIn}} +% \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}} % The marks of doubled short vowels, \arb{BuN}, \arb{BaN}, \arb{BiN}, % are written \meta{uN, aN, iN} respectively. \package{arabluatex} % deals with special cases, such as \arb{BaN} taking an \arb[novoc]{A} @@ -1166,7 +1201,7 @@ vowels (see §~3). % \end{quote} % % \subsection{Other orthographic signs} -% \paragraph{\arb[trans]{tA' marbU.taT}} +% \paragraph{\texorpdfstring{\arb[trans]{tA' marbU.taT}}{tāʾ marbūṭah}} % It is written \meta{T}: % \begin{quote} % |madInaTuN| \arb[voc]{madInaTuN} \arb[trans]{madInaTuN}, @@ -1174,11 +1209,11 @@ vowels (see §~3). % |madInaTiN| \arb[voc]{madInaTiN} \arb[trans]{madInaTiN}. % \end{quote} % -% \paragraph{\arb[trans]{hamzaT}} \label{ref:hamza}It is written -% \meta{\texttt{'}}, its carrier being determined by contextual -% analysis. In case one wishes to bypass this mechanism, he can use -% the \enquote{quoting} feature that is described below in -% \vref{sec:quoting}. +% \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}} +% \label{ref:hamza}It is written \meta{\texttt{'}}, its carrier being +% determined by contextual analysis. In case one wishes to bypass this +% mechanism, he can use the \enquote{quoting} feature that is +% described below in \vref{sec:quoting}. % \begin{quote} % \textbf{Initial \arb[trans]{hamzaT}}: |'asaduN| \arb[voc]{'asaduN} % \arb[trans]{'asaduN}, |'u_htuN| \arb[voc]{'u_htuN} @@ -1300,14 +1335,14 @@ vowels (see §~3). % \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}. % \end{quote} % -% \paragraph{\arb[trans]{maddaT}} \label{ref:madda}At the beginning of -% a syllabe, \arb[trans]{'alif} with \arb[trans]{hamzaT} and -% \arb[trans]{fat.haT} (\arb[voc]{'a}) followed by \arb[trans]{'alifu -% 'l-maddi} (\arb[trans]{'alif} of prolongation) or \arb[trans]{'alif} -% with \arb[trans]{hamzaT} and \arb[trans]{jazmaT} (\arb[voc]{a"'"}) -% are both represented in writing \arb[trans]{'alif} with -% \arb[trans]{maddaT}: \arb[voc]{A"'} \parencite[see][i. 25 -% A--B]{Wright}. +% \paragraph{\texorpdfstring{\arb[trans]{maddaT}}{maddah}} +% \label{ref:madda}At the beginning of a syllabe, \arb[trans]{'alif} +% with \arb[trans]{hamzaT} and \arb[trans]{fat.haT} (\arb[voc]{'a}) +% followed by \arb[trans]{'alifu 'l-maddi} (\arb[trans]{'alif} of +% prolongation) or \arb[trans]{'alif} with \arb[trans]{hamzaT} and +% \arb[trans]{jazmaT} (\arb[voc]{a"'"}) are both represented in +% writing \arb[trans]{'alif} with \arb[trans]{maddaT}: \arb[voc]{A"'} +% \parencite[see][i. 25 A--B]{Wright}. % % \iffalse %<*example> @@ -1337,13 +1372,13 @@ vowels (see §~3). % \arb[voc]{yaxba'Ani} \arb[trans]{yaxba'Ani}. % \end{quote} % -% \paragraph{\arb[trans]{^saddaT}} +% \paragraph{\texorpdfstring{\arb[trans]{^saddaT}}{šaddah}} % \arb[trans]{ta^sdId} is either \emph{necessary} or \emph{euphonic}. % -% \subparagraph{The necessary -% \arb[trans]{ta^sdId}} \label{ref:necessary-tashdid}always follows a -% vowel, whether short or long \parencite[see][i. 15 A--B]{Wright}. It -% is encoded in writing the consonant that carries it twice: +% \subparagraph{The necessary \arb[trans]{ta^sdId}} +% \label{ref:necessary-tashdid}always follows a vowel, whether short +% or long \parencite[see][i. 15 A--B]{Wright}. It is encoded in +% writing the consonant that carries it twice: % \begin{quote} % |`allaqa| \arb[voc]{`allaqa} \arb[trans]{`allaqa}, |mAdduN| % \arb[voc]{mAdduN} \arb[trans]{mAdduN}, |'ammara| @@ -1355,7 +1390,7 @@ vowels (see §~3). % \label{ref:euphonic-tashdid} always follows a vowelless consonant % which is passed over in pronunciation and assimilated to a following % consonant. It may be found \parencite[i. 15 B--16 C]{Wright}:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item With the \emph{solar} letters \arb[novoc]{t}, \arb[novoc]{_t}, % \arb[novoc]{d}, \arb[novoc]{_d}, \arb[novoc]{r}, \arb[novoc]{z}, % \arb[novoc]{s}, \arb[novoc]{^s}, \arb[novoc]{.s}, \arb[novoc]{.d}, @@ -1419,9 +1454,11 @@ vowels (see §~3). % \arb[voc]{labi_ttu} \arb[trans]{labi_ttu}, will be discarded here, % as it is largely condemned by the % grammarians \parencite[see][i. 16 B--C]{Wright}. -% \end{compactenum} +% \end{enumerate} % -% \paragraph{The definite article and the \arb[trans]{'alif-u 'l-wa.sl-i}} +% \paragraph{\texorpdfstring{The definite article and the +% \arb[trans]{'alif-u 'l-wa.sl-i}}{The definite article and the ʾalifu +% 'l-waṣli}} % \label{ref:definite-article} % At the beginning of a sentence, \arb[fullvoc]{"a} is never written, % as \arb[fullvoc]{'l-.hamd-u li-ll_ah-i}; instead, to indicate that @@ -1438,7 +1475,7 @@ vowels (see §~3). % doing that automatically provided that the vowel which is to be % absorbed by the final vowel of the preceding word be properly % encoded, like so:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Definite article at the beginning of a sentence is encoded\\ % \arabluaverb{al-}, or \arabluaverb{a<solar letter>-}\\ if one % wishes to mark the assimilation---which is in no way required, as @@ -1448,7 +1485,7 @@ vowels (see §~3). % \item In all remaining cases of elision, the \arb[trans]{'alifu % 'l-wa.sli} is expressed by the vowel that accompanies the omitted % \arb[trans]{hamzaT}: \meta{u, a, i}. -% \end{compactenum} +% \end{enumerate} % \begin{quote} % \textbf{Article}: |bAb-u| |'l-madrasaT-i| \arb[fullvoc]{bAb-u % 'l-madrasaT-i} \arb[trans]{bAb-u 'l-madrasaT-i}, @@ -1466,7 +1503,7 @@ vowels (see §~3). % 'l-najm-a} \arb[trans]{fa-lammA ra'aW 'l-najm-a}. % % \textbf{Particles}:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \arb[trans]{li-}: \arb[trans]{'alif-u 'l-wa.sl-i} is omitted % in the article \arb[fullvoc]{al} when it is preceded by the % preposition \arb[fullvoc]{li}: |li-l-rajul-i| @@ -1486,7 +1523,7 @@ vowels (see §~3). % |bi-'l-|\allowbreak|qalam-i| \arb[fullvoc]{bi-'l-qalam-i} % \arb[trans]{bi-'l-qalam-i}, |bi-'l-ru`b-i| % \arb[fullvoc]{bi-'l-ru`b-i} \arb[trans]{bi-'l-ru`b-i}. -% \end{compactenum} +% \end{enumerate} % % \textbf{Perfect active, imperative, nomen actionis}: |qAla| % |isma`| \arb[fullvoc]{qAla isma`} \arb[trans]{qAla isma`}, |qAla| @@ -1581,11 +1618,11 @@ vowels (see §~3). % |mu.hammaduN| |'l-nabI| \arb[fullvoc]{mu.hammaduN 'l-nabI} % \arb[trans]{\uc{m}u.hammaduN 'l-nabI}, |salAmuN| |ud_hulUA| % \arb[fullvoc]{salAmuN ud_hulUA} \arb[trans]{salAmuN ud_hulUA}, -% |qa.sIdata-hu| |fI| |qatl-i| |\uc{'a}bI| |\uc{m}uslimiN| -% |'llatI| |yaqUlu| |fI-hA| \arb[fullvoc]{qa.sIdata-hu fI qatl-i -% \uc{'a}bI \uc{m}uslimiN 'llatI yaqUlu fI-hA} -% \arb[trans]{qa.sIdata-hu fI qatl-i \uc{'a}bI \uc{m}uslimiN -% 'llatI yaqUlu fI-hA}. +% |qa.sIdata-hu| |fI| |qatl-i| |\uc{'a}bI| +% |\uc{m}|\allowbreak|uslimiN| |'llatI| |yaqUlu| |fI-hA| +% \arb[fullvoc]{qa.sIdata-hu fI qatl-i \uc{'a}bI \uc{m}uslimiN +% 'llatI yaqUlu fI-hA} \arb[trans]{qa.sIdata-hu fI qatl-i \uc{'a}bI +% \uc{m}uslimiN 'llatI yaqUlu fI-hA}. % \end{quote} % % \subsection{Special orthographies} @@ -1627,7 +1664,8 @@ vowels (see §~3). % \arb[trans]{li-l-l_ah-i 'l-qA'il-u}. % \end{quote} % -% \paragraph{The conjunctive \arb[voc]{alla_dI}} +% \paragraph{\texorpdfstring{The conjunctive \arb[voc]{alla_dI}}{The +% conjunctive اَلَّذِي}} % Although it is compounded of the article \arb[fullvoc]{al}, the % demonstrative letter \arb[novoc]{l} and the demonstrative pronoun % \arb[voc]{_dA}, both masculine and feminine forms that are written @@ -1705,7 +1743,7 @@ vowels (see §~3). % % \paragraph{\texttt{novoc}} In this mode, \enquote{quoting} % essentially means make visible something that ought not to be so. -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Quoting a vowel, either short or long, makes the % \arb[trans]{.dammaT}, \arb[trans]{fat.haT} or \arb[trans]{kasraT} % appear above the appropriate consonant:--- @@ -1739,13 +1777,13 @@ vowels (see §~3). % "inhazama} \arb[trans]{huwa "inhazama}, |al-"intiqA.d-u| % \arb[novoc]{al-"intiqA.d-u} \arb[trans]{al-"intiqA.d-u}. % \end{quote} -% \end{compactenum} +% \end{enumerate} % % \paragraph{\texttt{voc}} % In accordance with the general rule, in this mode, \enquote{quoting} % makes the vowels and the \arb[trans]{tanwIn} disappear, should this % feature be required for some reason:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Short and long vowels:--- % \begin{quote} % |q"Ala q"A'iluN| \arb[voc]{q"Ala q"A'iluN} \arb[trans]{q"Ala @@ -1760,12 +1798,12 @@ vowels (see §~3). % \arb[voc]{hud"aN_A} \arb[trans]{hud"aN_A}, |^say'"iN| % \arb[voc]{^say'"iN} \arb[trans]{^say'"iN}. % \end{quote} -% \end{compactenum} +% \end{enumerate} % One may more usefully \enquote{quote} the initial vowels to write % the \arb[trans]{wa.slaT} above the \arb[trans]{'alif} or insert a % straight double quote after a consonant not followed by a vowel to % make the \arb[trans]{sukUn} appear:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \arb[trans]{'alif-u 'l-wa.sl-i}:--- % \begin{quote} % |fI "istiq.sA'-iN| \arb[voc]{fI "istiq.sA'-iN} \arb[trans]{fI @@ -1784,7 +1822,7 @@ vowels (see §~3). % \arb[trans]{kam" qad" ma.dat" min" % laylaTiN}.\label{ref:quoted-sukun-e} % \end{quote} -% \end{compactenum} +% \end{enumerate} % % \paragraph{\texttt{fullvoc}} % In this mode, \enquote{quoting} can be used to take away any short @@ -1809,27 +1847,29 @@ vowels (see §~3). % possible carriers the \arb[trans]{hamzaT} may take. % % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:quoted-hamza}: \enquote{Quoted} +% \arb[trans]{hamzaT}} +% \endfoot % \captionlistentry{\enquote{Quoted} \arb[trans]{hamzaT}}\\[-1em] -% \toprule -% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} +% \toprule Letter & \multicolumn{3}{l}{Transliteration\footnotemark} % & Arab\TeX\ notation \\ -% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule % \endfirsthead -% \toprule -% Letter & \multicolumn{3}{l}{Transliteration} +% \toprule Letter & \multicolumn{3}{l}{Transliteration} % & Arab\TeX\ notation \\ -% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule -% \endhead \footnotetext{See below \vref{sec:transliteration}.} +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endhead +% \footnotetext{See below \vref{sec:transliteration}.} % \label{tab:quoted-hamza} % \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \brill{|"'} & \verb+|"'+ \\ +% \pagebreak[1] % \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \brill{A"'} & \verb|A"'| \\ % \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \brill{a"'} & \verb|a"'| \\ % \arb[novoc]{u"'} & \dmg{u"'} & \loc{u"'} & \brill{u"'} & \verb|u"'| \\ % \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \brill{w"'} & \verb|w"'| \\ % \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \brill{i"'} & \verb|i"'| \\ % \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \brill{y"'} & \verb|y"'| \\ -% \bottomrule -% \caption*{\Cref*{tab:quoted-hamza}: \enquote{Quoted} \arb[trans]{hamzaT}} % \end{longtable} % % As one can see from \vref{tab:quoted-hamza}, the carrier of the @@ -1888,7 +1928,7 @@ vowels (see §~3). \begin{arabluacode} This is wrong: \begin{arab}[fullvoc] - fa-lammA ra'aW\LRfootnote{A footnote that interferes with the + fa-lammA ra'aW\LRfootnote{A footnote which interferes with the contextual analysis.} 'l-na^gma... \end{arab} \end{arabluacode} @@ -1924,20 +1964,23 @@ word that \cs{arbnull} is applied to. % \fi \begin{arabluacode} \begin{arab}[fullvoc] - fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote that + fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote which interferes with the contextual analysis.} 'l-na^gma... - qAla\LRfootnote{A footnote that interferes with the contextual + qAla\LRfootnote{A footnote which interferes with the contextual analysis.} \arbnull{qAla}uhrub fa-lan tuqtala. - \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes - with the contextual analysis.} \arbnull{zayduN}ibn-u - \uc{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which + interferes with the contextual analysis.} + \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See + \vref{fn:zayd-is-son}.} \end{arab} + \begin{arab}[trans] - \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes - with the contextual analysis.} \arbnull{zayduN}ibn-u - \uc{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.} + \uc{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote which + interferes with the contextual analysis.} + \arbnull{zayduN}ibn-u \uc{`a}mriNU.\LRfootnote{See + \vref{fn:zayd-is-son}.} \end{arab} \end{arabluacode} % \iffalse @@ -2009,6 +2052,24 @@ word that \cs{arbnull} is applied to. % \end{quote} % \end{quoting} % +% \NEWfeature{v1.12}\cs{abjad} may also be used to convert values of +% counters into \arb[trans]{'ab^gad} numbers, like so:--- % +% \changes{v1.12}{2018/06/24}{\cs{abjad} can now process \LaTeX\ +% counters}% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + The \arb[trans]{'ab^gad} number for the current page (\thepage) is + \abjad{\thepage}. +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% This technique can be used to produce abjad-numbered lists as will +% be demonstrated \vpageref{ref:abjad-list}. +% % \subsection{Additional characters} % \label{sec:additional-characters} % In the manuscripts, the unpointed letters, \arb[trans]{al-.hurUfu @@ -2022,6 +2083,10 @@ word that \cs{arbnull} is applied to. % % For the time being, the following is included:--- % \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:additional-arabic-codings}: Additional Arabic +% codings} +% \endfoot % \captionlistentry{Additional Arabic codings}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -2041,10 +2106,8 @@ word that \cs{arbnull} is applied to. % \arb[novoc]{.k} & \dmg{.k} & \loc{.k} & \brill{.k} & |.k| \\ % \arb[novoc]{.n} & \dmg{.n} & \loc{.n} & \brill{.n} & |.n| \\ % \arb[novoc]{((} & \dmg{((} & \loc{((} & \brill{((} & |((| \\ +% \pagebreak % \arb[novoc]{))} & \dmg{))} & \loc{))} & \brill{))} & |))| \\ -% \bottomrule -% \caption*{\Cref*{tab:additional-arabic-codings}: Additional Arabic -% codings} % \end{longtable} % % \begin{quote} @@ -2167,7 +2230,7 @@ word that \cs{arbnull} is applied to. % to the following or the preceding ones over the % \arb[trans]{tadwIr}. The optional argument of the \cs{bayt} command % is designed to deal with the various situations that may arise:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item If the two hemistichs be connected with one another by a % prominent horizontal flexible stroke, the \arb[trans]{ta.twIl} should % be used, like so: |[--]| (see \vref{sec:tatwil}). Of course, the @@ -2238,7 +2301,7 @@ word that \cs{arbnull} is applied to. % write it all inside the \arb[trans]{tadwIr}. In that case, as the % word is to be placed in the middle, it has been surrounded by % spaces. -% \end{compactenum} +% \end{enumerate} % % \paragraph{Scaling and distortion of characters} % The |arabverse| environment and the \cs{bayt} command are designed @@ -2255,9 +2318,11 @@ word that \cs{arbnull} is applied to. % there are two easy ways to have them printed. % % If they are little in number, each footnote may be split into pairs -% of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces) in -% the argument of the \cs{bayt} command and \cs{footnotetext} outside -% the \cs{bayt} command. +% of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces or +% \enquote{declare} |footnotemark| using \cs{MkArbBreak} to take it +% out of the Arabic environment\footnote{See +% \vref{sec:declare-new-commands}.}) in the argument of the \cs{bayt} +% command and \cs{footnotetext} outside the \cs{bayt} command. % % If the footnotes are abundant in number, it is advised to load the % \package{footnotehyper} package which \package{arabluatex} will then @@ -2368,6 +2433,7 @@ word that \cs{arbnull} is applied to. % % \section{Special applications} % \label{sec:special-applications} +% \phantomsection % \paragraph{Linguistics} % The same horizontal stroke as the \arb[trans]{ta.twIl} (see % \vref{sec:tatwil}) may be encoded \meta{B}; \meta{BB} will receive @@ -2381,18 +2447,19 @@ word that \cs{arbnull} is applied to. % \end{quote} % % \paragraph{Brackets} +% \phantomsection % \NEWfeature{v1.4.3} The various bracket symbols are useful in % technical documents such as critical editions for indicating that % some words or some letters must be added or % removed. \package{arabluatex} will automatically fit those symbols % to the direction of the text. For the time being, the following % symbols are supported: -% \begin{compactitem} +% \begin{itemize} % \item parentheses: |()| % \item square brackets: |[]| % \item angle brackets: |<>| % \item braces: |{}| -% \end{compactitem} +% \end{itemize} % % \DescribeMacro{\abraces} Parentheses, square and angle brackets may % be input directly at the keyboard; however, words or letters that @@ -2412,6 +2479,7 @@ word that \cs{arbnull} is applied to. % \fi % % \paragraph{Additional Arabic marks} +% \label{sec:arabic-marks} % In addition to common letters, many symbols and ligatures are % encoded in Arabic Unicode standard, such as honorifics consisting of % complex ligatures, and annotation signs used in the @@ -2424,6 +2492,10 @@ word that \cs{arbnull} is applied to. % a default list which consists of the following % at the time of writing:---\\ % \begin{longtable}{llp{.3\linewidth}p{.3\linewidth}} +% \bottomrule +% \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic +% marks} +% \endfoot % \captionlistentry{Additional Arabic marks}\\[-1em] % \toprule % Codepoint & Shorthand & Glyph & Transliteration \\ \midrule @@ -2436,16 +2508,13 @@ word that \cs{arbnull} is applied to. % |FDF5| & |salam| & \arb{\arbmark{salam}} & \arbmark{salam} \\ % |FDFA| & |slm| & \arb{\arbmark{slm}} & \arbmark{slm} \\ % |FDFB| & |jalla| & \arb{\arbmark{jalla}} & \arbmark{jalla} \\ -% \bottomrule -% \caption*{\Cref*{tab:arabtex-additional-marks}: Additional Arabic -% marks} % \end{longtable} % % \DescribeMacro{\newarbmark} \NEWfeature{v1.11} \cs{newarbmark} is % also provided should one wish to define new marks in addition to the % marks defined above. This command takes three arguments, like so:--- % \arabluabox{\cs{newarbmark}\marg{shorthand}\marg{RTL -% codepoint}\marg{LTR rendition}}. +% codepoint}\marg{LTR rendition}} % % As regards the right-to-left codepoint, it may be either typed in % Unicode or selected as Unicode codepoint. To that end, the \LaTeX\ @@ -2474,15 +2543,15 @@ word that \cs{arbnull} is applied to. % \fi% % % The example below provides an implementation of this technique. It -% may be observed that \cs{textcolor} is used so as to have the marks +% may be observed that \cs{arbcolor} is used so as to have the marks % printed in red:---% % \iffalse %<*example> % \fi \begin{arabluacode} \SetArbDflt* - \newarbmark{sly}{\textcolor{red}{^^^^06d6}}{} - \newarbmark{jim}{\textcolor{red}{^^^^06da}}{} + \newarbmark{sly}{\arbcolor[red]{^^^^06d6}}{} + \newarbmark{jim}{\arbcolor[red]{^^^^06da}}{} \begin{arab} sUraTu 'l-nisA'i, 19: \end{arab} @@ -2505,6 +2574,335 @@ word that \cs{arbnull} is applied to. %</example> % \fi % +% \section{Color} +% \label{sec:color} +% \NEWfeature{v1.12}\package{arabluatex} is able to render in color +% either words, parts of words or diacritics. As the techniques +% implemented in this section may lead to some complexity, the reader +% should first become well acquainted with the following +% points:\footnote{Regarding the colors themselves and the way new +% colors can be defined in addition to those that are already +% available, please refer to the \package{xcolor} package.}--- +% \begin{enumerate} +% \item The \enquote{pipe} character (\textbar, \vref{sec:pipe}); +% \item \enquote*{Quoting} technique (\vref{sec:quoting}), and more +% specifically \enquote*{quoting the \arb[trans]{hamzaT}} +% (\vpageref{sec:quoting-hamza}); +% \item Putting back on broken contextual analysis rules +% (\vref{sec:arbnull}); +% \item Arabic marks (\vref{sec:arabic-marks}). +% \end{enumerate} +% +% \DescribeMacro{\arbcolor} \cs{arbcolor} takes the text to be colored +% into \meta{color} as an argument:--- +% \arabluabox{\cs{arbcolor}\oarg{color}\marg{Arabic text}} +% +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \begin{arab} + \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i + 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN + min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN + kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna + `alay-hi... + \end{arab} + \begin{arab}[trans] + \arbcolor[red]{al-bAbu 'l-_hAmisu} fI .tabaqAti 'l-'a.tibbA'i + 'lla_dIna kAnUA mun_du zamAni \uc{^gAlInUsa} wa-qarIbaN + min-hu. \arbcolor[red]{\uc{^gAlInUsu}}: wa-li-na.da` 'awwalaN + kalAmaN kulliyyaN fI 'a_hbAri \uc{^gAlInUsa} wa-mA kAna + `alay-hi... + \end{arab} +\end{arabluacode} +% \iffalse +%</example> +% \fi +% +% As this example shows, \cs{arbcolor} has been used to render +% headings in red with the same encoding both in vocalized and in +% romanized Arabic. The same technique also applies to syllabes inside +% words. \package{arabluatex} takes care of selecting the appropriate +% shape of the letters while coloring them:--- +% \begin{quote}\textbf{\enquote*{voc} mode}:\\ +% |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}| +% |'a`\arbcolor[blue]{^ga}ba-ka| +% \arb{i^stara\arbcolor[brown]{y}tu-hu bi-_tama\arbcolor[red]{niN} +% 'a`\arbcolor[blue]{^ga}ba-ka} +% \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}. +% \end{quote} +% \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\ +% |i^stara\arbcolor[brown]{y}tu-hu| |bi-_tama\arbcolor[red]{niN}| +% |'a`\arbcolor[blue]{^ga}ba-ka| +% \arb[fullvoc]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka} +% \arb[trans]{i^stara\arbcolor[brown]{y}tu-hu +% bi-_tama\-\arbcolor[red]{niN} 'a`\arbcolor[blue]{^ga}ba-ka}. +% \end{quote} +% +% \subsection{Tricks of the trade} +% \label{sec:color-tricks} +% \paragraph{Diacritics} +% Depending on the mode selected, either |voc|, |novoc| or |fullvoc|, +% coloring the diacritics requires more attention for the insertion of +% \cs{arbcolor} may prevent contextual analysis from being applied. +% +% Furthermore, depending on the surrounding letters, the standard +% encoding of short vowels \meta{u, a, i} may result either in +% diacritics or in a connective \arb[trans]{'alif} with the +% \arb[trans]{wa.slaT} or its accompanying vowel. As for the +% \arb[trans]{sukUn}, it is generated by contextual analysis. Thus +% applying colors to bare diacritics requires them to have specific +% encodings. +% +% \Cref{tab:arbcolor-diacritics} gives the Arab\TeX\ equivalents for +% the diacritics to be printed inside or just after \cs{arbcolor}. +% +% \begin{longtable}{lllll} +% \bottomrule +% \caption*{\Cref*{tab:arbcolor-diacritics}: Arab\TeX\ diacritics +% for \cs{arbcolor}} +% \endfoot +% \captionlistentry{Arab\TeX\ diacritics for \cs{arbcolor}}\\[-1em] +% \toprule +% Diacritic & \multicolumn{3}{l}{Transliteration\footnotemark} +% & Arab\TeX\ notation \\ +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endfirsthead +% \toprule +% Diacritic & \multicolumn{3}{l}{Transliteration} +% & Arab\TeX\ notation \\ +% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule +% \endhead \footnotetext{See below \vref{sec:transliteration}.} +% \label{tab:arbcolor-diacritics} +% \arb{B.a} & \dmg{.a} & \loc{.a} & \brill{.a} & \verb|.a| \\ +% \pagebreak[1] +% \arb{B.u} & \dmg{.u} & \loc{.u} & \brill{.u} & \verb|.u| \\ +% \arb{B.i} & \dmg{.i} & \loc{.i} & \brill{.i} & \verb|.i| \\ \midrule +% \arb{Bo} & \dmg{o} & \loc{o} & \brill{o} & \verb|o| \\ +% \end{longtable} +% +% The following examples show how the letters, or the diacritics above +% or under them or both the letters and the diacritics can be rendered +% in different colors:--- +% \begin{quote}\textbf{\enquote*{voc} mode}:\\ +% |i^staraytu-hu| |bi-_taman\arbcolor[red]{iN}| +% |'a`^g\arbcolor[red]|\allowbreak|{.a}ba-ka| +% \arb{i^staraytu-hu bi-_taman\arbcolor[red]{iN} +% 'a`^g\arbcolor[red]{.a}ba-ka} +% \arb[trans]{i^staraytu-hu bi-_taman\arbcolor[red]{iN} +% 'a`^g\arbcolor[red]{.a}ba-ka}. +% +% |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}iN| +% |'a`\arbcolor[red]|\allowbreak|{^g}.aba-ka| +% \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN +% 'a`\arbcolor[red]{^g}.aba-ka} +% \arb[trans]{i^staraytu-hu bi-_tama\arbcolor[red]{n}iN +% 'a`\arbcolor[red]{^g}.aba-ka}. +% +% |i^staraytu-hu| |bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN}| +% |'a`\arbcolor[red]|\allowbreak|{^g}\arbcolor[blue]{.a}ba-ka| +% \arb{i^staraytu-hu bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka} \linebreak +% \arb[trans]{i^staraytu-hu +% bi-_tama\arbcolor[red]{n}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g}\arbcolor[blue]{.a}ba-ka}. +% \end{quote} +% +% \begin{quote}\textbf{\enquote*{fullvoc} mode}:\\ +% |i^staray"\arbcolor[red]{o}tu-hu| |bi-_taman"\arbcolor[red]{iN}| +% |'a`^g"\arbcolor[red]{.a}ba-ka| +% \arb[fullvoc]{i^staray"\arbcolor[red]{o}tu-hu +% bi-_taman"\arbcolor[red]{iN} 'a`^g"\arbcolor[red]{.a}ba-ka} +% \arb[trans]{i^staray"\arbcolor[red]{o}tu-hu +% bi-_taman"\arbcolor[red]{iN} +% \linebreak 'a`^g"\arbcolor[red]{.a}ba-ka}. +% +% |i^stara\arbcolor[red]{y"}otu-hu| |bi-_tama\arbcolor[red]{n"}iN| +% |'a`\arbcolor[red]|\allowbreak|{^g"}.aba-ka| +% \arb[fullvoc]{i^stara\arbcolor[red]{y"}otu-hu +% bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka} +% \arb[trans]{i^stara\arbcolor[red]{y"}otu-hu +% bi-_tama\arbcolor[red]{n"}iN 'a`\arbcolor[red]{^g"}.aba-ka}. +% +% |i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu| +% |bi-_tama\arb|\allowbreak|color[red]{n"}\arbcolor[blue]{iN}| +% |'a`\arbcolor[red]|\allowbreak|{^g"}\arb|\allowbreak% +% |color[blue]{.a}ba-ka| +% \arb[fullvoc]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu +% bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka} +% \arb[trans]{i^stara\arbcolor[red]{y"}\arbcolor[blue]{o}tu-hu +% bi-_tama\arbcolor[red]{n"}\arbcolor[blue]{iN} +% 'a`\arbcolor[red]{^g"}\arbcolor[blue]{.a}ba-ka}. +% \end{quote} +% +% As can be seen, |fullvoc| required the letters |y|, |n| and |^g| +% before \cs{arbcolor} to be \enquote*{quoted}. Otherwise, unwanted +% \arb[trans]{sukUn}\txtrans{s} would have been generated because of +% the absence of a vowel after those consonants. +% +% \paragraph{\texorpdfstring{\arb[trans]{tanwIn}}{tanwīn}} +% \cs{arbnull} must be used with \arb[trans]{fat.haTAn} (\arb{BaN}) so +% as to put back on contextual analysis rules:--- +% \begin{quote} +% |mu`allim\arbcolor[red]{\arbnull{m}aN}| +% \arb{mu`allim\arbcolor[red]{\arbnull{m}aN}} +% \arb[trans]{mu`allim\arbcolor[red]{\arbnull{m}aN}},\\ +% |istisqA'\arbcolor[red]{\arbnull{A'}aN}| +% \arb{istisqA'\arbcolor[red]{\arbnull{A'}aN}} +% \arb[trans]{istisqA'\arbcolor[red]{\arbnull{A'}aN}},\\ +% |^say'\arbcolor[red]{\arbnull{ay'}aN}| +% \arb{^say'\arbcolor[red]{\arbnull{ay'}aN}} +% \arb[trans]{^say'\arbcolor[red]{\arbnull{ay'}aN}},\\ +% \verb+^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}+ +% \arb{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}} +% \arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}. +% \end{quote} +% \begin{quoting} +% \textsc{Rem.} Note that in the last example +% (\arb[trans]{^gAmi`aT|\arbcolor[red]{\arbnull{T}aN}}), the +% \enquote*{pipe} character has been inserted before +% \cs{arbcolor}. Otherwise, the |dmg| mode of the transliteration +% rules would have interpreted the \arb[trans]{tA' marbU.taT} as +% \emph{final} (e.g. \txtrans{h} instead of the expected +% \txtrans{t}).\footnote{See also \vpageref{ref:ta-marbutah-pipe} +% \enquote{Discarding the \arb[trans]{'i`rAb}} for more +% information.} +% \end{quoting} +% +% The \arb[trans]{tanwIn} preceding a \arb[novoc]{_A} conveys even +% more intricate business to the rendering with the utmost accuracy in +% both romanized and non-romanized modes. First, a new Arabic mark +% needs to be defined. It should print \arb[novoc]{_A} in Arabic +% script and not a thing in transliteration. It is to be appended after +% \cs{arbcolor}, like so:--- +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{Y}{^^^^0649}{} + \arb{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}} + \arb[trans]{hud\arbcolor[red]{aN\arbnull{_A}}\arbmark{Y}} +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% \paragraph{\texorpdfstring{\arb[trans]{wa.slaT} and +% \arb[trans]{maddaT}}{waṣlah and maddah}} +% Both can be generated with the help of \cs{arbnull}:--- +% \begin{quote} +% |wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN| +% \arb[fullvoc]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN} +% \arb[trans]{wa-\arbcolor[red]{\arbnull{wa}i}stisqA'uN}\footnote{To +% the knowledge of the writer, the \arb[trans]{wa.slaT} alone is not +% part of the Arabic Unicode block.}. +% +% |fI| |"al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i| +% \arb[fullvoc]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i} +% \linebreak +% \arb[trans]{fI "al".i-\arbcolor[red]{\arbnull{'l-}i}btidA'i}. +% +% |\arbcolor[red]{'a'\arbnull{k}}kulu| +% \arb{\arbcolor[red]{'a'\arbnull{k}}kulu} +% \arb[trans]{\arbcolor[red]{'a'\arbnull{k}}kulu},\\ +% |\arbcolor[red]{'A\arbnull{k}}kiluN| +% \arb{\arbcolor[red]{'A\arbnull{k}}kiluN} +% \arb[trans]{\arbcolor[red]{'A\arbnull{k}}kiluN}. +% \end{quote} +% +% The Unicode codepoint of the \arb[trans]{maddaT} is 0653, while bare +% \arb[trans]{'alif} is 0627. So:--- % +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{alifmaddahred}{^^^^0627\arbcolor[red]{^^^^0653}}% + {\arb[trans]{\arbcolor[red]{'a'\arbnull{k}}}} + \arb{\arbmark{alifmaddahred}kulu} + \arb[trans]{\arbmark{alifmaddahred}kulu}. +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% \begin{quoting} +% \textsc{Rem.} In the preceding example, any consonant could have +% been passed as argument to the \cs{arbnull} command. +% \end{quoting} +% +% \paragraph{\texorpdfstring{\arb[trans]{^sad\-daT}}{šaddah}} +% In the following example, it is assumed that the +% \arb[trans]{^saddaT} above the letter \arb[novoc]{l} in +% \arb[fullvoc]{al-mu`allimUna}, \arb[trans]{al-mu`allimUna}, is to be +% rendered in red. Thus the Arabic mark must generate the +% \arb[trans]{^saddaT} alone---of which the Unicode codepoint is +% 0651---in Arabic script and the letter \enquote*{l} in +% transliteration:--- % +%\iffalse +%<*example> +% \fi +\begin{arabluacode} +\newarbmark{lamshaddah}{^^^^0651}{l} +\arb[fullvoc]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna} +\arb[trans]{al-mu`al"\arbcolor[red]{\arbmark{lamshaddah}}.imUna}. +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% \paragraph{\texorpdfstring{The definite article and the euphonic +% \arb[trans]{ta^sdId}}{The definite article and the euphonic tašdīd}} +% The intricate business of rendering in color the initial +% \arb[trans]{'alif al-wa.sl} of the definite article followed by a +% solar consonant must be unraveled. +% +% From the examples provided above, in |fI 'l-nAsi| \arb[fullvoc]{fI +% 'l-nAsi} \arb[trans]{fI 'l-nAsi}, the initial \arb[trans]{'alif-u +% 'l-wa.sl-i} can be rendered in red like so: +% |\arbcolor[red]{\arbnull{al-}a}| +% \arb[fullvoc]{\arbcolor[red]{\arbnull{al-}a}}. Then, the following +% two letters, namely |l-n|, must print the string \arb[trans]{lAm} +% $+$ \arb[trans]{nUn} $+$ \arb[trans]{^saddaT} in Arabic, and exactly +% \txtrans{n-n} in transliteration. Thus an Arabic mark is +% needed:--- % +% \iffalse +%<*example> +% \fi +\begin{arabluacode} + \newarbmark{lnn}{^^^^0644^^^^0646^^^^0651}{n-n} + \arb[fullvoc]{fI\arbnull{al-} + \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi} + \arb[trans]{fI\arbnull{al-} + \arbcolor[red]{\arbnull{al-}a}\arbmark{lnn}Asi}. +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% \paragraph{\texorpdfstring{\arb[trans]{hamzaT}}{hamzah}} +% The \enquote*{quoting} technique provides an easy way to determine +% the carrier of the \arb[trans]{hamzaT}, as shown in +% \vref{tab:quoted-hamza}---: +% \begin{quote} +% \verb+yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna+ +% \arb{yatasA\arbnull{'a}\arbcolor[red]{|"'}.alUna} +% \arb[trans]{yatasA\arbnull{'a}\-\arbcolor[red]{|"'}.a\-lUna}, +% \verb+^say\arbcolor[red]{|"'}\arbnull{'}aN+ +% \arb{^say\arbcolor[red]{|"'}\arbnull{'}aN} +% \arb[trans]{^say\arbcolor[red]{|"'}\arbnull{'}aN}, +% \verb+^say\ar+\allowbreak\verb+bcolor[red]{|"'}iN+ +% \arb{^say\arbcolor[red]{|"'}iN} +% \arb[trans]{^say\arbcolor[red]{|"'}iN}, +% |\arbcolor[red]{a"'}.as\arbcolor|\allowbreak|[red]{y"'}.ilaTuN| +% \arb{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN} +% \arb[trans]{\arbcolor[red]{a"'}.as\arbcolor[red]{y"'}.ilaTuN}. +% \end{quote} +% +% % \section{Transliteration} % \label{sec:transliteration} % It may be more appropriate to speak of \enquote{romanization} than @@ -2515,7 +2913,7 @@ word that \cs{arbnull} is applied to. % This mode transliterates the Arab\TeX\ input into one of the % accepted standards. As said above \vpageref{ref:describe-trans}, % three standards are supported at present: -% \begin{compactdesc} +% \begin{description} % \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which was % adopted by the International Convention of Orientalist Scholars in % Rome in 1935.\footnote{See \textcite{dmg}.} |dmg| transliteration @@ -2534,7 +2932,7 @@ word that \cs{arbnull} is applied to. % is most widely used by scholars in the field of Arabic % studies.\footnote{See % \url{http://www.brill.nl/files/brill.nl/specific/authors_instructions/ARAB.pdf}.} -% \end{compactdesc} +% \end{description} % More standards will be included in future releases of % \package{arabluatex}. % @@ -2544,7 +2942,7 @@ word that \cs{arbnull} is applied to. % \cs{SetTranslitConvention}\marg{mode} command , where \meta{mode} % may be either |dmg|, |loc| or |arabica|. This command is also % accepted in the preamble should one wish to set the transliteration -% mode globally, eg.:---% +% mode globally, e.g.:---% % \iffalse %<*example> % \fi @@ -2561,7 +2959,7 @@ word that \cs{arbnull} is applied to. % also can be changed either globally in the preamble or locally at % any point of the document by the \cs{SetTranslitStyle}\marg{style} % command, where \meta{style} may be any font shape selection -% command, eg. \cs{upshape}, \cs{itshape}, \cs{slshape}, and so forth. +% command, e.g. \cs{upshape}, \cs{itshape}, \cs{slshape}, and so forth. % % \paragraph{Font} \NEWfeature{v1.4} \DescribeMacro{\SetTranslitFont} % \cs{SetTranslitFont}\marg{font selection command} allows any @@ -2633,7 +3031,7 @@ word that \cs{arbnull} is applied to. % \uc{'l-rAziyyu}}. % \end{quote} % -% \paragraph{\enquote*{Long} proper names} +% \paragraph{\enquote*{Long} pro\-per names} % \NEWfeature{v1.10} \cs{uc} is also able to process proper names % consisting of several subsequent words:--- % \begin{quote} @@ -2693,13 +3091,13 @@ Then as \Hunayn, \Razi. % \NEWfeature{v1.3} According to \textcite[6]{dmg}, Arabic % \arb[trans]{'i`rAb} may be rendered into |dmg| in three different % ways: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \label{ref:dmg-full-rend}In full: % \NoArbUp\arb[trans]{\uc{`amruNU}}\ArbUpDflt\,; % \item \label{ref:dmg-up-rend}As superscript text: % \arb[trans]{\uc{`amruNU}}\,; % \item \label{ref:irab-discarded}Discarded: \arb[trans]{\uc{`amr}}. -% \end{compactenum} +% \end{enumerate} % \DescribeMacro{\arbup} By default, \package{arabluatex} applies rule % \ref{ref:dmg-up-rend}. Once delimited by a set of Lua functions, % \arb[trans]{'i`rAb} is passed as an argument on to a \cs{arbup} @@ -2732,7 +3130,8 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % with the actual \arb[trans]{tanwIn} in the formatting directives of % the \cs{SetArbUp} command. % -% \paragraph{\arb[trans]{'i`rAb} boundaries} +% \paragraph{\texorpdfstring{\arb[trans]{'i`rAb} boundaries}{ʾiʿrāb +% boundaries}} % Every declinable noun (\arb[trans]{mu`rab}) may be declined either % with or without \arb[trans]{tanwIn}, viz. \arb[trans]{mun.sarifuN} % or \arb[trans]{.gayr-u mun.sarifiN}. The former is automatically @@ -2780,20 +3179,22 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % 'l-nAs-a kAffaT-aN min mu_hA.tabati-hi 'a.had-uN bi-sayyidi-nA}. % \end{quoting} % -% \paragraph{Discarding the \arb[trans]{'i`rAb}} +% \paragraph{\texorpdfstring{Discar\-ding the +% \arb[trans]{'i`rAb}}{Discarding the ʾiʿrāb}} +% \label{ref:ta-marbutah-pipe} % As said above (\vref{ref:irab-discarded}), the \arb[trans]{'i`rAb} % may be discarded in some cases, as in transliterated proper names or % book titles. \package{arabluatex} is able to render words ending % with \arb[trans]{tA' marbU.taT} in different ways, depending on % their function:--- -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Nouns followed by an adjective in apposition: |madInaT| % |kabIraT| \arb[trans]{madInaT kabIraT}, |al-madInaT| |al-kabIraT| % \arb[trans]{al-madInaT al-kabIraT}. % \item Nouns followed by another noun in the genitive (contruct % state): |.hikmaT| |al-l_ah| \arb[trans]{.hikmaT| \uc{al-l_ah}}, % |fi.d.daT| |al-darAhim| \arb[trans]{fi.d.daT al-darAhim}. -% \end{compactenum} +% \end{enumerate} % \begin{quoting} % \textsc{Rem.} It may so happen, as in the absence of the article % before the annexed word, that \package{arabluatex} be unable to @@ -2919,6 +3320,9 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % are also available. % % \begin{longtable}{llllll} +% \bottomrule +% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme} +% \endfoot % \captionlistentry{Buckwalter scheme}\\[-1em] % \toprule % Letter & \multicolumn{3}{l}{Transliteration\footnotemark} @@ -2936,6 +3340,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{a} & \dmg{a} & \loc{a} & \brill{a} & |A| & |A| \\ % \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| & |b| \\ % \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| & |t| \\ +% \pagebreak[1] % \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & \brill{_t} & |v| & |v| \\ % \arb[novoc]{j} & \dmg{j} & \loc{j} & \brill{j} & |j| & |j| \\ % \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & \brill{.h} & |H| & |H| \\ @@ -2947,6 +3352,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{s} & \dmg{s} & \loc{s} & \brill{s} & |s| & |s| \\ % \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & \brill{^s} & |$| & |c| \\ % \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & \brill{.s} & |S| & |S| \\ +% \pagebreak[1] % \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & \brill{.d} & |D| & |D| \\ % \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & \brill{.t} & |T| & |T| \\ % \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & \brill{.z} & |Z| & |Z| \\ @@ -2985,8 +3391,6 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & \brill{B_a} & |`| & |e| \\ % \midrule % \arb[novoc]{--} (\arb[trans]{ta.twIl}) & --- & --- & --- & |_| & |_| \\ -% \bottomrule -% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme} % \end{longtable} % % \paragraph{Transliteration} @@ -3037,7 +3441,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % % That said, there are two ways of inserting Unicode % Arabic: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item \DescribeMacro{\txarb} The \cs{txarb}\marg{Unicode Arabic} % command for inserting Unicode Arabic text in paragraphs; % \item The \DescribeEnv{txarab} |txarab| environment for inserting @@ -3053,16 +3457,18 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \iffalse %</example> % \fi -% \end{compactenum} +% \end{enumerate} % +% \needspace{4\baselineskip} % \section{\LaTeX\ Commands in Arabic environments} % \label{sec:commands-in-arb} % \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\ % commands are accepted in Arabic environments. The general principle -% which applies is that single-argument commands -% (\cs{command}\marg{arg}) such as \cs{emph}\marg{text}, -% \cs{textbf}\marg{text} and the like, are assumed to have Arabic text -% as their arguments:--- +% which applies is that any single-argument command with up to +% \emph{two optional arguments}---that is: +% \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg}---such as +% \cs{emph}\marg{text}, \cs{textbf}\marg{text} and the like, is +% assumed to have Arabic text in its mandatory argument:--- % \begin{quote} % |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\uc{`AdAt-i}}| % \arb[voc]{\abjad{45} kitAbu-hu \emph{fI 'l-\uc{`AdAt-i}}} @@ -3070,6 +3476,9 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % 'l-\uc{`AdAt-i}}}.\footnote{This is odd in Arabic script, but % using such features as \cs{emph} or \cs{textbf} is a matter of % personal taste.} +% +% |\arb{\abjad{45} \framebox[1in][s]{kitAbu-hu fI 'l-`AdAti}}|\\ +% \arb{\abjad{45} \framebox[1in][s]{kitAbu-hu fI 'l-`AdAti}} % \end{quote} % % The same applies to footnotes:--- @@ -3091,7 +3500,7 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i % \fi % % Some commands, however, do not expect running text in their -% arguments, or one may wish to insert English text eg. in footnotes +% arguments, or one may wish to insert English text e.g. in footnotes % or in marginal notes. \package{arabluatex} provides a set of % commands to handle such cases. % @@ -3119,11 +3528,13 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i %<*example> % \fi \begin{arabluacode} -\arb[fullvoc]{\uc{z}ayd-uN\LRfootnote{% -\enquote{\arb[trans]{\uc{z}ayd} is the son of -\arb[trans]{\uc{`a}mr}}: the second -noun is not in apposition to the first, but forms -part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU} + \begin{arab}[fullvoc] + \uc{z}ayd-uN\arbnull{ibnu}\LRfootnote{% + \enquote{\arb[trans]{\uc{z}ayd} is the son of + \arb[trans]{\uc{`a}mr}}: the second noun is not in + apposition to the first, but forms part of the + predicate\ldots} \arbnull{zayduN}ibn-u \uc{`a}mr-iNU + \end{arab} \end{arabluacode} % \iffalse %</example> @@ -3144,9 +3555,10 @@ part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU} % the documentation of \package{KOMA-script} for details about the % \cs{deffootnotemark} and \cs{deffootnote} commands.} % -% \DescribeMacro{\LRmarginpar} The \cs{LRmarginpar} command does for -% marginal notes the same as \cs{LRfootnote} does for footnotes. Of -% course, it is supposed to be used in Arabic environments. Note that +% \DescribeMacro{\LRmarginpar} The +% \cs{LRmarginpar}\oarg{left}\marg{right} command does for marginal +% notes the same as \cs{LRfootnote} does for footnotes. Of course, it +% is supposed to be used in Arabic environments. Note that % \cs{marginpar} also works in Arabic environments, but it acts as any % other single-argument command inserted in Arabic environments. The % general principle laid \vpageref{ref:cmd-inside-arabic} applies. @@ -3188,23 +3600,22 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % % \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of % commands} command can 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 +% 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.} % +% fully vocalized Arabic:--- % % \iffalse %<*example> % \fi \begin{arabluacode} \MkArbBreak{fvred} - \newcommand{\fvred}[1]{\textcolor{red}{\arb[fullvoc]{#1}}} + \newcommand{\fvred}[1]{\arbcolor[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 @@ -3215,6 +3626,50 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... %</example> % \fi % +% It must be noted that the arguments, either optional or mandatory, +% of commands declared with \cs{MkArbBreak} are not to be processed by +% \package{arabluatex}. Therefore, as in the previous example, any of +% their argument to be rendered in Arabic must be inserted again in +% \cs{arb}. \NEWfeature{v1.12}These commands themselves may have up to +% two optional and/or mandatory arguments followed by one optional +% argument, like so:--- +% \begin{enumerate} +% \item \cs{command} (no argument, lowermost combination) +% \item \cs{command}\oarg{opt1} (one optional argument) +% \item \cs{command}\marg{arg1} (one mandatory argument) +% \item \cs{command}\oarg{opt1}\marg{arg1} (one optional and one +% mandatory argument) +% \item{} [\ldots] +% \item \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2} +% \item +% \cs{command}\oarg{opt1}\oarg{opt2}\marg{arg1}\marg{arg2}\oarg{opt3} +% (uppermost combination) +% \end{enumerate} +% +% \DescribeMacro{\MkArbBreak*}\NEWfeature{v1.12} As said above, +% \cs{MkArbBreak} prevents \package{arabluatex} from processing the +% arguments of \enquote*{declared} commands as Arabic text. This +% technique proves sufficient in most cases. However, a +% \enquote*{starred} version of this +% command---\cs{MkArbBreak*}\marg{csv list of commands}---is also +% provided. It goes a step further, as it directs \package{arabluatex} +% to \emph{close} the current Arabic environment before any of the +% \enquote*{declared} commands, then \emph{resume} it just after. +% +% \iffalse +%<*example> +% \fi +\begin{arabluacode}[text only] + It must be noted that \cs{MkArbBreak*} must be used with the utmost + care and \emph{should never be used} if \cs{MkArbBreak} gives + satisfaction. At any rate, the latter must always be tested before + the former. +\end{arabluacode} +% \iffalse +%</example> +% \fi% +% +% % \subsection{Environments} % \label{sec:environments} % \changes{v1.5}{2016/11/14}{Environments may be nested inside the @@ -3248,18 +3703,19 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI 'ahdA-hA dUna mA kAna yuttaxa_du li-\uc{muwaysiN}. wa-l_akinna-hu bi-karami-hi wa-bi-.husni xuluqi-hi 'a.zhara 'l-ta`ajjuba min simani-hA - wa-.tIbi la.hmi-hA. wa-kAna <\uc{'abU} \uc{'l-hu_dayli}> yu`rafu - bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA - \uc{'abA} \uc{`imrAna} tilka 'l-dajAjaTa?} qAla: + wa-.tIbi la.hmi-hA. wa-kAna <\uc{'abU} \uc{'l-hu_dayli}> + yu`rafu bi-'l-'imsAki 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa + ra'ayta yA \uc{'abA} \uc{`imrAna} tilka 'l-dajAjaTa?} qAla: \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: - \begin{quoting}[begintext=», endtext=«] + \begin{quoting}[begintext=\textquotedblright, + endtext=\textquotedblleft] wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? fa-'inna - 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni. wa-tadrI - bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi makAniN kunnA - na`lifu-hA? + 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi wa-'l-sinni. + wa-tadrI bi-'ayyi ^say'iN kunnA nusamminu-hA? wa-fI 'ayyi + makAniN kunnA na`lifu-hA? \end{quoting} - fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN na`rifu-hu - na.hnu wa-lA ya`rifu-hu \uc{'abU} \uc{'l-hu_dayli}. + fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN + na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'abU} \uc{'l-hu_dayli}. \end{arab} \end{arabluacode} % \iffalse @@ -3270,9 +3726,9 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % \label{sec:lists} % Lists environments are also accepted inside the |arab| % environment. One may either use any of the three standard list -% environments, viz. |itemize|, |enumerate| and |description| or use a -% package that provides additional refinements such as -% \package{paralist}. +% environments, viz. |itemize|, |enumerate| and |description| or use +% packages that provide additional refinements such as +% \package{paralist} or \package{enumitem}. % % To take a first example, should one wish to typeset a list of % manuscripts, the |description| environment can be used like so:--- @@ -3320,6 +3776,53 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... %</example> % \fi % +% \label{ref:abjad-list} +% As a third example, abjad-numbered lists can be typeset in +% conjunction with the \package{enumitem} package,\footnote{See the +% documentation of \package{enumitem} for more details: +% \url{https://ctan.org/pkg/enumitem}} like so:--- +% \iffalse +%<*example> +% \fi +\begin{arabluaverbatim} + % preamble:--- + \usepackage{enumitem} + \newlist{enumabjad}{enumerate}{10} + \setlist[enumabjad]{nosep, label={\abjad{\arabic*}}} + \usepackage{multicol} +\end{arabluaverbatim} +\begin{arabluacode} + From \textcite[i. 29 B--C]{Wright}:--- The derived forms of the + triliteral verb are usually reckoned fifteen in number, but the + learner may pass over the last four, because (with the exception + of the twelfth) they are of very rare occurrence. + \RLmulticolcolumns + \begin{multicols}{3} + \begin{arab}[fullvoc] + \begin{enumabjad} + \item fa`ala + \item fa``ala + \item fA`ala + \item 'af`ala + \item tafa``ala + \item tafA`ala + \item infa`ala + \item ifta`ala + \item if`alla + \item istaf`ala + \item if`Alla + \item if`aw`ala + \item if`awwala + \item if`anlala + \item if`anl_A + \end{enumabjad} + \end{arab} + \end{multicols} +\end{arabluacode} +% \iffalse +%</example> +% \fi +% % \paragraph{Caveat} % The various French definition files of the \package{babel} package % viz. |acadian|, |canadien|, |francais|, |frenchb| or |french| all @@ -3338,9 +3841,9 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... %</example> % \fi% % This option will prevent \package{babel-french} from interfering -% with the layout of the document. Then the package \package{paralist} -% can be used to make the lists \enquote*{compact} as -% \package{babel-french} do. +% with the layout of the document. Then the \package{paralist} or +% \package{enumitem} packages can be used to make the lists +% \enquote*{compact} as \package{babel-french} do. % % \subsection{\package{csquotes}} % \label{sec:csquotes} @@ -3354,8 +3857,8 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... \begin{arabluaverbatim} \usepackage{csquotes} \DeclareQuoteStyle{arabic} -{\rmfamily\textquotedblright}{\rmfamily\textquotedblleft} -{\rmfamily\textquoteright}{\rmfamily\textquoteleft} +{\textquotedblright}{\textquotedblleft} +{\textquoteright}{\textquoteleft} \end{arabluaverbatim} % \iffalse %</example> @@ -3381,14 +3884,17 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % line in the code above. % \end{quoting} % -% \subsection{Two-argument commands} +% \subsection{Two-argument special commands} % \label{sec:two-arg-cmds} % -% \paragraph{Color} +% \paragraph{textcolor} % \label{sec:textcolor} -% The two-argument command \cs{textcolor}\marg{color}\marg{Arabic +% The two-argument command \cs{textcolor}\marg{color}\marg{Ara\-bic % text} is supported inside \cs{begin}|{arab}| \ldots\ -% \cs{end}|{arab}|. One simple example follows:--- % +% \cs{end}|{arab}|. One simple example +% follows:\footnote{\package{arabluatex} provides its own +% \cs{arbcolor} command which is able to render syllabes or diacritics +% in colors. See \vref{sec:color}.}--- % % \iffalse %<*example> % \fi @@ -3417,9 +3923,11 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... % \paragraph{\package{reledmac}} % \label{sec:reledmac} % 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:--- +% supported inside \cs{begin}|{arab}| \ldots\ +% \cs{end}|{arab}|.\footnote{\cs{pstart} and \cs{pend} are also +% supported inside the |arab| environment.} As an example, one may get +% \package{arabluatex} and \package{reledmac} to work together like +% so:--- % % \iffalse %<*example> % \fi @@ -3483,25 +3991,25 @@ wa-ya.sIru ta.hta 'l-jild-i % \label{sec:future-work} % A short, uncommented, list of what is planned in the versions of % \package{arabluatex} to come follows: -% \begin{compactenum}[(a)] +% \begin{enumerate} % \item Short-term: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item \texttt{TEI xml} support: \package{arabluatex} will % interoperate with \texttt{TEI xml} through new global and local % options that will output Arabic in a \texttt{TEI xml} compliant % file in addition to the usual PDF output: see % \vpageref{ref:tei-to-come}. -% \end{compactenum} +% \end{enumerate} % \item Medium-term: -% \begin{compactenum}[i.] +% \begin{enumerate} % \item More languages: the list of supported languages will % eventually be the same as \package{arabtex}: see % \vref{fn:arabtex-languages}. % \item Formulate propositions for extending the Arab\TeX\ notation % and the transliteration tables. Include them in % \package{arabluatex}. See \vref{sec:additional-characters}. -% \end{compactenum} -% \end{compactenum} +% \end{enumerate} +% \end{enumerate} % % \StopEventually{} % @@ -3517,11 +4025,11 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabluatex}% -[2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX] +[2018/06/24 v1.12 An ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} % \end{macrocode} -% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning -% if the document is processed with another engine. +% \package{arabluatex} requires \hologo{LuaLaTeX} of course. Issue a +% warning if the document is processed with another engine. % \begin{macrocode} \ifluatex\else \PackageError{arabluatex}{lualatex needed}{% @@ -3547,6 +4055,8 @@ wa-ya.sIru ta.hta 'l-jild-i % \end{macrocode} % Packages that are required by \package{arabluatex}: % \begin{macrocode} +\RequirePackage{xcolor} +\RequirePackage{luacolor} \RequirePackage{etoolbox} \RequirePackage{arabluatex-patch} \RequirePackage{fontspec} @@ -3564,12 +4074,6 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \luadirect{dofile(kpse.find_file("arabluatex.lua"))} % \end{macrocode} -% This is needed by the current versions of \package{polyglossia} and -% \package{luabidi}. \package{luabidi} provides a \cs{Footnote} -% command. Use it as well if it is loaded. -% \begin{macrocode} -\luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))} -% \end{macrocode} % Font setup. If no Arabic font is selected, issue a warning message % and attempt to load the Amiri font which is included in \TeX{}live: % \begin{macrocode} @@ -3579,8 +4083,7 @@ wa-ya.sIru ta.hta 'l-jild-i \newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}% % \end{macrocode} % \begin{macro}{\setRL} -% This neutralizes what is defined by the same command in -% \package{luabidi}: +% This neutralizes what may be defined by other packages: % \begin{macrocode} \AtBeginDocument{\def\setRL{\booltrue{al@rlmode}\pardir TRT\textdir TRT}} % \end{macrocode} @@ -3609,17 +4112,28 @@ wa-ya.sIru ta.hta 'l-jild-i % \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 can 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. +% \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 can 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{macro}{\MkArbBreak*} +% \changes{v1.12}{2018/06/24}{\enquote*{starred} version which +% closes Arabic environments before processing declared commands.} +% \cs{MkArbBreak*} goes a step further as it directs +% \package{arabluatex} to close the current Arabic environment before +% processing any \enquote*{declared} command then resume it just +% after. % \begin{macrocode} -\DeclareDocumentCommand{\MkArbBreak}{m}{% - \luadirect{mkarbbreak(\luastringN{#1})}} +\NewDocumentCommand{\MkArbBreak}{s m}{% + \IfBooleanTF{#1} + {\luadirect{mkarbbreak(\luastringN{#2}, "out")}} + {\luadirect{mkarbbreak(\luastringN{#2}, "dflt")}} +} % \end{macrocode} % \end{macro} +% \end{macro} % \begin{macro}{\aemph} Arabic emphasis. Needs to be redefined as % well. The function is actually coded in Lua. % \begin{macro}{\aemph*} The \enquote*{starred} version of this @@ -3630,15 +4144,25 @@ wa-ya.sIru ta.hta 'l-jild-i \AtBeginDocument{\ifdef{\aemph}% {\RenewDocumentCommand{\aemph}{s m}{% \IfBooleanTF{#1}{% - $\overline{\text{#2}}$} - {\luadirect{tex.sprint(aemph(\luastringN{#2}))}}}} + \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}} + {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}} {\NewDocumentCommand{\aemph}{s m}{% \IfBooleanTF{#1}{% - $\overline{\text{#2}}$} - {\luadirect{tex.sprint(aemph(\luastringN{#2}))}}}}} + \luadirect{tex.sprint(aemph(\luastringN{#2}, "over"))}} + {\luadirect{tex.sprint(aemph(\luastringN{#2}, "dflt"))}}}}} % \end{macrocode} % \end{macro} % \end{macro} +% \begin{macro}{\arbcolor}\changes{v1.12}{2018/06/24}{Standard color +% command for Arabic environments} +% \cs{arbcolor}\oarg{color}\marg{Arabic text} takes the Arabic text to +% be colored as argument. +% \begin{macrocode} +\NewDocumentCommand{\arbcolor}{o m}{% + \IfNoValueTF{#1}{#2}{\textcolor{#1}{#2}}} +% \end{macrocode} +% +% \end{macro} % \begin{macro}{\SetInputScheme} % \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} can be used to % process other input schemes such as \enquote*{Buckwalter}} @@ -3789,7 +4313,7 @@ wa-ya.sIru ta.hta 'l-jild-i \NewDocumentCommand{\txarb}{+m}{\bgroup\textdir TRT\arabicfont#1\egroup} \NewDocumentCommand{\txtrans}{+m}{\bgroup\textdir - TLT\al@trans@font#1\egroup} + TLT\al@trans@font\al@trans@style#1\egroup} % \end{macrocode} % \end{macro} % \end{macro} @@ -3813,19 +4337,25 @@ wa-ya.sIru ta.hta 'l-jild-i \NewDocumentCommand{\arb}{O{\al@mode} +m}% {\edef\@tempa{#1}% \ifx\@tempa\al@mode@voc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@fullvoc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processfullvoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@novoc% + \booltrue{al@rlmode}% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processnovoc(\luastringN{#2}, \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% + \boolfalse{al@rlmode}% \else% \ifx\@tempa\al@mode@trans% \bgroup\textdir TLT\al@trans@style% @@ -3988,11 +4518,15 @@ wa-ya.sIru ta.hta 'l-jild-i \AtBeginDocument{% \ifdefined\abjad% \RenewDocumentCommand{\abjad}{m}% - {\luadirect{tex.sprint(abjadify(#1))}}% + {\ifbool{al@rlmode}% + {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} \else% \NewDocumentCommand{\abjad}{m}% - {\luadirect{tex.sprint(abjadify(#1))}} -\fi} + {\ifbool{al@rlmode}% + {\aemph{\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + {\luadirect{tex.sprint(abjadify(\luastring{#1}))}}} + \fi} % \end{macrocode} % \end{macro} % \begin{macro}{\arbnull} @@ -4020,7 +4554,10 @@ wa-ya.sIru ta.hta 'l-jild-i % inserted in an Arabic environment. It typsets his argument in a % marginal note from left to right. % \begin{macrocode} -\DeclareDocumentCommand{\LRmarginpar}{m}{\marginpar{\textdir TLT #1}} +\DeclareDocumentCommand{\LRmarginpar}{o m}{% + \IfNoValueTF{#1} + {\marginpar{\textdir TLT #2}} + {\marginpar[\textdir TLT #1]{\textdir TLT #2}}} % \end{macrocode} % \end{macro} % \begin{macro}{\LRfootnote} \cs{LRfootnote} and \cs{RLfootnote} are @@ -4049,6 +4586,19 @@ wa-ya.sIru ta.hta 'l-jild-i \AtBeginDocument{\deffootnote{2em}{1.6em}{\LR{\thefootnotemark}.\enskip}}}} % \end{macrocode} % \end{macro} +% \subsection*{Errors and Warnings} +% \begin{macrocode} +\newcommand{\al@warning}[1]{\PackageWarning{arabluatex}{#1}} +\newcommand{\al@error}[2]{\PackageError{arabluatex}{#1}{#2}} +\newcommand{\al@wrong@nesting}{\al@error{% + (RL/LR)\string\footnote\space is not allowed\MessageBreak inside + \string\RL{} and \string\RL{} commands}{% + Get rid of the surrounding \string\RL{} or \string\LR{} command.}} +\newcommand{\al@wrong@mark}{\al@warning{% + Unknown Arabic mark in \string\arbmark{}. Replaced + with\MessageBreak <??>. Please check your code}} +% \end{macrocode} +% % That is it. Say goodbye before leaving. % % \iffalse @@ -4073,7 +4623,7 @@ wa-ya.sIru ta.hta 'l-jild-i % % The following is taken from |latex.ltx|. I had to make this patch % for I could not find a way to process the list environments in -% right-to-left mode. The \LuaTeX\ primitives \cs{bodydir} and +% right-to-left mode. The \hologo{LuaTeX} primitives \cs{bodydir} and % \cs{pagedir} will eventually allow us to get rid of this: % \begin{macrocode} \def\list#1#2{% |