diff options
author | Karl Berry <karl@freefriends.org> | 2016-07-05 21:39:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-07-05 21:39:55 +0000 |
commit | b4b6a71b473d050e24fc63a01cf3bc36e4b5582d (patch) | |
tree | 58c8379df6f044d28c711cbd52018757608c8b51 /Master/texmf-dist/source | |
parent | 2fb347ba645d1206714d176309b4ec87e5164b0a (diff) |
arabluatex (5jul16)
git-svn-id: svn://tug.org/texlive/trunk@41637 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx | 297 |
1 files changed, 244 insertions, 53 deletions
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx index edefb867808..f72d1d904db 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> - [2016/05/28 v1.3 This is ArabTeX for LuaLaTeX] + [2016/07/05 v1.4 This is ArabTeX for LuaLaTeX] %</package-info> % %<*driver> @@ -130,13 +130,13 @@ \usepackage[english]{babel} \usepackage{dox} \doxitem{Option}{option}{options} -\def\actualchar{ =} +\def\actualchar{ =} % there's a bug in doxitem; quick fix. \usepackage{fontspec,luatextra} -\defaultfontfeatures{RawFeature={+liga;+onum;+hlig}} -\setmainfont{Libertinus Serif} -\setsansfont{Libertinus Sans} -\setmonofont[Scale=.9]{Libertinus Mono} -\usepackage{arabluatex}[2016/05/28] +\defaultfontfeatures{RawFeature={+liga}} +\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps}] +\newfontfamily\translitfont{Latin Modern Roman}[Ligatures=TeX] +\usepackage{arabluatex}[2016/07/05] +\SetTranslitFont{\translitfont} \usepackage{varioref} \usepackage{hypdoc} \hypersetup{unicode=true, colorlinks, allcolors=blue, @@ -189,7 +189,7 @@ %</driver> % \fi % -% \CheckSum{342} +% \CheckSum{371} % % \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 @@ -217,7 +217,8 @@ % \DoNotIndex{\else,\endcsname,\endinput,\expandafter,\fi} % \DoNotIndex{\ifdef,\ifdefined,\ifx,\MessageBreak,\NeedsTeXFormat} % \DoNotIndex{\NewDocumentCommand,\newif,\PackageError,\PackageWarning} -% \DoNotIndex{\relax,\RenewDocumentCommand,\string,\verb} +% \DoNotIndex{\relax,\RenewDocumentCommand,\string,\verb,\let} +% \DoNotIndex{\enskip} % % \providecommand*{\url}{\texttt} % \GetFileInfo{arabluatex.dtx} @@ -310,9 +311,9 @@ % \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 % \LaTeX. To achieve that, \package{arabtex} provided---and still -% does---an Arabic font in \emph{Nasḫī} style and a macro package that -% defined its own input notation which was, as the author stated, -% \enquote{both machine, and human, readable, and suited for +% does---an Arabic font in \arb[trans]{\cap{nasxI}} style and a macro +% package that defined its own input notation which was, as the author +% stated, \enquote{both machine, and human, readable, and suited for % electronic transmission and e-mail % communication}.\footnote{\textcite[2]{pkg:arabtex}.} Even if the % same can be said about Unicode, Arab\TeX\ \textsc{ASCII} input @@ -410,26 +411,26 @@ % loading \package{arabluatex}. Assuming that \package{fontspec} is % loaded, put this in your preamble just above the line that loads % \package{arabluatex}: -% \arabluabox{\cs{newfontfamily}\cs{arabicfont}[Script=Arabic]\marg{fontname}} +% \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. % % By default, if no Arabic font is selected, \package{arabluatex} will % issue a warning message and attempt to load the Amiri % font\footnote{\textcite{pkg:amiri}.} like so:---\\ -% \arabluaverb{\newfontfamily\arabicfont[Script=Arabic]{Amiri}} +% \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic]} % \begin{quoting} % \textsc{Rem.} By default Amiri places the \arb[trans]{kasraT} in % combination with the \arb[trans]{ta^sdId} below the consonant, % like so: \arb{BBi}\,. That is correct, as at least in the oldest -% manuscripts {\newfontfamily\arabicfont[Script=Arabic, -% RawFeature={+ss05}]{Amiri}\arb{BBi}} may stand for \arb{BBa} as +% manuscripts {\newfontfamily\arabicfont{Amiri}[Script=Arabic, +% RawFeature={+ss05}]\arb{BBi}} may stand for \arb{BBa} as % well as \arb{BBi}\,. See \textcite[i.14.C--D]{Wright}. The placement % 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}.}\\ -% \arabluaverb{\newfontfamily\arabicfont[Script=Arabic,RawFeature={+ss05}]{Amiri}} +% \arabluaverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]} % % Other Arabic fonts may behave differently. % \end{quoting} @@ -444,8 +445,8 @@ % which is the one selected by default, every short vowel written % generates its corresponding diacritical mark: \arb[trans]{.dammaT} % (\arb{Bu}), \arb[trans]{fat.haT} (\arb{Ba}) and \arb[trans]{kasraT} -% (\arb{Bi}). If a vowel is followed by \meta{uN, aN, iN}, then the -% corresponding \arb[trans]{tanwIn} (\arb{BuN}, \arb{B|aN}\,, +% (\arb{Bi}). If a vowel is followed by |N|, viz. \meta{uN, aN, iN}, +% then the corresponding \arb[trans]{tanwIn} (\arb{BuN}, \arb{B|aN}\,, % \arb{TaN}, \arb{BaN_A} or \arb{BiN}) is generated. Finally, \meta{u, % a, i} at the commencement of a word indicate a \enquote{connective % \arb[trans]{'alif}\,} (\arb[trans]{'alifu 'l-wa.sli}), but |voc| @@ -579,17 +580,17 @@ vowels (see §~3). \begin{arabluacode} \begin{arab} 'at_A .sadIquN 'il_A ju.hA ya.tlubu min-hu .himAra-hu - li-yarkaba-hu fI safraTiN qa.sIraTiN. wa-qAla la-hu: + li-yarkaba-hu fI safraTiN qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla ju.hA: \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an - 'u.haqqiqa la-ka .garbata-ka fa-'l-.himAr-u laysa hunA + 'u.haqqiqa la-ka ra.gbabata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla 'an yutimma ju.hA kalAma-hu bada'a - 'l-.himAr-u yanhaqu fI 'i.s.tabili-hi. fa-qAla la-hu + 'l-.himAr-u yanhaqu fI 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u .himAra-ka yA ju.hA yanhaqu.} fa-qAla la-hu ju.hA: \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a - wa-tuka_d_dibu-nI?} + wa-tuka_d_diba-nI?} \end{arab} \end{arabluacode} % \iffalse @@ -621,7 +622,7 @@ vowels (see §~3). %\section{Standard Arab\TeX\ input} %\subsection{Consonants} % \Cref{tab:arabtex-consonants} gives the Arab\TeX\ equivalents for -% all of the Arabic consonants. +% all of the Arabic consonants.\linebreak % \newcommand{\dmg}[1]{% % \SetTranslitConvention{dmg}% % \arb[trans]{#1}} @@ -1565,7 +1566,7 @@ vowels (see §~3). % A double hyphen \meta{-\,-} stretches the ligature in which one % letter is bound to another. Although it is always better to rely on % automatic stretching, this technique may be used to a modest extent, -% especially to increase legibility of letters an diacritics which +% especially to increase legibility of letters and diacritics which % stand one above the other:-- % \begin{quote} % |.hunayn-u| |bn-u| |'is.h--_aq-a| \arb[voc]{.hunayn-u bn-u @@ -1747,8 +1748,25 @@ vowels (see §~3). % any point of the document by the command % \cs{SetTranslitStyle}\marg{style}, where \meta{style} may be any % font shape selection command, eg. \cs{upshape}, \cs{itshape}, -% \cs{slshape}, and so forth. Any specific font may also be selected -% using the font-selecting commands of the \package{fontspec} package. +% \cs{slshape}, and so forth. +% +% \paragraph{Font} \NEWfeature{v1.4} \DescribeMacro{\SetTranslitFont} +% \cs{SetTranslitFont}\marg{font selection command} allows any +% specific font to be selected for rendering transliterated text with +% the font-selecting commands of the \package{fontspec} or +% \package{luaotfload} package. Of course, this font must have been +% defined properly. To take one example, here is how the \emph{Gentium +% Plus} font may be used for rendering transliterated text:--- +% \iffalse +%<*example> +% \fi +\begin{arabluaverbatim} +\newfontfamily\translitfont{Gentium Plus}[Ligatures=TeX] +\SetTranslitFont{\translitfont} +\end{arabluaverbatim} +% \iffalse +%</example> +% \fi % % \paragraph{Proper names} \DescribeMacro{\cap} Proper names or book % titles that must have their first letters uppercased may be passed @@ -1843,7 +1861,8 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \arb[voc]{kA'inuN} \arb[trans]{kA'inuN}, |kA'inAtuN| % \arb[voc]{kA'inAtuN} \arb[trans]{kA'inAtuN}, |\cap{`amraNU}| % \arb[voc]{\cap{`amraNU}} \arb[trans]{\cap{`amraNU}}, |fataN_A| -% \arb[voc]{fataN_A} \arb[trans]{fataN_A}. +% \arb[voc]{fataN_A} \arb[trans]{fataN_A}, |qA.diNI| \arb{qA.diNI} +% \arb[trans]{qA.diNI}. % % \arb[trans]{\textbf{.gayr mun.sarif}}: |al-mu`allim-u| % \arb[voc]{al-mu`allim-u} \arb[trans]{al-mu`allim-u}, |kitAb-Ani| @@ -1888,33 +1907,180 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % \begin{arab}[trans] % \LR{\textbf{\emph{\enquote*{dmg}} standard}:} 'at_A .sadIquN 'il_A % \cap{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN -% qa.sIraTiN. wa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI +% qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI % 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \cap{ju.hA}: % \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa -% la-ka .garbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla +% la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla % 'an yutimma \cap{ju.hA} kalAma-hu bada'a 'l-.himAr-u yanhaqu fI -% 'i.s.tabili-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u +% 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u % .himAra-ka yA \cap{ju.hA} yanhaqu.} fa-qAla la-hu \cap{ju.hA}: % \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a -% wa-tuka_d_dibu-nI?} +% wa-tuka_d_diba-nI?} % \end{arab} % % \SetTranslitConvention{loc} % \begin{arab}[trans] % \LR{\textbf{\emph{\enquote*{loc}} standard}:} 'at_A .sadIquN 'il_A % \cap{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN -% qa.sIraTiN. wa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI +% qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI % 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \cap{ju.hA}: % \enquote{'anA 'AsifuN jiddaN 'annI lA 'asta.tI`u 'an 'u.haqqiqa -% la-ka .garbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla +% la-ka ra.gbata-ka fa-'l-.himAr-u laysa hunA 'l-yawm-a.} wa-qabla % 'an yutimma \cap{ju.hA} kalAma-hu bada'a 'l-.himAr-u yanhaqu fI -% 'i.s.tabili-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u +% 'i.s.tabli-hi. fa-qAla la-hu .sadIqu-hu: \enquote{'innI 'asma`u % .himAra-ka yA \cap{ju.hA} yanhaqu.} fa-qAla la-hu \cap{ju.hA}: % \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a -% wa-tuka_d_dibu-nI?} +% wa-tuka_d_diba-nI?} % \end{arab} % \SetTranslitConvention{dmg} % +% \section{Buckwalter input scheme} +% \label{sec:buckwalter-scheme} +% \NEWfeature{v1.4} Even though \package{arabluatex} is primarily +% designed to process the Arab\TeX\ notation, it can also process the +% Buckwalter input scheme to a large extent.\footnote{See +% \url{http://www.qamus.org/transliteration.htm}} The Buckwalter +% scheme is actually processed in two steps, as it is first converted +% into Arab\TeX. Then, once this is accomplished, the Arab\TeX\ scheme +% is processed through the above described functions. In this way, the +% Buckwalter input scheme can make the most of the +% \package{arabluatex} special features that are presented in +% \vref{sec:options}. +% +% \DescribeMacro{\SetInputScheme} The input scheme, which is set to +% |arabtex| by default, may be changed at any point of the document by +% the command \cs{SetInputScheme}\marg{scheme}, where \meta{scheme} +% may be either |arabtex| or |buckwalter|. This command is also +% accepted in the preamble should one wish to set the input scheme +% globally, like so:--- +% \iffalse +%<*example> +% \fi +\begin{arabluaverbatim} +\usepackage{arabluatex} +\SetInputScheme{buckwalter} +\end{arabluaverbatim} +% \iffalse +%</example> +% \fi +% +% \paragraph{Limitations} +% To date, the following two limitations apply: +% \begin{compactenum}[(a)] +% \item The braces |{| and |}|, which are used in Buckwalter scheme to +% encode \arb[novoc]{"a} and \arb[novoc]{y"'}, must be replaced with +% square brackets viz. |[| and |]| respectively. +% \item The underscore character |_|, which is used in Buckwalter +% scheme to encode the Arabic \arb[trans]{ta.twIl} must be replaced +% with a double hyphen |--| (see above \vref{sec:tatwil}). +% \end{compactenum} +% +% \Cref{tab:buckwalter-scheme} gives the Buckwalter equivalents that +% are currently used by \package{arabluatex}. The additional +% characters that are defined in \vref{tab:additional-arabic-codings} +% are also available. +% \begin{longtable}{llll} +% \captionlistentry{Buckwalter scheme}\\[-1em] +% \toprule +% Letter & \multicolumn{2}{l}{Transliteration\footnotemark} +% & Buckwalter notation \\ +% & \texttt{dmg} & \texttt{loc} & \\ \midrule +% \endfirsthead +% \toprule +% Letter & \multicolumn{2}{l}{Transliteration} +% & Buckwalter notation \\ +% & \texttt{dmg} & \texttt{loc} & \\ \midrule +% \endhead \footnotetext{See \vref{sec:transliteration}.} +% \label{tab:buckwalter-scheme} +% \arb[novoc]{a} & \dmg{a} & \loc{a} & \verb|A| \\ +% \arb[novoc]{b} & \dmg{b} & \loc{b} & |b| \\ +% \arb[novoc]{t} & \dmg{t} & \loc{t} & |t| \\ +% \arb[novoc]{_t} & \dmg{_t} & \loc{_t} & |v|\\ +% \arb[novoc]{j} & \dmg{j} & \loc{j} & |j| \\ +% \arb[novoc]{.h} & \dmg{.h} & \loc{.h} & |H| \\ +% \arb[novoc]{x} & \dmg{x} & \loc{x} & |x|\\ +% \arb[novoc]{d} & \dmg{d} & \loc{d} & |d| \\ +% \arb[novoc]{_d} & \dmg{_d} & \loc{_d} & |*| \\ +% \arb[novoc]{r} & \dmg{r} & \loc{r} & |r| \\ +% \arb[novoc]{z} & \dmg{z} & \loc{z} & |z| \\ +% \arb[novoc]{s} & \dmg{s} & \loc{s} & |s| \\ +% \arb[novoc]{^s} & \dmg{^s} & \loc{^s} & |$| \\ +% \arb[novoc]{.s} & \dmg{.s} & \loc{.s} & |S| \\ +% \arb[novoc]{.d} & \dmg{.d} & \loc{.d} & |D| \\ +% \arb[novoc]{.t} & \dmg{.t} & \loc{.t} & |T| \\ +% \arb[novoc]{.z} & \dmg{.z} & \loc{.z} & |Z| \\ +% \arb[novoc]{`} & \dmg{`} & \loc{`} & |E| \\ +% \arb[novoc]{.g} & \dmg{.g} & \loc{.g} & |g| \\ +% \arb[novoc]{f} & \dmg{f} & \loc{f} & |f| \\ +% \arb[novoc]{q} & \dmg{q} & \loc{q} & |q| \\ +% \arb[novoc]{k} & \dmg{k} & \loc{k} & |k| \\ +% \arb[novoc]{l} & \dmg{l} & \loc{l} & |l| \\ +% \arb[novoc]{m} & \dmg{m} & \loc{m} & |m| \\ +% \arb[novoc]{n} & \dmg{n} & \loc{n} & |n| \\ +% \arb[novoc]{h} & \dmg{h} & \loc{h} & |h| \\ +% \arb[novoc]{w} & \dmg{w} & \loc{w} & |w| \\ +% \arb[novoc]{y} & \dmg{y} & \loc{y} & |y| \\ +% \arb[novoc]{T} & \dmg{aT} & \loc{aT} & |p| \\ +% \midrule +% \arb[novoc]{|"'} & \dmg{|"'} & \loc{|"'} & \verb|'| \\ +% \arb[novoc]{A"'} & \dmg{A"'} & \loc{A"'} & \verb+|+ \\ +% \arb[novoc]{a"'} & \dmg{a"'} & \loc{a"'} & \verb|>| \\ +% \arb[novoc]{w"'} & \dmg{w"'} & \loc{w"'} & \verb|&| \\ +% \arb[novoc]{i"'} & \dmg{i"'} & \loc{i"'} & \verb|<| \\ +% \arb[novoc]{y"'} & \dmg{y"'} & \loc{y"'} & \verb|]| \\ +% \midrule +% \arb[novoc]{BB} & --- & --- & \verb|~| \\ +% \arb[novoc]{"a} & ' & ' & |[| \\ +% \midrule +% \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \verb|a| \\ +% \arb[voc]{Bu} & \dmg{Bu} & \loc{Bu} & \verb|u| \\ +% \arb[voc]{Bi} & \dmg{Bi} & \loc{Bi} & \verb|i| \\ +% \arb[voc]{BaN} & \dmg{BaN} & \loc{BaN} & \verb|F| \\ +% \arb[voc]{BuN} & \dmg{BuN} & \loc{BuN} & \verb|N| \\ +% \arb[voc]{BiN} & \dmg{BiN} & \loc{BiN} & \verb|K| \\ +% \arb[voc]{B"} & --- & --- & \verb|o| \\ +% \midrule +% \arb[novoc]{B_a} & \dmg{B_a} & \loc{B_a} & |`| \\ +% \midrule +% \arb[novoc]{--} & --- & --- & |--| (\arb[trans]{ta.twIl})\\ +% \bottomrule +% \caption*{\Cref*{tab:buckwalter-scheme}: Buckwalter scheme} +% \end{longtable} +% +% \paragraph{Transliteration} +% The Buckwalter notation can also be transliterated into any accepted +% romanization standard of Arabic. See above +% \vref{sec:transliteration} for more information. However, it should +% be pointed out again that only accurate coding produces accurate +% transliteration. It is therefore at the very least highly advisable +% to use the hyphen for tying the definite article and the inseparable +% particles (viz. prepositions, adverbs and conjunctions) to words, +% like so:--- \SetInputScheme{buckwalter} +% \begin{quote} +% |Al-EaAlamu| \arb{Al-EaAlam-u} \arb[trans]{Al-EaAlam-u}, +% |Al-$~amsu| \arb{Al-$~ams-u} \arb[trans]{Al-$~ams-u}, +% |bi-SinaAEapi| |Al-T~ib~i|, \arb{bi-SinaAEap-i Al-T~ib~-i} +% \arb[trans]{bi-SinaAEap-i Al-T~ib~-i}. +% +% |wa-Al-l~`hi| \arb{wa-Al-l~`h-i} \arb[trans]{wa-Al-l~`h-i}, +% |Al-Hamdu| |li-l~`hi| \arb{Al-Hamd-u li-l~`h-i} +% \arb[trans]{Al-Hamd-u li-l~`h-i}. +% \end{quote} +% \SetInputScheme{arabtex} +% +% Similary, it is not advisable to use \verb+|+ and |[| to encode the +% \arb[trans]{'alif-u 'l-mamdUdaT-i} and the \arb[trans]{'alif-u +% 'l-wa.sl-i} for such signs can be generated by \package{arabluatex}. +% Besides, as they do not \emph{per se} convey any morphological +% information on what they are derived from, they cannot be +% transliterated accurately. To take one example, % +% \SetInputScheme{buckwalter}% +% |<ilY Al-[ntiqaADi| gives \arb{>ilY Al-[ntiqaADi} as expected, but +% only |<ilY Al-intiqADi| can be transliterated as \arb[trans]{<ilY +% Al-intiqaADi} with the correct vowel \meta{i} in place of the % +% \SetInputScheme{arabtex}% +% \arb[trans]{'alif-u 'l-wa.sl-i}. +% % \section{\LaTeX\ Commands in Arabic environments} % \label{sec:commands-in-arb} % \paragraph{General principle} \label{ref:cmd-inside-arabic}\LaTeX\ @@ -1925,7 +2091,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu % as their arguments:--- % \begin{quote} % |\abjad{45}| |kitAbu-hu| |\emph{fI| |'l-\cap{`AdAt-i}}| -% \arb[voc]{\abjad{45} kitAbu-hu \emph{fI l-\cap{`AdAt-i}}} +% \arb[voc]{\abjad{45} kitAbu-hu \emph{fI 'l-\cap{`AdAt-i}}} % \arb[trans]{\abjad{45} kitAbu-hu \emph{fI % 'l-\cap{`AdAt-i}}}.\footnote{This is odd in Arabic script, but % using such features as \cs{emph} or \cs{textbf} is a matter of @@ -2073,7 +2239,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a... \setquotestyle{arabic} \begin{arab} fa-qAla la-hu ju.hA: \enquote{.garIb-uN 'amru-ka yA .sadIqI - 'a-tu.saddiqu 'l-.himAr-a wa-tuka_d_dibu-nI?} + 'a-tu.saddiqu 'l-.himAr-a wa-tuka_d_diba-nI?} \end{arab} \setquotestyle{english} \end{arabluacode} @@ -2150,7 +2316,7 @@ wa-ya.sIru ta.hta 'l-jild-i % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{arabluatex}% -[2016/05/28 v1.3 ArabTeX-like interface for LuaLaTeX] +[2016/07/05 v1.4 ArabTeX-like interface for LuaLaTeX] \RequirePackage{ifluatex} % \end{macrocode} % \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning @@ -2245,17 +2411,29 @@ wa-ya.sIru ta.hta 'l-jild-i {\RenewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}} {\NewDocumentCommand{\aemph}{m}{$\overline{\text{#1}}$}}} % \end{macrocode} +% \begin{macro}{\SetInputScheme} +% \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} may be used to +% process other input schemes such as \enquote*{Buckwalter}} +% \package{arabluatex} is designed for processing Arab\TeX\ input +% notation. \cs{SetInputScheme} may be used in the preamble or at +% any point of the document should the user wish to use a different +% notation such as the \enquote*{Buckwalter scheme}. +% \begin{macrocode} +\def\al@input@scheme{arabtex} +\NewDocumentCommand{\SetInputScheme}{m}{\def\al@input@scheme{#1}} +% \end{macrocode} +% \end{macro} % \end{macro} % \begin{macro}{\SetArbEasy} % \changes{v1.2}{2016/05/09}{New \cs{SetArbEasy}/\cs{SetArbDflt} for % \enquote*{modern} or \enquote*{classic} Arabic styles.} % \begin{macro}{\SetArbDflt} % By default, \package{arabluatex} applies complex rules to generate -% euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT} -% \linebreak and \arb[trans]{sukUn} depending on the modes which are -% selected, either |voc|, |fullvoc| or |trans|. Such refinements can -% be discarded with \cs{SetArbEasy}, either globally in the preamble -% or at any point of the document. Default complex rules can be set +% euphonic \arb[trans]{ta^sdId}, \arb[trans]{'alif mamdUdaT} and +% \arb[trans]{sukUn} depending on the modes which are selected, +% either |voc|, |fullvoc| or |trans|. Such refinements can be +% discarded with \cs{SetArbEasy}, either globally in the preamble or +% at any point of the document. Default complex rules can be set % back at any point of the document with \cs{SetArbDflt}. % \begin{macrocode} \def\al@arb@rules{dflt} @@ -2263,6 +2441,17 @@ wa-ya.sIru ta.hta 'l-jild-i \NewDocumentCommand{\SetArbDflt}{}{\def\al@arb@rules{dflt}} % \end{macrocode} % \end{macro} +% \begin{macro}{\SetTranslitFont} +% \changes{v1.4}{2016/07/05}{For selecting a specific font for +% transliterated texts} By default, the font that is used for +% transliterated text is the main font of the document. Any other +% font may also be selected with the font-selecting commands of the +% \package{fontspec} package. +% \begin{macrocode} +\def\al@trans@font{\rmfamily}% +\NewDocumentCommand{\SetTranslitFont}{m}{\def\al@trans@font{#1}} +% \end{macrocode} +% \end{macro} % \end{macro} % \begin{macro}{\SetTranslitStyle} By default any transliterated % Arabic text is printed in italics. This can be changed either @@ -2327,7 +2516,7 @@ wa-ya.sIru ta.hta 'l-jild-i \DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir TRT\arabicfont#1\egroup} \DeclareDocumentCommand{\txtrans}{+m}{\bgroup\textdir - TLT\rmfamily#1\egroup} + TLT\al@trans@font#1\egroup} % \end{macrocode} % \end{macro} % \end{macro} @@ -2341,23 +2530,24 @@ wa-ya.sIru ta.hta 'l-jild-i \ifx\@tempa\al@mode@voc% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processvoc(\luastringN{#2}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@fullvoc% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processfullvoc(\luastringN{#2}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@novoc% \bgroup\textdir TRT\arabicfont% \luadirect{tex.sprint(processnovoc(\luastringN{#2}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@trans% \bgroup\textdir TLT\al@trans@style% \luadirect{tex.sprint(processtrans(\luastringN{#2}, \luastringO{\al@trans@convention}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, + \luastringO{\al@input@scheme}))}\egroup% \else% \fi\fi\fi\fi} % \end{macrocode} @@ -2371,22 +2561,23 @@ wa-ya.sIru ta.hta 'l-jild-i \ifx\@tempa\al@mode@voc% \bgroup\pardir TRT\textdir TRT\arabicfont% \luadirect{tex.sprint(processvoc(\luastringO{\BODY}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@fullvoc% \bgroup\pardir TRT\textdir TRT\arabicfont% \luadirect{tex.sprint(processfullvoc(\luastringO{\BODY}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else% \ifx\@tempa\al@mode@novoc% \bgroup\pardir TRT\textdir TRT\arabicfont% \luadirect{tex.sprint(processnovoc(\luastringO{\BODY}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, \luastringO{\al@input@scheme}))}\egroup% \else \ifx\@tempa\al@mode@trans% \bgroup\pardir TLT\textdir TLT\al@trans@style% \luadirect{tex.sprint(processtrans(\luastringO{\BODY}, \luastringO{\al@trans@convention}, - \luastringO{\al@arb@rules}))}\egroup% + \luastringO{\al@arb@rules}, + \luastringO{\al@input@scheme}))}\egroup% \else \fi\fi\fi\fi}[\par] % \end{macrocode} % \end{environment} |