summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-25 22:22:57 +0000
committerKarl Berry <karl@freefriends.org>2016-12-25 22:22:57 +0000
commit3eee810d8e3e8ed9915a59948cb4502cbf9a34e0 (patch)
tree2b1fca73cfa7ba2093eb02881c4d67b6ad1d8182 /Master/texmf-dist/source/lualatex
parent6959c55b1060f5c323f5c5429657597a398de7a1 (diff)
arabluatex (25dec16)
git-svn-id: svn://tug.org/texlive/trunk@42791 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/lualatex')
-rw-r--r--Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx171
1 files changed, 126 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
index 68e76a011ff..22d17fa2314 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/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX]
+ [2016/12/24 v1.7 An ArabTeX-like interface for LuaLaTeX]
%</package-info>
%
%<*driver>
@@ -145,7 +145,7 @@
\defaultfontfeatures{RawFeature={+liga}}
\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps},
RawFeature={+mark;+ccmp;+ss05;+ss06}]
-\usepackage{arabluatex}[2016/12/17]
+\usepackage{arabluatex}[2016/12/24]
\usepackage[nopar]{quran}
\usepackage{varioref}
\usepackage{hypdoc}
@@ -203,7 +203,7 @@
%</driver>
% \fi
%
-% \CheckSum{694}
+% \CheckSum{697}
%
% \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
@@ -257,7 +257,7 @@
% \pagebreak
% \listoftables
% \normalsize
-%
+%
% \begin{abstract}
% This package provides for \LuaLaTeX\ an Arab{\TeX}-like interface
% to generate Arabic writing from an \textsc{ascii}
@@ -1219,7 +1219,7 @@ vowels (see §~3).
% in which \package{arabluatex} expresses the \arb[trans]{sukUn} and
% the \arb[trans]{wa.slaT}. \package{arabluatex} will take care of
% doing that automatically provided that the vowel which is to be
-% absorbed by the final vowel of the preceding word is properly
+% absorbed by the final vowel of the preceding word be properly
% encoded, like so:---
% \begin{compactenum}[(a)]
% \item Definite article at the beginning of a sentence is encoded\\
@@ -1320,6 +1320,7 @@ vowels (see §~3).
% \end{quote}
%
% \subparagraph{\arb[trans]{'alif-u 'l-wa.sl-i} preceded by a diphthong}
+% \label{sec:diphthong-alif}
% The diphthong is resolved into two simple vowels \parencite[i. 21
% D--22 A]{Wright} viz. \emph{ay}~→ \emph{\u{a}\u{i}} and \emph{aw}~→
% \emph{\u{a}\u{u}}. \package{arabluatex} detects the cases in which
@@ -1459,8 +1460,8 @@ vowels (see §~3).
%
% \subsection{Quoting}
% \label{sec:quoting}
-% It is here referred to \enquote{quoting} after the package
-% \package{arabtex}.\footnote{See \textcite[22]{pkg:arabtex}} The
+% It is here referred to \enquote{quoting} after the \package{arabtex}
+% package.\footnote{See \textcite[22]{pkg:arabtex}} The
% \enquote{quoting} mechanism of \package{arabluatex} is designed to
% be very similar in effect to the one of \package{arabtex}.
%
@@ -1656,6 +1657,75 @@ vowels (see §~3).
% \meta{n} prevents the necessary \arb[trans]{ta^sdId} rule
% (\cpageref{ref:necessary-tashdid}) from being applied.
%
+% \subsection{Putting back on broken contextual analysis rules}
+% \label{sec:arbnull}
+% \NEWfeature{v1.7} In complex documents such as critical editions
+% where footnotes and other kind of annotations can be particularly
+% abundant, the contextual analysis rules that are described above may
+% be broken by \LaTeX\ commands. To take an example, consider the
+% following:---%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}
+ This is wrong:
+ \begin{arab}[fullvoc]
+ fa-lammA ra'aW\LRfootnote{A footnote that interferes with the
+ contextual analysis.} 'l-na^gma...
+ \end{arab}
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi%
+% According to the rule stated \vpageref{sec:diphthong-alif}, the
+% diphthong in \arb[trans]{ra'aW} must be resolved into two simple
+% vowels before the \arb[trans]{'alif-u 'l-wa.sl-i}, as
+% \arb[fullvoc]{ra'aW 'l-na^gma}.
+%
+% \DescribeMacro{\arbnull} The \cs{arbnull} command is provided so as
+% to put back on contextual analysis rules in such situations. It
+% takes as argument the word that must be brought back for any given
+% rule to be applied as it ought to. Depending on the contexts that
+% have to be restored, \cs{arbnull} may be found just after or before
+% Arabic words.%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}[text only]
+In any case, \emph{no space must be left} after or before the Arabic
+word that \cs{arbnull} is applied to.
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi%
+% The following shows how the Arabic should have been written in the
+% preceding example and gives further illustrations of the same
+% technique:---%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}
+ \begin{arab}[fullvoc]
+ fa-lammA ra'aW\arbnull{'l-na^gma}\LRfootnote{A footnote that
+ interferes with the contextual analysis.} 'l-na^gma...
+
+ qAla\LRfootnote{A footnote that interferes with the contextual
+ analysis.} \arbnull{qAla}uhrub fa-lan tuqtala.
+
+ \cap{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes
+ with the contextual analysis.} \arbnull{zayduN}ibn-u
+ \cap{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.}
+ \end{arab}
+ \begin{arab}[trans]
+ \cap{z}ayduN\arbnull{ibnu}\LRfootnote{A footnote that interferes
+ with the contextual analysis.} \arbnull{zayduN}ibn-u
+ \cap{`a}mriNU.\LRfootnote{See \vref{fn:zayd-is-son}.}
+ \end{arab}
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi%
+%
% \subsection{\texorpdfstring{Stretching characters: the
% \arb[trans]{ta.twIl}}{Stretching characters: the taṭwīl}}
% \label{sec:tatwil}
@@ -1868,7 +1938,7 @@ vowels (see §~3).
% is designed to deal with the various situations that may arise:---
% \begin{compactenum}[(a)]
% \item If the two hemistichs be connected with one another by a
-% prominent horizontal flexible stroke, the \arb[trans]{tatwIl} should
+% prominent horizontal flexible stroke, the \arb[trans]{ta.twIl} should
% be used, like so: |[--]| (see \vref{sec:tatwil}). Of course, the
% ending word of the \arb[trans]{.sadr} and the word at the
% commencement of the \arb[trans]{`a^guz} must have the
@@ -1880,7 +1950,7 @@ vowels (see §~3).
\begin{arabluacode}
\begin{arabverse}[mode=fullvoc, width=.3\linewidth]
\bayt{lA 'ar_A man `ahidtu fI-hA fa-'abkI 'l---}[--]{---yawma
- dalhaN wa-mA yu.hIru 'l-bukA'u}\\
+ dalhaN wa-mA yaruddu 'l-bukA'u}\\
\end{arabverse}
\end{arabluacode}
% \iffalse
@@ -1902,7 +1972,7 @@ vowels (see §~3).
\begin{arabluacode}
\begin{arabverse}[mode=trans, width=.4\linewidth]
\bayt{lA 'ar_A man `ahidtu fI-hA fa-'abkI 'l---}[--]{---yawma
- dalhaN wa-mA yu.hIru 'l-bukA'u}\\
+ dalhaN wa-mA yaruddu 'l-bukA'u}\\
\end{arabverse}
\end{arabluacode}
% \iffalse
@@ -1942,11 +2012,12 @@ vowels (see §~3).
% \paragraph{Scaling and distortion of characters}
% The |arabverse| environment and the \cs{bayt} command are designed
% to typeset the verses in a two-column, fixed width layout. This may
-% result in somewhat distorted text. Should that happen, one may adapt
-% the layout by modifying the values of the above described |width|
-% and |gutter| named arguments until the visual aspect of the layout
-% be satisfactory. It has to be noted that distortion and warping may
-% be even more perceptible in Roman than in Arabic characters.
+% result in a somewhat distorted text. Should that happen, one may
+% adapt the layout by modifying the values of the above described
+% |width| and |gutter| named arguments until the visual aspect of the
+% layout be satisfactory. It has to be noted that distortion and
+% warping may be even more perceptible in Roman than in Arabic
+% characters.
%
% \paragraph{Footnotes}
% Footnotes are not set by default inside the \cs{bayt} command, but
@@ -1954,8 +2025,8 @@ vowels (see §~3).
%
% If they are little in number, each footnote may be split into pairs
% of \cs{footnote\allowbreak{}mark}|{}| (please mind the braces) in
-% either argument of the \cs{bayt} command and \cs{footnotetext}
-% outside the \cs{bayt} command.
+% 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{footnote} package which \package{arabluatex} will then use
@@ -1976,8 +2047,10 @@ vowels (see §~3).
% 'l-\cap{q}aysi}'s \arb[trans]{\cap{m}u`allaqaT}. In this example,
% \cs{SetArbDflt*} has been selected so as to mark the
% \arb[trans]{'id.gAm} that is fit to this declamatory
-% poetry:---\footnote{See \vref{sec:classic-modern-typesetting} for
-% more information.}%
+% poetry:---\footnote{Please note that for the time being only the
+% assimilation rules that are laid on \vref{ref:assimilation} are
+% applied. See \vref{sec:classic-modern-typesetting} for more
+% information.}%
% \iffalse
%<*example>
% \fi
@@ -1990,17 +2063,17 @@ vowels (see §~3).
'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}]
\SetArbDflt*
\begin{linenumbers*}
- \bayt{qifA nabki min _dikr_A .habibiN wa-manzili}{bi-saq.ti
- 'l-liw_A bayna \cap{'l-d}a_hUli wa-\cap{.h}awmali}\\
- \bayt{fa-\cap{t}Udi.ha fa-'l-\cap{m}iqrATi lam ya`fu
+ \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
+ 'l-liw_A bayna \cap{'l-d}a_hUli fa-\cap{.h}awmali}\\
+ \bayt{fa-\cap{t}U.di.ha fa-'l-\cap{m}iqrATi lam ya`fu
rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
\bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
ka-'anna-hu .habbu fulfuli}\\
- \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{laday
+ \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
samurAti 'l-.hayyi nAqifu .han.zali}\\
\bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
tahlik 'asaN_A wa-ta^gammali}\\
- \bayt{wa-'inna ^sifA'I `abraTuN muhrAqaTuN}{fa-hal `inda rasmiN
+ \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
dAsiriN min mu`awwali}\\
\end{linenumbers*}
\end{arabverse}
@@ -2016,18 +2089,18 @@ vowels (see §~3).
% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.25\linewidth]
% \SetArbDflt*
% \begin{linenumbers*}
-% \bayt{qifA nabki min _dikr_A .habibiN wa-manzili}{bi-saq.ti
-% 'l-liw_A bayna \cap{'l-d}a_hUli wa-\cap{.h}awmali}\\
-% \bayt{fa-\cap{t}Udi.ha fa-'l-\cap{m}iqrATi lam ya`fu
+% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
+% 'l-liw_A bayna \cap{'l-d}a_hUli fa-\cap{.h}awmali}\\
+% \bayt{fa-\cap{t}U.di.ha fa-'l-\cap{m}iqrATi lam ya`fu
% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
% \bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
% ka-'anna-hu .habbu fulfuli}\\
-% \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{laday
+% \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
% samurAti
% 'l-.hayyi nAqifu .han.zali}\\
% \bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
% tahlik 'asaN_A wa-ta^gammali}\\
-% \bayt{wa-'inna ^sifA'I `abraTuN muhrAqaTuN}{fa-hal `inda rasmiN
+% \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
% dAsiriN min mu`awwali}\\
% \end{linenumbers*}
% \end{arabverse}
@@ -2040,18 +2113,18 @@ vowels (see §~3).
% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.4\linewidth]
% \SetArbDflt*
% \begin{linenumbers*}
-% \bayt{qifA nabki min _dikr_A .habibiN wa-manzili}{bi-saq.ti
-% 'l-liw_A bayna \cap{'l-d}a_hUli wa-\cap{.h}awmali}\\
-% \bayt{fa-\cap{t}Udi.ha fa-'l-\cap{m}iqrATi lam ya`fu
+% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti
+% 'l-liw_A bayna \cap{'l-d}a_hUli fa-\cap{.h}awmali}\\
+% \bayt{fa-\cap{t}U.di.ha fa-'l-\cap{m}iqrATi lam ya`fu
% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
% \bayt{tar_A ba`ara 'l-'ar'Ami fI `ara.sAti-hA}{wa-qI`Ani-hA
% ka-'anna-hu .habbu fulfuli}\\
-% \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{laday
+% \bayt{ka-'annI .gadATa 'l-bayni yawma ta.hammalUA}{lad_A
% samurAti
% 'l-.hayyi nAqifu .han.zali}\\
% \bayt{wuqUfaN bi-hA .sa.hbI `alayya ma.tiyya-hum}{yaqUlUna lA
% tahlik 'asaN_A wa-ta^gammali}\\
-% \bayt{wa-'inna ^sifA'I `abraTuN muhrAqaTuN}{fa-hal `inda rasmiN
+% \bayt{wa-'inna ^sifA'I `abraTuN muharAqaTuN}{fa-hal `inda rasmiN
% dAsiriN min mu`awwali}\\
% \end{linenumbers*}
% \end{arabverse}
@@ -2513,7 +2586,7 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu
% is primarily designed to process the Arab\TeX\ notation, it also
% accepts unicode Arabic input. It should be noted that
% \package{arabluatex} does in no way interfere with unicode Arabic
-% input: none of the options |voc|, |fullvoc|, |novoc| or |trans| will
+% input: none of the |voc|, |fullvoc|, |novoc| or |trans| options will
% have any effect on plain unicode Arabic for the time being.
%
% That said, there are two ways of inserting unicode
@@ -2636,11 +2709,10 @@ part of the predicate\ldots} "ibn-u \cap{`a}mr-iNU}
% \DescribeMacro{\FixArbFtnmk} Another solution is to put in the
% preamble, below the line that loads \package{arabluatex}, the
% \cs{FixArbFtnmk} command. However, for more control over the layout
-% of footnotes marks, it is advisable to use the package
-% \package{scrextend}.\footnote{See
-% \url{http://ctan.org/pkg/koma-script}; read the documentation of
-% \package{KOMA-script} for details about the \cs{deffootnotemark} and
-% \cs{deffootnote} commands.}
+% of footnotes marks, it is advisable to use the \package{scrextend}
+% package.\footnote{See \url{http://ctan.org/pkg/koma-script}; read
+% 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
@@ -2778,8 +2850,8 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
% viz. |acadian|, |canadien|, |francais|, |frenchb| or |french| all
% redefine the list environments, which breaks the standard definition
% file that is used by \package{arabluatex}. Therefore,
-% \package{babel-french} must be loaded with the option
-% |StandardLayout=true|, like so:---
+% \package{babel-french} must be loaded with the |StandardLayout=true|
+% option, like so:---%
% \iffalse
%<*example>
% \fi
@@ -2872,7 +2944,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \vref{sec:unicode-input} for more details). Please note that
% \package{arabluatex} takes care of formatting the Arabic: therefore,
% it is recommended to load the \package{quran} package with the
-% option |nopar|, after \package{arabluatex} itself has been loaded,
+% |nopar| option, after \package{arabluatex} itself has been loaded,
% like so:--- %
% \iffalse
%<*example>
@@ -2937,7 +3009,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arabluatex}%
-[2016/12/17 v1.6 An ArabTeX-like interface for LuaLaTeX]
+[2016/12/24 v1.7 An ArabTeX-like interface for LuaLaTeX]
\RequirePackage{ifluatex}
% \end{macrocode}
% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning
@@ -3322,7 +3394,6 @@ wa-ya.sIru ta.hta 'l-jild-i
\ifdefined\spewnotes\spewnotes\else\fi%
}
% \end{macrocode}
-%
% \end{macro}
% \end{environment}
% \begin{macro}{\abjad} \cs{abjad}\marg{number} expresses its argument
@@ -3343,6 +3414,16 @@ wa-ya.sIru ta.hta 'l-jild-i
\fi}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\arbnull}
+% \changes{v1.7}{2016/12/24}{New \cs{arbnull} command for putting
+% back on any contextual analysis rule broken by other commands.}
+% The \cs{arbnull} command does nothing by itself. It is processed
+% only if it is found in Arabic context so as to put back on
+% contextual analysis in case it has been broken by other commands.
+% \begin{macrocode}
+\NewDocumentCommand{\arbnull}{m}{\relax}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\abraces}
% \cs{abraces}\marg{Arabic text} puts its argument between
% braces. This macro is written in Lua and is dependent on the