summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-01 22:26:39 +0000
committerKarl Berry <karl@freefriends.org>2018-04-01 22:26:39 +0000
commit7d7e6b60a7a00f27ba7119097bc7484ef28fb826 (patch)
tree55966fc9c0731be9f801f410a655f575594fe2da /Master/texmf-dist/source/lualatex
parentac8d62d1767ddaee38fb7d8d0afc5ae70233f806 (diff)
arabluatex (2apr18)
git-svn-id: svn://tug.org/texlive/trunk@47226 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/lualatex')
-rw-r--r--Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx186
1 files changed, 152 insertions, 34 deletions
diff --git a/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx b/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
index b97ce4ed023..4b88bf9cd8e 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>
- [2018/02/12 v1.10.3 An ArabTeX-like interface for LuaLaTeX]
+ [2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX]
%</package-info>
%
%<*driver>
@@ -155,7 +155,7 @@
\defaultfontfeatures{RawFeature={+liga}}
\setmainfont{Old Standard}[SmallCapsFont={Latin Modern Roman Caps},
RawFeature={+mark;+ccmp;+ss05;+ss06}]
-\usepackage{arabluatex}[2018/02/12]
+\usepackage{arabluatex}[2018/03/31]
\usepackage[nopar]{quran}
\usepackage[noindex]{nameauth}
\usepackage{varioref}
@@ -229,7 +229,7 @@
%</driver>
% \fi
%
-% \CheckSum{715}
+% \CheckSum{728}
%
% \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
@@ -1295,7 +1295,7 @@ vowels (see §~3).
% \arb[voc]{mi'Una} \arb[trans]{mi'Una}, |mi'AtuN|
% \arb[voc]{mi'AtuN} \arb[trans]{mi'AtuN}, |mi'aN_A|
% \arb[voc]{mi'aN_A} \arb[trans]{mi'aN_A}. Of course, the
-% \enquote*{pipe} character may be used to prevent this rule from
+% \enquote*{pipe} character can be used to prevent this rule from
% being applied (see \vref{sec:pipe}): \verb+mi'a|TuN+
% \arb[voc]{mi'a|TuN} \arb[trans]{mi'a|TuN}.
% \end{quote}
@@ -1787,7 +1787,7 @@ vowels (see §~3).
% \end{compactenum}
%
% \paragraph{\texttt{fullvoc}}
-% In this mode, \enquote{quoting} may be used to take away any short
+% In this mode, \enquote{quoting} can be used to take away any short
% vowel (or \arb[trans]{tanwIn}, as seen above) or any
% \arb[trans]{sukUn}:---
% \begin{quote}\label{ref:qrannun-full}
@@ -1949,7 +1949,7 @@ word that \cs{arbnull} is applied to.
% \label{sec:tatwil}
% 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,
+% automatic stretching, this technique can be used to a modest extent,
% especially to increase legibility of letters and diacritics which
% stand one above the other:--
% \begin{quote}
@@ -2141,7 +2141,7 @@ word that \cs{arbnull} is applied to.
% \DescribeOption{utf} |utf|$=$|true|\verb+|+|false|
% \hfill\arabluaverb{Default: false}\\ As the preceding one, this
% named argument does not need a value as it defaults to |true| if it
-% is used. If so, unicode Arabic input is expected in the |arabverse|
+% is used. If so, Unicode Arabic input is expected in the |arabverse|
% environment instead of \textsc{ascii} Arab\TeX\ or Buckwalter input
% schemes. See \vref{sec:unicode-input} for more details.
%
@@ -2263,12 +2263,12 @@ word that \cs{arbnull} is applied to.
% \package{footnotehyper} package which \package{arabluatex} will then
% use to typeset any kind of footnote that is called from the
% arguments of the \cs{bayt} command.\footnote{The \package{footnote}
-% package may also be used for the same effect. However, it must be
+% package can also be used for the same effect. However, it must be
% loaded \emph{after} \package{arabluatex}.}
%
% \paragraph{Line numbering}
% Inside the |arabverse| environment, the |linenumbers| environment of
-% the \package{lineno} package may be used to have the lines of
+% the \package{lineno} package can be used to have the lines of
% succeeding verses numbered. Please refer to the documentation of
% this package for more information or to the example below for a
% basic implementation of this technique.
@@ -2411,6 +2411,100 @@ word that \cs{arbnull} is applied to.
%</example>
% \fi
%
+% \paragraph{Additional 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
+% \arb[trans]{\uc{qur'An}} or in classical poetry.
+%
+% \DescribeMacro{\arbmark}
+% \NEWfeature{v1.11}\cs{arbmark}\marg{shorthand} can be used to insert
+% such characters either in Unicode or in romanized Arabic
+% environments. It takes as argument a shorthand defined beforehand in
+% a default list which consists of the following
+% at the time of writing:---\\
+% \begin{longtable}{llp{.3\linewidth}p{.3\linewidth}}
+% \captionlistentry{Additional Arabic marks}\\[-1em]
+% \toprule
+% Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
+% \endfirsthead
+% \toprule
+% Codepoint & Shorthand & Glyph & Transliteration \\ \midrule
+% \endhead\label{tab:arabtex-additional-marks}%
+% |FDFD| & |bismillah| & \arb{\arbmark{bismillah}} &
+% \arbmark{bismillah} \\
+% |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}}.
+%
+% As regards the right-to-left codepoint, it may be either typed in
+% Unicode or selected as Unicode codepoint. To that end, the \LaTeX\
+% command \arabluaverb{\symbol{"XYZT}} or its plain \TeX\ variant
+% \arabluaverb{\char"XYZT\relax} may be used, where |XYZT| are
+% uppercase hex digits (|0| to |9| or |A| to |F|).
+%
+% It is also possible to use the so-called `|^^^^| notation' like so:
+% \arabluaverb{^^^^xyzt}, where |xyzt| are lowercase hex digits (|0|
+% to |9| or |a| to |f|).
+%
+% As regards the third argument (left-to-right rendition), it may be
+% either left empty or typed by means of
+% \cs{arb}|[trans]|\marg{arabtex code} so as to have it printed in
+% romanized Arabic.%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}[text only]
+ It must be noted that \cs{newarbmark} expects Arab\TeX\ input scheme
+ inside \cs{arb}|[trans]{}| to the exclusion of \textsf{buckwalter}
+ input scheme.
+\end{arabluacode}
+% \iffalse
+%</example>
+% \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
+% printed in red:---%
+% \iffalse
+%<*example>
+% \fi
+\begin{arabluacode}
+ \SetArbDflt*
+ \newarbmark{sly}{\textcolor{red}{^^^^06d6}}{}
+ \newarbmark{jim}{\textcolor{red}{^^^^06da}}{}
+ \begin{arab}
+ sUraTu 'l-nisA'i, 19:
+ \end{arab}
+ \begin{center}
+ \begin{arab}
+ \arbmark{bismillah}
+ \end{arab}
+ \end{center}
+ \begin{arab}[fullvoc]
+ y_a'ayyuhA 'lla_dIna 'a'manUA lA ya.hillu la-kum 'an tari_tUA
+ 'l-nisA'a karhaN\arbmark{sly} wa-lA ta`.dulU-hunna li-ta_dhabUA
+ bi-ba`.di mA 'a'taytumU-hunna 'illA 'an ya'tIna bi-fA.hi^saTiN
+ mubayyinaTiN\arbmark{jim} wa-`A^sirU-hunna
+ bi-'l-ma`rUfi\arbmark{jim} fa-'in karihtumU-hunna fa-`as_A_a
+ 'an takrahUA ^say'aN wa-ya^g`ala 'l-l_ahu fI-hi _hayraN
+ ka_tIraN ((19))
+ \end{arab}
+\end{arabluacode}
+% \iffalse
+%</example>
+% \fi
+%
% \section{Transliteration}
% \label{sec:transliteration}
% It may be more appropriate to speak of \enquote{romanization} than
@@ -2475,7 +2569,7 @@ word that \cs{arbnull} is applied to.
% 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:---
+% Plus} font can be used for rendering transliterated text:---
% \iffalse
%<*example>
% \fi
@@ -2618,7 +2712,7 @@ Then as \Hunayn, \Razi.
% any point of the document.
%
% \DescribeMacro{\SetArbUp} Finally, \cs{SetArbUp}\marg{formatting
-% directives} may be used to customize the way \arb[trans]{'i`rAb} is
+% directives} can be used to customize the way \arb[trans]{'i`rAb} is
% displayed. To take one example, here is how Arabic
% \arb[trans]{'i`rAb} may be rendered as subscript text:---
% \iffalse
@@ -2936,16 +3030,16 @@ muhaddamaTaN mi'_danatu-hu}: \arb[trans]{ra'aytu
% \NEWfeature{v1.5} As said above in \vref{sec:buckwalter-scheme}
% about the Buckwalter input scheme, even though \package{arabluatex}
% 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
+% accepts Unicode Arabic input. It should be noted that
+% \package{arabluatex} does in no way interfere with Unicode Arabic
% input: none of the |voc|, |fullvoc|, |novoc| or |trans| options will
-% have any effect on plain unicode Arabic for the time being.
+% have any effect on plain Unicode Arabic for the time being.
%
-% That said, there are two ways of inserting unicode
+% That said, there are two ways of inserting Unicode
% Arabic:
% \begin{compactenum}[(a)]
-% \item \DescribeMacro{\txarb} The \cs{txarb}\marg{unicode Arabic}
-% command for inserting unicode Arabic text in paragraphs;
+% \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
% running paragraphs of Arabic text, like so:---\\%
% \iffalse
@@ -3019,7 +3113,7 @@ al-muqAtil-Ina.}, wa-kAnat 'ummI min `u.zamA'-i buyUt-i
% left-to-right and right-to-left footnotes respectively in Arabic
% environments. Unlike \cs{footnote}\marg{text}, the arguments of both
% \cs{LRfootnote} and \cs{RLfootnote} are not expected to be Arabic
-% text. For example, \cs{LRfootnote} may be used to insert English
+% text. For example, \cs{LRfootnote} can be used to insert English
% footnotes in running Arabic text:---
% \iffalse
%<*example>
@@ -3058,7 +3152,7 @@ part of the predicate\ldots} "ibn-u \uc{`a}mr-iNU}
% general principle laid \vpageref{ref:cmd-inside-arabic} applies.
%
% \DescribeMacro{\setRL} \DescribeMacro{\setLR} \cs{setRL} and
-% \cs{setLR} may be used to change the direction of paragraphs, either
+% \cs{setLR} can be used to change the direction of paragraphs, either
% form left to right or from right to left. As an example, an
% easy way to typeset a right-to-left sectional title follows:---
% \iffalse
@@ -3093,7 +3187,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
% command |\fvarabic| itself can see it.
%
% \DescribeMacro{\MkArbBreak} The \cs{MkArbBreak}\marg{csv list of
-% commands} command may be used in the preamble to give any
+% 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
@@ -3181,7 +3275,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
% \package{paralist}.
%
% To take a first example, should one wish to typeset a list of
-% manuscripts, the |description| environment may be used like so:---
+% manuscripts, the |description| environment can be used like so:---
% \iffalse
%<*example>
% \fi
@@ -3245,7 +3339,7 @@ qAla barzawayhi bn-u 'azhar-a, ra's-u 'a.tibbA'-i fAris-a...
% \fi%
% This option will prevent \package{babel-french} from interfering
% with the layout of the document. Then the package \package{paralist}
-% may be used to make the lists \enquote*{compact} as
+% can be used to make the lists \enquote*{compact} as
% \package{babel-french} do.
%
% \subsection{\package{csquotes}}
@@ -3349,7 +3443,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% package} \package{arabluatex} is compatible with the \package{quran}
% package so that both can be used in conjunction with one another for
% typesetting the \arb[trans]{\uc{qur'An}}. As \package{quran} draws
-% the text of the \arb[trans]{\uc{qur'An}} from a unicode encoded
+% the text of the \arb[trans]{\uc{qur'An}} from a Unicode encoded
% database, its commands have to be passed as arguments to the
% \cs{txarb} command for short insertions in left-to-right paragraphs,
% or inserted inside the \index{txarab=txarab (environment)}|txarab|
@@ -3423,7 +3517,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arabluatex}%
-[2018/02/12 v1.10.3 An ArabTeX-like interface for LuaLaTeX]
+[2018/03/31 v1.11 An ArabTeX-like interface for LuaLaTeX]
\RequirePackage{ifluatex}
% \end{macrocode}
% \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning
@@ -3517,7 +3611,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \begin{macro}{\MkArbBreak}
% \changes{v1.9}{2017/07/05}{New \cs{MkArbBreak} command for inserting
% user-defined macros in Arabic environments}
-% The \cs{MkArbBreak}\marg{csv list of commands} command may be used
+% 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.
@@ -3546,7 +3640,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \end{macro}
% \end{macro}
% \begin{macro}{\SetInputScheme}
-% \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} may be used to
+% \changes{v1.4}{2016/07/05}{\cs{SetInputScheme} can 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
@@ -3616,7 +3710,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% \end{macrocode}
% \end{macro}
% \begin{macro}{\SetTranslitConvention}
-% \cs{SetTranslitConvention}\marg{convention} may be used to change
+% \cs{SetTranslitConvention}\marg{convention} can be used to change
% the transliteration convention, which is |dmg| by default:
% \begin{macrocode}
\def\al@trans@convention{dmg}
@@ -3635,7 +3729,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% either in the preamble or at any point of the document in case one
% wishes to have the \arb[trans]{tanwIn} on the line. The default
% rule can be set back with \cs{ArbUpDflt} at any point of the
-% document. Finally \cs{SetArbUp} may be used to customize the way
+% document. Finally \cs{SetArbUp} can be used to customize the way
% \arb[trans]{tanwIn} is displayed: this command takes the
% formatting directives as argument, like so:
% \cs{SetArbUp}\marg{code}.
@@ -3659,7 +3753,7 @@ wa-ya.sIru ta.hta 'l-jild-i
{\luadirect{tex.sprint(uc(\luastringN{#1}))}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\Uc} \cs{uc} may be used safely in all of the modes
+% \begin{macro}{\Uc} \cs{uc} can be used safely in all of the modes
% that are provided by \package{arabluatex} as any of the |voc|,
% |fullvoc| and |novoc| modes discard it on top of any other
% functions to be run. \cs{Uc} does the same as \cs{uc} except
@@ -3692,16 +3786,16 @@ wa-ya.sIru ta.hta 'l-jild-i
% Lua functions to insert transliterated Arabic text. Therefore, it is
% not documented.
% \begin{macrocode}
-\DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir
+\NewDocumentCommand{\txarb}{+m}{\bgroup\textdir
TRT\arabicfont#1\egroup}
-\DeclareDocumentCommand{\txtrans}{+m}{\bgroup\textdir
+\NewDocumentCommand{\txtrans}{+m}{\bgroup\textdir
TLT\al@trans@font#1\egroup}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{environment}{txarab}
% \changes{v1.5}{2016/11/14}{New \texttt{txarab} environment for
-% typesetting running paragraphs in unicode Arabic} The |txarab|
+% typesetting running paragraphs in Unicode Arabic} The |txarab|
% environment does for paragraphs the same as \cs{txarb} does for
% short insertions of |utf8| Arabic text.
% \begin{macrocode}
@@ -3716,7 +3810,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% either globally if no option is set, or locally, then passes its
% argument to the appropriate Lua function.
% \begin{macrocode}
-\DeclareDocumentCommand{\arb}{O{\al@mode} +m}%
+\NewDocumentCommand{\arb}{O{\al@mode} +m}%
{\edef\@tempa{#1}%
\ifx\@tempa\al@mode@voc%
\bgroup\textdir TRT\arabicfont%
@@ -3743,6 +3837,30 @@ wa-ya.sIru ta.hta 'l-jild-i
\fi\fi\fi\fi}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\arbmark}
+% \changes{v1.11}{2018/03/31}{New command for inserting additional
+% marks in Arabic environments} \cs{arbmark} takes one argument from a
+% list of defined elements. This command is coded in Lua.
+% \begin{macrocode}
+\NewDocumentCommand{\arbmark}{m}{%
+ \bgroup%
+ \SetInputScheme{arabtex}%
+ \luadirect{tex.sprint(processarbmarks(\luastringN{#1}))}%
+ \egroup}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\newarbmark}
+% \changes{v1.11}{2018/03/31}{Allows defining additional sets of Arabic
+% marks} \cs{newarbmark} lets the user define additional Arabic
+% marks. As \cs{arbmark}, this command is coded in Lua. It takes
+% three arguments: the abbreviated form to be used as argument of
+% \cs{arbmark}, the rendition in Arabic script and the rendition in
+% romanized Arabic.
+% \begin{macrocode}
+\NewDocumentCommand{\newarbmark}{m m m}{%
+ \luadirect{newarbmark(\luastringN{#1}, \luastringN{#2}, \luastringN{#3})}}
+% \end{macrocode}
+% \end{macro}
% \begin{environment}{arab}
% The |arab| environment does for paragraphs the same as \cs{arb} does
% for short insertions of Arabic text.
@@ -3821,7 +3939,7 @@ wa-ya.sIru ta.hta 'l-jild-i
% changing the default delimiter between hemistichs} A hemistich
% delimiter also may be defined. By default, it is set to the
% \enquote*{star} character: |*|. The
-% \cs{SetHemistichDelim}\marg{delimiter} command may be used at any
+% \cs{SetHemistichDelim}\marg{delimiter} command can be used at any
% point of the document to change this default setting.
% \end{macro}
% \begin{macrocode}