aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2022-06-15 10:50:00 +0200
committerRobert Alessi <alessi@robertalessi.net>2022-06-15 10:50:00 +0200
commit8c4cfb2b61dde8b30b33bbc4dba5a3267edd36b5 (patch)
tree6023ad0e670713d8a47f07cd42804f4ddf506b7a
parent5a355afa958761229d6dbce5eae7dacbcf6c2e63 (diff)
downloadarabluatex-8c4cfb2b61dde8b30b33bbc4dba5a3267edd36b5.tar.gz
added distinction between dmg|dmg+ and \SetArbNumbers (either Indian [default] or Arabic). updated copyright dates.
-rw-r--r--README.md5
-rw-r--r--README.tex4
-rw-r--r--about.html47
-rw-r--r--arabluatex.dtx221
-rw-r--r--arabluatex.el3
-rw-r--r--arabluatex.ins4
-rw-r--r--arabluatex.lua43
-rw-r--r--arabluatex_fullvoc.lua2
-rw-r--r--arabluatex_novoc.lua2
-rw-r--r--arabluatex_trans.lua87
-rw-r--r--arabluatex_voc.lua2
-rw-r--r--makefile19
12 files changed, 311 insertions, 128 deletions
diff --git a/README.md b/README.md
index e110efd..e1ccf14 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,6 @@ author:
4title: 'The arabluatex package -- README file' 4title: 'The arabluatex package -- README file'
5--- 5---
6 6
7\maketitle
8Overview 7Overview
9======== 8========
10 9
@@ -26,7 +25,7 @@ License and disclamer
26 25
27ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 26ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
28 27
29Copyright ⓒ 2016--2020 Robert Alessi 28Copyright ⓒ 2016--2022 Robert Alessi
30 29
31Please send error reports and suggestions for improvements to Robert 30Please send error reports and suggestions for improvements to Robert
32Alessi: 31Alessi:
@@ -70,7 +69,7 @@ This release of arabluatex consists of the following source files:
70License applicable to the documentation 69License applicable to the documentation
71--------------------------------------- 70---------------------------------------
72 71
73Copyright ⓒ 2016--2020 Robert Alessi 72Copyright ⓒ 2016--2022 Robert Alessi
74 73
75Permission is granted to copy, distribute and/or modify this document 74Permission is granted to copy, distribute and/or modify this document
76under the terms of the GNU Free Documentation License, Version 1.3 or 75under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/README.tex b/README.tex
index 3bec1cb..37ec7c4 100644
--- a/README.tex
+++ b/README.tex
@@ -33,7 +33,7 @@ searched, analyzed and correlated in various ways.
33\section*{License and disclamer} 33\section*{License and disclamer}
34ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 34ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
35 35
36Copyright ⓒ 2016--2020 Robert Alessi 36Copyright ⓒ 2016--2022 Robert Alessi
37 37
38Please send error reports and suggestions for improvements to Robert 38Please send error reports and suggestions for improvements to Robert
39Alessi: 39Alessi:
@@ -72,7 +72,7 @@ source files:
72 72
73\subsection*{License applicable to the documentation} 73\subsection*{License applicable to the documentation}
74\label{sec:documentation-license} 74\label{sec:documentation-license}
75Copyright ⓒ 2016--2020 Robert Alessi 75Copyright ⓒ 2016--2022 Robert Alessi
76 76
77Permission is granted to copy, distribute and/or modify this document 77Permission is granted to copy, distribute and/or modify this document
78under the terms of the GNU Free Documentation License, Version 1.3 or 78under the terms of the GNU Free Documentation License, Version 1.3 or
diff --git a/about.html b/about.html
index a718fa2..af0eb19 100644
--- a/about.html
+++ b/about.html
@@ -6,29 +6,30 @@
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <meta name="author" content="Robert Alessi" /> 7 <meta name="author" content="Robert Alessi" />
8 <title>The arabluatex package – README file</title> 8 <title>The arabluatex package – README file</title>
9 <style type="text/css"> 9 <style>
10 code{white-space: pre-wrap;} 10 code{white-space: pre-wrap;}
11 span.smallcaps{font-variant: small-caps;} 11 span.smallcaps{font-variant: small-caps;}
12 span.underline{text-decoration: underline;} 12 span.underline{text-decoration: underline;}
13 div.column{display: inline-block; vertical-align: top; width: 50%;} 13 div.column{display: inline-block; vertical-align: top; width: 50%;}
14 div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
15 ul.task-list{list-style: none;}
14 </style> 16 </style>
15</head> 17</head>
16<body> 18<body>
17<header> 19<header id="title-block-header">
18<h1 class="title">The arabluatex package – README file</h1> 20<h1 class="title">The arabluatex package – README file</h1>
19<p class="author">Robert Alessi</p> 21<p class="author">Robert Alessi</p>
20</header> 22</header>
21 23<h1 class="unnumbered" id="sec:overview">Overview</h1>
22<h1 id="sec:overview" class="unnumbered unnumbered">Overview</h1>
23<p>This package provides for <a href="http://luatex.org">LuaLaTeX</a> an <a href="http://ctan.org/pkg/arabtex">ArabTeX</a>-like interface to generate Arabic writing from an <span class="smallcaps">ascii</span> transliteration. It is particularly well-suited for complex documents such as technical documents or critical editions where a lot of left-to-right commands intertwine with Arabic writing. arabluatex is able to process any ArabTeX input notation. Its output can be set in the same modes of vocalization as ArabTeX, or in different roman transliterations. It further allows many typographical refinements. It will eventually interact with some other packages yet to come to produce from <code>.tex</code> source files, in addition to printed books, <code>TEI xml</code> compliant critical editions and/or lexicons that can be searched, analyzed and correlated in various ways.</p> 24<p>This package provides for <a href="http://luatex.org">LuaLaTeX</a> an <a href="http://ctan.org/pkg/arabtex">ArabTeX</a>-like interface to generate Arabic writing from an <span class="smallcaps">ascii</span> transliteration. It is particularly well-suited for complex documents such as technical documents or critical editions where a lot of left-to-right commands intertwine with Arabic writing. arabluatex is able to process any ArabTeX input notation. Its output can be set in the same modes of vocalization as ArabTeX, or in different roman transliterations. It further allows many typographical refinements. It will eventually interact with some other packages yet to come to produce from <code>.tex</code> source files, in addition to printed books, <code>TEI xml</code> compliant critical editions and/or lexicons that can be searched, analyzed and correlated in various ways.</p>
24<h1 id="license-and-disclamer" class="unnumbered unnumbered">License and disclamer</h1> 25<h1 class="unnumbered" id="license-and-disclamer">License and disclamer</h1>
25<p>ArabLuaTeX – Processing ArabTeX notation under LuaLaTeX</p> 26<p>ArabLuaTeX – Processing ArabTeX notation under LuaLaTeX</p>
26<p>Copyright ⓒ 2016–2020 Robert Alessi</p> 27<p>Copyright ⓒ 2016–2022 Robert Alessi</p>
27<p>Please send error reports and suggestions for improvements to Robert Alessi:</p> 28<p>Please send error reports and suggestions for improvements to Robert Alessi:</p>
28<ul> 29<ul>
29<li><p>email: <a href="mailto:alessi@robertalessi.net">alessi@robertalessi.net</a></p></li> 30<li><p>email: <a href="mailto:alessi@robertalessi.net">alessi@robertalessi.net</a></p></li>
30<li><p>website: <a href="http://www.robertalessi.net/arabluatex" class="uri">http://www.robertalessi.net/arabluatex</a></p></li> 31<li><p>website: <a href="http://www.robertalessi.net/arabluatex">http://www.robertalessi.net/arabluatex</a></p></li>
31<li><p>comments, feature requests, bug reports: <a href="https://gitlab.com/ralessi/arabluatex/issues" class="uri">https://gitlab.com/ralessi/arabluatex/issues</a></p></li> 32<li><p>comments, feature requests, bug reports: <a href="https://gitlab.com/ralessi/arabluatex/issues">https://gitlab.com/ralessi/arabluatex/issues</a></p></li>
32</ul> 33</ul>
33<p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p> 34<p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
34<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p> 35<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
@@ -43,13 +44,13 @@
43<li><p><code>arabluatex_novoc.lua</code></p></li> 44<li><p><code>arabluatex_novoc.lua</code></p></li>
44<li><p><code>arabluatex_trans.lua</code></p></li> 45<li><p><code>arabluatex_trans.lua</code></p></li>
45</ul> 46</ul>
46<h2 id="sec:documentation-license" class="unnumbered unnumbered">License applicable to the documentation</h2> 47<h2 class="unnumbered" id="sec:documentation-license">License applicable to the documentation</h2>
47<p>Copyright ⓒ 2016–2020 Robert Alessi</p> 48<p>Copyright ⓒ 2016–2022 Robert Alessi</p>
48<p>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License” of the documentation.</p> 49<p>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License” of the documentation.</p>
49<h1 id="sec:installation" class="unnumbered unnumbered">Installation</h1> 50<h1 class="unnumbered" id="sec:installation">Installation</h1>
50<ol> 51<ol>
51<li><p>Run <code>'lualatex arabluatex.ins'</code> to produce the <code>arabluatex.sty</code> file;</p></li> 52<li><p>Run <code>'lualatex arabluatex.ins'</code> to produce the <code>arabluatex.sty</code> file;</p></li>
52<li><p>To finish the installation you have to move the following files into a directory where LaTeX can find them. See the FAQ on <code>texfaq.org</code> at <a href="https://texfaq.org/FAQ-inst-wlcf" class="uri">https://texfaq.org/FAQ-inst-wlcf</a> for more on this:</p> 53<li><p>To finish the installation you have to move the following files into a directory where LaTeX can find them. See the FAQ on <code>texfaq.org</code> at <a href="https://texfaq.org/FAQ-inst-wlcf">https://texfaq.org/FAQ-inst-wlcf</a> for more on this:</p>
53<ul> 54<ul>
54<li><p><code>arabluatex.sty</code></p></li> 55<li><p><code>arabluatex.sty</code></p></li>
55<li><p><code>arabluatex-patch.sty</code></p></li> 56<li><p><code>arabluatex-patch.sty</code></p></li>
@@ -62,17 +63,17 @@
62<li><p>Additionally, those who use emacs with AUCTeX may copy <code>arabluatex.el</code> to their <code>~/.emacs.d/auctex/auto</code> local directory. This will enable the appropriate hooks for ArabLuaTeX in AUCTeX.</p></li> 63<li><p>Additionally, those who use emacs with AUCTeX may copy <code>arabluatex.el</code> to their <code>~/.emacs.d/auctex/auto</code> local directory. This will enable the appropriate hooks for ArabLuaTeX in AUCTeX.</p></li>
63</ol> 64</ol>
64<h1 id="sec:devel-git-repos">Development, Git Repository</h1> 65<h1 id="sec:devel-git-repos">Development, Git Repository</h1>
65<h2 id="sec:browse-code" class="unnumbered unnumbered">Browse the code</h2> 66<h2 class="unnumbered" id="sec:browse-code">Browse the code</h2>
66<p>You can browse ArabLuaTeX repository on the web: <a href="http://git.robertalessi.net/arabluatex" class="uri">http://git.robertalessi.net/arabluatex</a></p> 67<p>You can browse ArabLuaTeX repository on the web: <a href="http://git.robertalessi.net/arabluatex">http://git.robertalessi.net/arabluatex</a></p>
67<p>From this page, you can download all the releases of ArabLuaTeX. For instructions on how to install ArabLuaTeX, please see above.</p> 68<p>From this page, you can download all the releases of ArabLuaTeX. For instructions on how to install ArabLuaTeX, please see above.</p>
68<h2 id="sec:comm-feat-requ" class="unnumbered unnumbered">Comments, Feature requests, Bug Reports</h2> 69<h2 class="unnumbered" id="sec:comm-feat-requ">Comments, Feature requests, Bug Reports</h2>
69<p><a href="https://gitlab.com/ralessi/arabluatex/issues" class="uri">https://gitlab.com/ralessi/arabluatex/issues</a></p> 70<p><a href="https://gitlab.com/ralessi/arabluatex/issues">https://gitlab.com/ralessi/arabluatex/issues</a></p>
70<h2 id="sec:download-repository" class="unnumbered unnumbered">Download the repository</h2> 71<h2 class="unnumbered" id="sec:download-repository">Download the repository</h2>
71<p>ArabLuaTeX development is facilitated by git, a distributed version control system. You will need to install git (most GNU/Linux distributions package it in their repositories).</p> 72<p>ArabLuaTeX development is facilitated by git, a distributed version control system. You will need to install git (most GNU/Linux distributions package it in their repositories).</p>
72<p>Use this command to download the repository</p> 73<p>Use this command to download the repository</p>
73<pre><code>git clone http://git.robertalessi.net/arabluatex</code></pre> 74<pre><code>git clone http://git.robertalessi.net/arabluatex</code></pre>
74<p>A new directory named arabluatex will have been created, containing ArabLuaTeX.</p> 75<p>A new directory named arabluatex will have been created, containing ArabLuaTeX.</p>
75<h2 id="sec:git-hosting" class="unnumbered unnumbered">Git hosting</h2> 76<h2 class="unnumbered" id="sec:git-hosting">Git hosting</h2>
76<p>Make an account on <a href="https://gitlab.com" class="uri">https://gitlab.com</a> and navigate (while logged in) to <a href="https://gitlab.com/ralessi/arabluatex" class="uri">https://gitlab.com/ralessi/arabluatex</a>. Click <em>Fork</em> and you will have in your account your own repository of <code>arabluatex</code> where you will be able to make whatever changes you like to.</p> 77<p>Make an account on <a href="https://gitlab.com">https://gitlab.com</a> and navigate (while logged in) to <a href="https://gitlab.com/ralessi/arabluatex">https://gitlab.com/ralessi/arabluatex</a>. Click <em>Fork</em> and you will have in your account your own repository of <code>arabluatex</code> where you will be able to make whatever changes you like to.</p>
77</body> 78</body>
78</html> 79</html>
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 22c5099..c281001 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -1,6 +1,6 @@
1% \iffalse meta-comment 1% \iffalse meta-comment
2% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 2% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
3% Copyright (C) 2016--2020 Robert Alessi 3% Copyright (C) 2016--2022 Robert Alessi
4% 4%
5% Please send error reports and suggestions for improvements to Robert 5% Please send error reports and suggestions for improvements to Robert
6% Alessi <alessi@robertalessi.net> 6% Alessi <alessi@robertalessi.net>
@@ -27,7 +27,7 @@
27%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 27%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
28%<package>\ProvidesPackage{arabluatex} 28%<package>\ProvidesPackage{arabluatex}
29%<*package> 29%<*package>
30 [2020/03/23 v1.20 ArabTeX for LuaLaTeX] 30 [2022/06/15 v1.21-dev ArabTeX for LuaLaTeX]
31%</package> 31%</package>
32% 32%
33%<*driver> 33%<*driver>
@@ -37,7 +37,7 @@
37% This file is part of the `arabluatex' package 37% This file is part of the `arabluatex' package
38% 38%
39% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 39% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
40% Copyright (C) 2016--2020 Robert Alessi 40% Copyright (C) 2016--2022 Robert Alessi
41% 41%
42% Please send error reports and suggestions for improvements to Robert 42% Please send error reports and suggestions for improvements to Robert
43% Alessi <alessi@robertalessi.net> 43% Alessi <alessi@robertalessi.net>
@@ -158,16 +158,27 @@
158} 158}
159\end{filecontents} 159\end{filecontents}
160\usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry} 160\usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry}
161\usepackage{fontspec} 161\usepackage[no-math]{fontspec}
162\usepackage[default]{fontsetup}
163\defaultfontfeatures{Renderer=Harfbuzz} 162\defaultfontfeatures{Renderer=Harfbuzz}
164\usepackage[english]{babel} 163\usepackage[english]{babel}
165\usepackage{dox} 164%^^A dox does not work with the latest latex-dev:
166\doxitem{Option}{option}{options} 165\ifdefined\SpecialMacroIndex
166 \NewDocElement{Option}{option}
167\else
168 \usepackage{dox}
169 \doxitem{Option}{option}{options}
170\fi
167\usepackage{microtype} 171\usepackage{microtype}
168\babelfont{rm}{Old Standard} 172\babelfont{rm}{Old Standard}
173\babelfont{sf}{NewComputerModernSans10}
174\babelfont{tt}{NewComputerModernMono10}
175\usepackage[Old Standard]{mathfont}
176\usepackage{manfnt}
177\usepackage{lettrine}
178\newcommand\danger{\lettrine[loversize=-.5]{\textdbend}{\hskip6pt}}
169\usepackage{metalogox} 179\usepackage{metalogox}
170\usepackage{arabluatex}[2020/03/23] 180\usepackage{arabluatex}[2022/06/15]
181\SetTranslitConvention{dmg+}
171\SetArbUp{\textsuperscript{\thinspace#1}} % Old Standard needs this 182\SetArbUp{\textsuperscript{\thinspace#1}} % Old Standard needs this
172\usepackage[nopar]{quran} 183\usepackage[nopar]{quran}
173\usepackage[noindex]{nameauth} 184\usepackage[noindex]{nameauth}
@@ -175,7 +186,9 @@
175\usepackage{latexcolors} 186\usepackage{latexcolors}
176\PassOptionsToPackage{bookmarks=true}{hyperref} 187\PassOptionsToPackage{bookmarks=true}{hyperref}
177\usepackage[numbered]{hypdoc} 188\usepackage[numbered]{hypdoc}
189\newcommand{\phts}{\phantomsection}
178\usepackage{uri} 190\usepackage{uri}
191\usepackage[obeyspaces]{xurl}
179\usepackage[loadlang=en]{metastr} 192\usepackage[loadlang=en]{metastr}
180\hypersetup{ 193\hypersetup{
181 colorlinks, 194 colorlinks,
@@ -205,6 +218,7 @@
205\metaset[sep]{draft}{ -- } 218\metaset[sep]{draft}{ -- }
206\metasetlang{en-US} 219\metasetlang{en-US}
207\metaset{title}{arabluatex} 220\metaset{title}{arabluatex}
221\metaset[print]{title}{\textsf{arabluatex}}
208\metaset{date}{\filedate} 222\metaset{date}{\filedate}
209\metaset{draft}{\fileversion} 223\metaset{draft}{\fileversion}
210\metaset{subject}{ArabTeX} 224\metaset{subject}{ArabTeX}
@@ -219,7 +233,7 @@
219\metaset{partof}{The arabluatex Package} 233\metaset{partof}{The arabluatex Package}
220\metaset[print]{partof}{The \textsf{arabluatex} Package} 234\metaset[print]{partof}{The \textsf{arabluatex} Package}
221\metaset{copyrightowner}{\metapick[#1]{author}} 235\metaset{copyrightowner}{\metapick[#1]{author}}
222\metaset{copyrightdate}{2016--2020} 236\metaset{copyrightdate}{2016--2022}
223\metaset{licensemessage}{Permission is granted to copy, distribute 237\metaset{licensemessage}{Permission is granted to copy, distribute
224 and/or modify this document under the terms of the GNU Free 238 and/or modify this document under the terms of the GNU Free
225 Documentation License, Version 1.3 or any later version published by 239 Documentation License, Version 1.3 or any later version published by
@@ -267,7 +281,7 @@
267 bottom=0mm} 281 bottom=0mm}
268\newtcblisting{example}{minted options={linenos, numbersep=0mm, 282\newtcblisting{example}{minted options={linenos, numbersep=0mm,
269 fontsize=\smaller}} 283 fontsize=\smaller}}
270\newtcblisting{code}{minted options={linenos, numbersep=0mm, 284\newtcblisting{alcode}{minted options={linenos, numbersep=0mm,
271 fontsize=\smaller}, listing only} 285 fontsize=\smaller}, listing only}
272\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} 286\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
273\usepackage[contents]{colordoc} 287\usepackage[contents]{colordoc}
@@ -581,7 +595,7 @@
581% font\footnote{\textcite{pkg:amiri}.} like so:---\\ 595% font\footnote{\textcite{pkg:amiri}.} like so:---\\
582% \tcboxverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic]} 596% \tcboxverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic]}
583% \begin{quoting} 597% \begin{quoting}
584% \textsc{Rem.} By default Amiri places the \arb[trans]{kasraT} in 598% \textsc{Rem.~1} By default Amiri places the \arb[trans]{kasraT} in
585% combination with the \arb[trans]{ta^sdId} below the consonant, 599% combination with the \arb[trans]{ta^sdId} below the consonant,
586% like so: \arb{BBi}\,. That is correct, as at least in the oldest 600% like so: \arb{BBi}\,. That is correct, as at least in the oldest
587% manuscripts {\renewfontfamily\arabicfont{Amiri}[Script=Arabic, 601% manuscripts {\renewfontfamily\arabicfont{Amiri}[Script=Arabic,
@@ -594,6 +608,10 @@
594% \tcboxverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]} 608% \tcboxverb{\newfontfamily\arabicfont{Amiri}[Script=Arabic,RawFeature={+ss05}]}
595% 609%
596% Other Arabic fonts may behave differently. 610% Other Arabic fonts may behave differently.
611%
612% \noindent\textsc{Rem.~2} \cs{newfontfamily} can be used to have
613% either Indian of Arabic numbers printed. See
614% \vpageref{ref:arabic-numbers} for more information.
597% \end{quoting} 615% \end{quoting}
598% 616%
599% \subsection{Options} 617% \subsection{Options}
@@ -628,8 +646,8 @@
628% standards. At present, three standards are supported (see below 646% standards. At present, three standards are supported (see below
629% \vref{sec:transliteration} for more details): 647% \vref{sec:transliteration} for more details):
630% \begin{description} 648% \begin{description}
631% \item[dmg] \emph{Deutsche Morgenländische Gesellschaft}, which is 649% \item[dmg/dmg+] \emph{Deutsche Morgenländische Gesellschaft} |dmg|
632% selected by default; 650% is selected by default;
633% \item[loc] \emph{Library of Congress}; 651% \item[loc] \emph{Library of Congress};
634% \item[arabica] \emph{Arabica}. 652% \item[arabica] \emph{Arabica}.
635% \end{description} 653% \end{description}
@@ -796,11 +814,11 @@
796% \iffalse 814% \iffalse
797%<*example> 815%<*example>
798% \fi 816% \fi
799\begin{code} 817\begin{alcode}
800 \begin{arab} 818 \begin{arab}
801 [...] 819 [...]
802 \end{arab} 820 \end{arab}
803\end{code} 821\end{alcode}
804% \iffalse 822% \iffalse
805%</example> 823%</example>
806% \fi 824% \fi
@@ -857,14 +875,14 @@
857% all of the Arabic consonants. 875% all of the Arabic consonants.
858% 876%
859% \newcommand{\dmg}[1]{% 877% \newcommand{\dmg}[1]{%
860% \SetTranslitConvention{dmg}% 878% \SetTranslitConvention{dmg+}%
861% \arb[trans]{#1}} 879% \arb[trans]{#1}}
862% \newcommand{\loc}[1]{% 880% \newcommand{\loc}[1]{%
863% \SetTranslitConvention{loc}% 881% \SetTranslitConvention{loc}%
864% \arb[trans]{#1}\SetTranslitConvention{dmg}} 882% \arb[trans]{#1}\SetTranslitConvention{dmg+}}
865% \newcommand{\brill}[1]{% 883% \newcommand{\brill}[1]{%
866% \SetTranslitConvention{arabica}% 884% \SetTranslitConvention{arabica}%
867% \arb[trans]{#1}\SetTranslitConvention{dmg}} 885% \arb[trans]{#1}\SetTranslitConvention{dmg+}}
868% \begin{longtable}{lllll} 886% \begin{longtable}{lllll}
869% \bottomrule 887% \bottomrule
870% \caption[]{Standard Arab\TeX\ (consonants)} 888% \caption[]{Standard Arab\TeX\ (consonants)}
@@ -873,19 +891,19 @@
873% \captionlistentry{Standard Arab\TeX\ (consonants)} 891% \captionlistentry{Standard Arab\TeX\ (consonants)}
874% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 892% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
875% & Arab\TeX\ notation \\ 893% & Arab\TeX\ notation \\
876% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 894% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
877% \endfirsthead 895% \endfirsthead
878% \toprule 896% \toprule
879% Letter & \multicolumn{3}{l}{Transliteration} 897% Letter & \multicolumn{3}{l}{Transliteration}
880% & Arab\TeX\ notation \\ 898% & Arab\TeX\ notation \\
881% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 899% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
882% \endhead \footnotetext{See below \vref{sec:transliteration}.} 900% \endhead \footnotetext{See below \vref{sec:transliteration}.}
883% \label{tab:arabtex-consonants} 901% \label{tab:arabtex-consonants}
884% \arb[voc]{'i 'a 'u}\footnote{See below, \emph{Rem{.} a.} For 902% \arb[voc]{'i 'a 'u}\footnote{See below, \emph{Rem{.} a.} For
885% \arb[trans]{'alif} as a consonant, see \textcite[i. 16 903% \arb[trans]{'alif} as a consonant, see \textcite[i. 16
886% D]{Wright}. The \arb[trans]{hamzaT} itself is encoded \texttt{<'>} 904% D]{Wright}. The \arb[trans]{hamzaT} itself is encoded \texttt{<'>}
887% and may be followed by either \meta{u, a} or \meta{i}. See below 905% and may be followed by either \meta{u, a} or \meta{i}. See below
888% \vref{ref:hamza}.} & \dmg{'u, 'a, 'i} & 906% \vref{ref:hamza}.} & \dmg{|'u, |'a, |'i} &
889% \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\ 907% \loc{|'u, |'a, |'i} & \brill{|'u, |'a, |'i} & |'u| or |'a| or |'i| \\
890% \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\ 908% \arb[novoc]{b} & \dmg{b} & \loc{b} & \brill{b} & |b| \\
891% \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\ 909% \arb[novoc]{t} & \dmg{t} & \loc{t} & \brill{t} & |t| \\
@@ -957,7 +975,8 @@
957% now available} 975% now available}
958% \newfeature[v1.8.5]\Vref{tab:arabtex-additional-characters} gives 976% \newfeature[v1.8.5]\Vref{tab:arabtex-additional-characters} gives
959% the Arab\TeX\ equivalents for some additional Persian characters. 977% the Arab\TeX\ equivalents for some additional Persian characters.
960% 978%
979% \enlargethispage{2\baselineskip}
961% \begin{longtable}{lllll} 980% \begin{longtable}{lllll}
962% \bottomrule 981% \bottomrule
963% \caption[]{Standard Arab\TeX\ (additional characters)} 982% \caption[]{Standard Arab\TeX\ (additional characters)}
@@ -966,13 +985,13 @@
966% \captionlistentry{Standard Arab\TeX\ (additional characters)} 985% \captionlistentry{Standard Arab\TeX\ (additional characters)}
967% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 986% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
968% & Arab\TeX\ notation \\ 987% & Arab\TeX\ notation \\
969% & \texttt{dmg} & \texttt{loc} & \texttt{arabica}\footnotemark 988% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica}\footnotemark
970% & \\ \midrule 989% & \\ \midrule
971% \endfirsthead 990% \endfirsthead
972% \toprule 991% \toprule
973% Letter & \multicolumn{3}{l}{Transliteration} 992% Letter & \multicolumn{3}{l}{Transliteration}
974% & Arab\TeX\ notation \\ 993% & Arab\TeX\ notation \\
975% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 994% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
976% \endhead 995% \endhead
977% \addtocounter{footnote}{-1} 996% \addtocounter{footnote}{-1}
978% \footnotetext{See below \vref{sec:transliteration}.} 997% \footnotetext{See below \vref{sec:transliteration}.}
@@ -1011,12 +1030,12 @@
1011% \captionlistentry{Standard Arab\TeX\ (long vowels)} 1030% \captionlistentry{Standard Arab\TeX\ (long vowels)}
1012% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 1031% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
1013% & Arab\TeX\ notation \\ 1032% & Arab\TeX\ notation \\
1014% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1033% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1015% \endfirsthead 1034% \endfirsthead
1016% \toprule 1035% \toprule
1017% Letter & \multicolumn{3}{l}{Transliteration} 1036% Letter & \multicolumn{3}{l}{Transliteration}
1018% & Arab\TeX\ notation \\ 1037% & Arab\TeX\ notation \\
1019% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1038% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1020% \endhead \footnotetext{See below \vref{sec:transliteration}.} 1039% \endhead \footnotetext{See below \vref{sec:transliteration}.}
1021% \label{tab:arabtex-long-vowels} 1040% \label{tab:arabtex-long-vowels}
1022% \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\ 1041% \arb[novoc]{A} & \dmg{A} & \loc{A} & \brill{A} & \verb|A| \\
@@ -1072,12 +1091,12 @@
1072% \captionlistentry{Standard Arab\TeX\ (short vowels)} 1091% \captionlistentry{Standard Arab\TeX\ (short vowels)}
1073% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 1092% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
1074% & Arab\TeX\ notation \\ 1093% & Arab\TeX\ notation \\
1075% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1094% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1076% \endfirsthead 1095% \endfirsthead
1077% \toprule 1096% \toprule
1078% Letter & \multicolumn{3}{l}{Transliteration} 1097% Letter & \multicolumn{3}{l}{Transliteration}
1079% & Arab\TeX\ notation \\ 1098% & Arab\TeX\ notation \\
1080% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1099% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1081% \endhead \footnotetext{See below \vref{sec:transliteration}.} 1100% \endhead \footnotetext{See below \vref{sec:transliteration}.}
1082% \label{tab:arabtex-short-vowels} 1101% \label{tab:arabtex-short-vowels}
1083% \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \brill{Ba} & \verb|a| \\ 1102% \arb[voc]{Ba} & \dmg{Ba} & \loc{Ba} & \brill{Ba} & \verb|a| \\
@@ -1911,11 +1930,11 @@
1911% \captionlistentry{\enquote{Quoted} \arb[trans]{hamzaT}} 1930% \captionlistentry{\enquote{Quoted} \arb[trans]{hamzaT}}
1912% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 1931% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
1913% & Arab\TeX\ notation \\ 1932% & Arab\TeX\ notation \\
1914% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1933% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1915% \endfirsthead 1934% \endfirsthead
1916% \toprule Letter & \multicolumn{3}{l}{Transliteration} 1935% \toprule Letter & \multicolumn{3}{l}{Transliteration}
1917% & Arab\TeX\ notation \\ 1936% & Arab\TeX\ notation \\
1918% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 1937% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
1919% \endhead 1938% \endhead
1920% \footnotetext{See below \vref{sec:transliteration}.} 1939% \footnotetext{See below \vref{sec:transliteration}.}
1921% \label{tab:quoted-hamza} 1940% \label{tab:quoted-hamza}
@@ -2070,6 +2089,34 @@
2070% |sanaT-i| |1024| \arb[voc]{fI sanaT-i 1024} 2089% |sanaT-i| |1024| \arb[voc]{fI sanaT-i 1024}
2071% \end{quote} 2090% \end{quote}
2072% 2091%
2092% \needspace{2\baselineskip}
2093% \DescribeMacro{\SetArbNumbers}\newfeature[v1.21]
2094% \phts\label{ref:arabic-numbers}
2095% \cs{SetArbNumbers}\verb+{Indian|Arabic}+ %
2096% \hfill\tcboxverb{Default: Indian}\\
2097% As described above, \package{arabluatex} prints Indian numbers by
2098% default. \cs{SetArbNumbers}|{Arabic}| can be used at any point of
2099% the document to have Arabic numbers printed. Furthermore,
2100% \cs{SetArbNumbers}|{Arabic}| gives control over the way numbers are
2101% to be printed by means of the |anum| font feature, like so:---
2102%
2103% \iffalse
2104%<*example>
2105% \fi
2106\begin{alcode}
2107 \usepackage{arabluatex}
2108 \SetArbNumbers{Arabic}
2109 % use '+anum' for Arabic numbers or '-anum' for Indian numbers:
2110 \newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
2111\end{alcode}
2112% \iffalse
2113%</example>
2114% \fi
2115%
2116% \danger \cs{SetArbNumbers} must be used \emph{outside} Arabic
2117% environments. Once used, this commands operates on subsequent Arabic
2118% environments.
2119%
2073% \subsubsection{The \emph{abjad}} 2120% \subsubsection{The \emph{abjad}}
2074% \label{sec:abjad} 2121% \label{sec:abjad}
2075% The numbers may also be expressed with letters from right to left 2122% The numbers may also be expressed with letters from right to left
@@ -2153,12 +2200,12 @@
2153% \captionlistentry{Additional Arabic codings} 2200% \captionlistentry{Additional Arabic codings}
2154% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 2201% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
2155% & Arab\TeX\ notation \\ 2202% & Arab\TeX\ notation \\
2156% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 2203% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
2157% \endfirsthead 2204% \endfirsthead
2158% \toprule 2205% \toprule
2159% Letter & \multicolumn{3}{l}{Transliteration} 2206% Letter & \multicolumn{3}{l}{Transliteration}
2160% & Arab\TeX\ notation \\ 2207% & Arab\TeX\ notation \\
2161% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} \\ \midrule 2208% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} \\ \midrule
2162% \endhead \footnotetext{See below \vref{sec:transliteration}.} 2209% \endhead \footnotetext{See below \vref{sec:transliteration}.}
2163% \label{tab:additional-arabic-codings} 2210% \label{tab:additional-arabic-codings}
2164% \arb[novoc]{.b} & \dmg{.b} & \loc{.b} & \brill{.b} & |.b| \\ 2211% \arb[novoc]{.b} & \dmg{.b} & \loc{.b} & \brill{.b} & |.b| \\
@@ -2234,11 +2281,11 @@
2234% \iffalse 2281% \iffalse
2235%<*example> 2282%<*example>
2236% \fi 2283% \fi
2237\begin{code} 2284\begin{alcode}
2238 \begin{arabverse}[key1=value1, key2=value2, ...] 2285 \begin{arabverse}[key1=value1, key2=value2, ...]
2239 <verses> 2286 <verses>
2240 \end{arabverse} 2287 \end{arabverse}
2241\end{code} 2288\end{alcode}
2242% \iffalse 2289% \iffalse
2243%</example> 2290%</example>
2244% \fi 2291% \fi
@@ -2465,7 +2512,7 @@
2465% \iffalse 2512% \iffalse
2466%<*example> 2513%<*example>
2467% \fi 2514% \fi
2468\begin{code} 2515\begin{alcode}
2469 \begin{arab}[fullvoc] 2516 \begin{arab}[fullvoc]
2470 qAla imru'u 'l-\uc{q}aysi fI mu`allaqati-hi: 2517 qAla imru'u 'l-\uc{q}aysi fI mu`allaqati-hi:
2471 \end{arab} 2518 \end{arab}
@@ -2474,7 +2521,7 @@
2474 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}] 2521 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}]
2475 \SetArbDflt* 2522 \SetArbDflt*
2476 \begin{linenumbers*} 2523 \begin{linenumbers*}
2477 \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti 2524 \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-siq.ti
2478 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\ 2525 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
2479 \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu 2526 \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
2480 rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\ 2527 rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
@@ -2488,7 +2535,7 @@
2488 rasmiN dArisiN min mu`awwali}\\ 2535 rasmiN dArisiN min mu`awwali}\\
2489 \end{linenumbers*} 2536 \end{linenumbers*}
2490 \end{arabverse} 2537 \end{arabverse}
2491\end{code} 2538\end{alcode}
2492% \iffalse 2539% \iffalse
2493%</example> 2540%</example>
2494% \fi% 2541% \fi%
@@ -2503,7 +2550,7 @@
2503% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.25\linewidth] 2550% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.25\linewidth]
2504% \SetArbDflt* 2551% \SetArbDflt*
2505% \begin{linenumbers*} 2552% \begin{linenumbers*}
2506% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti 2553% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-siq.ti
2507% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\ 2554% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
2508% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu 2555% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
2509% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\ 2556% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
@@ -2528,7 +2575,7 @@
2528% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.4\linewidth] 2575% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.4\linewidth]
2529% \SetArbDflt* 2576% \SetArbDflt*
2530% \begin{linenumbers*} 2577% \begin{linenumbers*}
2531% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti 2578% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-siq.ti
2532% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\ 2579% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
2533% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu 2580% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
2534% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\ 2581% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
@@ -2557,7 +2604,7 @@
2557% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.3\linewidth] 2604% 'l-`arU.di 'l-'_Ul_A mina 'l-.tawIli)}, width=.3\linewidth]
2558% \SetArbDflt* 2605% \SetArbDflt*
2559% \begin{linenumbers*} 2606% \begin{linenumbers*}
2560% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti 2607% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-siq.ti
2561% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\ 2608% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
2562% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`--fu 2609% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`--fu
2563% rasmu---hA}{limA nasa^gat-hA mi--n ^gan----UbiN wa-^sam'ali}\\ 2610% rasmu---hA}{limA nasa^gat-hA mi--n ^gan----UbiN wa-^sam'ali}\\
@@ -2585,7 +2632,7 @@
2585% \SetArbDflt* 2632% \SetArbDflt*
2586% \scriptsize 2633% \scriptsize
2587% \begin{linenumbers*} 2634% \begin{linenumbers*}
2588% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-saq.ti 2635% \bayt{qifA nabki min _dikr_A .habIbiN wa-manzili}{bi-siq.ti
2589% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\ 2636% 'l-liw_A bayna \uc{'l-d}a_hUli fa-\uc{.h}awmali}\\
2590% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu 2637% \bayt{fa-\uc{t}U.di.ha fa-'l-\uc{m}iqrATi lam ya`fu
2591% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\ 2638% rasmu-hA}{limA nasa^gat-hA min ^ganUbiN wa-^sam'ali}\\
@@ -2945,12 +2992,12 @@
2945% \captionlistentry{Arab\TeX\ diacritics for \cs{arbcolor}} 2992% \captionlistentry{Arab\TeX\ diacritics for \cs{arbcolor}}
2946% Diacritic & \multicolumn{3}{l}{Transliteration\footnotemark} 2993% Diacritic & \multicolumn{3}{l}{Transliteration\footnotemark}
2947% & Arab\TeX\ notation \\ 2994% & Arab\TeX\ notation \\
2948% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 2995% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
2949% \endfirsthead 2996% \endfirsthead
2950% \toprule 2997% \toprule
2951% Diacritic & \multicolumn{3}{l}{Transliteration} 2998% Diacritic & \multicolumn{3}{l}{Transliteration}
2952% & Arab\TeX\ notation \\ 2999% & Arab\TeX\ notation \\
2953% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & \\ \midrule 3000% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & \\ \midrule
2954% \endhead \footnotetext{See below \vref{sec:transliteration}.} 3001% \endhead \footnotetext{See below \vref{sec:transliteration}.}
2955% \label{tab:arbcolor-diacritics} 3002% \label{tab:arbcolor-diacritics}
2956% \arb{B.a} & \dmg{.a} & \loc{.a} & \brill{.a} & \verb|.a| \\ 3003% \arb{B.a} & \dmg{.a} & \loc{.a} & \brill{.a} & \verb|.a| \\
@@ -3196,6 +3243,9 @@
3196% adopted by the International Convention of Orientalist Scholars in 3243% adopted by the International Convention of Orientalist Scholars in
3197% Rome in 1935.\footnote{See \textcite{dmg}.} |dmg| transliteration 3244% Rome in 1935.\footnote{See \textcite{dmg}.} |dmg| transliteration
3198% convention is selected by default; 3245% convention is selected by default;
3246% \item[dmg+] This is the same as above, with the difference that the
3247% hamza is always printed, even in words preceded by the definite
3248% article, as in \arb[trans]{al-'asadu}.
3199% \item[loc] \emph{Library of Congress}: this standard is part of a 3249% \item[loc] \emph{Library of Congress}: this standard is part of a
3200% large set of standards for romanization of non-roman scripts 3250% large set of standards for romanization of non-roman scripts
3201% adopted by the American Library Association and the Library of 3251% adopted by the American Library Association and the Library of
@@ -3218,16 +3268,16 @@
3218% transliteration mode, which is set to |dmg| by default, may be 3268% transliteration mode, which is set to |dmg| by default, may be
3219% changed at any point of the document by the 3269% changed at any point of the document by the
3220% \cs{SetTranslitConvention}\marg{mode} command , where \meta{mode} 3270% \cs{SetTranslitConvention}\marg{mode} command , where \meta{mode}
3221% may be either |dmg|, |loc| or |arabica|. This command is also 3271% may be either |dmg|, |dmg+|, |loc| or |arabica|. This command is also
3222% accepted in the preamble should one wish to set the transliteration 3272% accepted in the preamble should one wish to set the transliteration
3223% mode globally, e.g.:---% 3273% mode globally, e.g.:---%
3224% \iffalse 3274% \iffalse
3225%<*example> 3275%<*example>
3226% \fi 3276% \fi
3227\begin{code} 3277\begin{alcode}
3228 \usepackage{arabluatex} 3278 \usepackage{arabluatex}
3229 \SetTranslitConvention{loc} 3279 \SetTranslitConvention{loc}
3230\end{code} 3280\end{alcode}
3231% \iffalse 3281% \iffalse
3232%</example> 3282%</example>
3233% \fi 3283% \fi
@@ -3249,10 +3299,10 @@
3249% \iffalse 3299% \iffalse
3250%<*example> 3300%<*example>
3251% \fi 3301% \fi
3252\begin{code} 3302\begin{alcode}
3253 \newfontfamily\translitfont{Gentium Plus}[Ligatures=TeX] 3303 \newfontfamily\translitfont{Gentium Plus}[Ligatures=TeX]
3254 \SetTranslitFont{\translitfont} 3304 \SetTranslitFont{\translitfont}
3255\end{code} 3305\end{alcode}
3256% \iffalse 3306% \iffalse
3257%</example> 3307%</example>
3258% \fi 3308% \fi
@@ -3510,9 +3560,9 @@
3510% \arb[trans]{\uc{ju.hA}} and his donkey (\arb[voc]{\uc{ju.hA 3560% \arb[trans]{\uc{ju.hA}} and his donkey (\arb[voc]{\uc{ju.hA
3511% wa-.himAru-hu}}). See the code \vpageref{ref:juha-code}:--- 3561% wa-.himAru-hu}}). See the code \vpageref{ref:juha-code}:---
3512% 3562%
3513% \SetTranslitConvention{dmg} 3563% \SetTranslitConvention{dmg+}
3514% \begin{arab}[trans] 3564% \begin{arab}[trans]
3515% \LR{\textbf{\emph{\enquote*{dmg}} standard:}} 'at_A .sadIquN 'il_A 3565% \LR{\textbf{\emph{\enquote*{dmg+}} standard:}} 'at_A .sadIquN 'il_A
3516% \uc{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN 3566% \uc{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN
3517% qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI 3567% qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI
3518% 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \uc{ju.hA}: 3568% 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \uc{ju.hA}:
@@ -3539,7 +3589,7 @@
3539% \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a 3589% \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 'l-.himAr-a
3540% wa-tuka_d_diba-nI?} 3590% wa-tuka_d_diba-nI?}
3541% \end{arab} 3591% \end{arab}
3542% \SetTranslitConvention{dmg} 3592% \SetTranslitConvention{dmg+}
3543% 3593%
3544% \SetTranslitConvention{arabica} 3594% \SetTranslitConvention{arabica}
3545% \begin{arab}[trans] 3595% \begin{arab}[trans]
@@ -3555,7 +3605,7 @@
3555% \uc{ju.hA}: \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu 3605% \uc{ju.hA}: \enquote{.garIbuN 'amru-ka yA .sadIqI 'a-tu.saddiqu
3556% 'l-.himAr-a wa-tuka_d_diba-nI?} 3606% 'l-.himAr-a wa-tuka_d_diba-nI?}
3557% \end{arab} 3607% \end{arab}
3558% \SetTranslitConvention{dmg} 3608% \SetTranslitConvention{dmg+}
3559% 3609%
3560% \section{Buckwalter input scheme} 3610% \section{Buckwalter input scheme}
3561% \label{sec:buckwalter-scheme} 3611% \label{sec:buckwalter-scheme}
@@ -3579,10 +3629,10 @@
3579% \iffalse 3629% \iffalse
3580%<*example> 3630%<*example>
3581% \fi 3631% \fi
3582\begin{code} 3632\begin{alcode}
3583 \usepackage{arabluatex} 3633 \usepackage{arabluatex}
3584 \SetInputScheme{buckwalter} 3634 \SetInputScheme{buckwalter}
3585\end{code} 3635\end{alcode}
3586% \iffalse 3636% \iffalse
3587%</example> 3637%</example>
3588% \fi 3638% \fi
@@ -3615,13 +3665,13 @@
3615% \captionlistentry{Buckwalter input scheme} 3665% \captionlistentry{Buckwalter input scheme}
3616% Letter & \multicolumn{3}{l}{Transliteration\footnotemark} 3666% Letter & \multicolumn{3}{l}{Transliteration\footnotemark}
3617% & \multicolumn{2}{l}{Buckwalter notation} \\ 3667% & \multicolumn{2}{l}{Buckwalter notation} \\
3618% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & |base/xml| & 3668% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & |base/xml| &
3619% |safe| \\ \midrule 3669% |safe| \\ \midrule
3620% \endfirsthead 3670% \endfirsthead
3621% \toprule 3671% \toprule
3622% Letter & \multicolumn{3}{l}{Transliteration} 3672% Letter & \multicolumn{3}{l}{Transliteration}
3623% & \multicolumn{2}{l}{Buckwalter notation} \\ 3673% & \multicolumn{2}{l}{Buckwalter notation} \\
3624% & \texttt{dmg} & \texttt{loc} & \texttt{arabica} & |base/xml| & 3674% & \texttt{dmg+} & \texttt{loc} & \texttt{arabica} & |base/xml| &
3625% |safe| \\ \midrule 3675% |safe| \\ \midrule
3626% \endhead \footnotetext{See \vref{sec:transliteration}.} 3676% \endhead \footnotetext{See \vref{sec:transliteration}.}
3627% \label{tab:buckwalter-scheme} 3677% \label{tab:buckwalter-scheme}
@@ -3735,11 +3785,11 @@
3735% \iffalse 3785% \iffalse
3736%<*example> 3786%<*example>
3737% \fi 3787% \fi
3738\begin{code} 3788\begin{alcode}
3739 \begin{txarab} 3789 \begin{txarab}
3740 <Unicode Arabic text> 3790 <Unicode Arabic text>
3741 \end{txarab} 3791 \end{txarab}
3742\end{code} 3792\end{alcode}
3743% \iffalse 3793% \iffalse
3744%</example> 3794%</example>
3745% \fi 3795% \fi
@@ -3838,6 +3888,7 @@
3838% for that, but should it happen, it may be necessary to redefine in 3888% for that, but should it happen, it may be necessary to redefine in
3839% the preamble the \LaTeX\ macro \cs{thefootnote} like so:---\\ 3889% the preamble the \LaTeX\ macro \cs{thefootnote} like so:---\\
3840% \tcboxverb{\renewcommand*{\thefootnote}{\textsuperscript{\LR{\arabic{footnote}}}}} 3890% \tcboxverb{\renewcommand*{\thefootnote}{\textsuperscript{\LR{\arabic{footnote}}}}}
3891%
3841% \DescribeMacro{\FixArbFtnmk} Another solution is to put in the 3892% \DescribeMacro{\FixArbFtnmk} Another solution is to put in the
3842% preamble, below the line that loads \package{arabluatex}, the 3893% preamble, below the line that loads \package{arabluatex}, the
3843% \cs{FixArbFtnmk} command. However, for more control over the layout 3894% \cs{FixArbFtnmk} command. However, for more control over the layout
@@ -3972,13 +4023,13 @@
3972% \iffalse 4023% \iffalse
3973%<*example> 4024%<*example>
3974% \fi 4025% \fi
3975\begin{code} 4026\begin{alcode}
3976 \begin{arab} 4027 \begin{arab}
3977 \begin{<environment>}[<options>] 4028 \begin{<environment>}[<options>]
3978 <Arabic text> 4029 <Arabic text>
3979 \end{<environment>} 4030 \end{<environment>}
3980 \end{arab} 4031 \end{arab}
3981\end{code} 4032\end{alcode}
3982% \iffalse 4033% \iffalse
3983%</example> 4034%</example>
3984% \fi 4035% \fi
@@ -4075,13 +4126,13 @@
4075% \iffalse 4126% \iffalse
4076%<*example> 4127%<*example>
4077% \fi 4128% \fi
4078\begin{code} 4129\begin{alcode}
4079 % preamble:--- 4130 % preamble:---
4080 \usepackage{enumitem} 4131 \usepackage{enumitem}
4081 \newlist{enumabjad}{enumerate}{10} 4132 \newlist{enumabjad}{enumerate}{10}
4082 \setlist[enumabjad]{nosep, label={\abjad{\arabic*}}} 4133 \setlist[enumabjad]{nosep, label={\abjad{\arabic*}}}
4083 \usepackage{multicol} 4134 \usepackage{multicol}
4084\end{code} 4135\end{alcode}
4085\begin{example} 4136\begin{example}
4086 From \textcite[i. 29 B--C]{Wright}:--- The derived forms of the 4137 From \textcite[i. 29 B--C]{Wright}:--- The derived forms of the
4087 triliteral verb are usually reckoned fifteen in number, but the 4138 triliteral verb are usually reckoned fifteen in number, but the
@@ -4124,10 +4175,10 @@
4124% \iffalse 4175% \iffalse
4125%<*example> 4176%<*example>
4126% \fi 4177% \fi
4127\begin{code} 4178\begin{alcode}
4128 \usepackage[french]{babel} 4179 \usepackage[french]{babel}
4129 \frenchsetup{StandardLists=true} 4180 \frenchsetup{StandardLists=true}
4130\end{code} 4181\end{alcode}
4131% \iffalse 4182% \iffalse
4132%</example> 4183%</example>
4133% \fi% 4184% \fi%
@@ -4145,12 +4196,12 @@
4145% \iffalse 4196% \iffalse
4146%<*example> 4197%<*example>
4147% \fi 4198% \fi
4148\begin{code} 4199\begin{alcode}
4149 \usepackage{csquotes} 4200 \usepackage{csquotes}
4150 \DeclareQuoteStyle{arabic} 4201 \DeclareQuoteStyle{arabic}
4151 {\textquotedblright}{\textquotedblleft} 4202 {\textquotedblright}{\textquotedblleft}
4152 {\textquoteright}{\textquoteleft} 4203 {\textquoteright}{\textquoteleft}
4153\end{code} 4204\end{alcode}
4154% \iffalse 4205% \iffalse
4155%</example> 4206%</example>
4156% \fi 4207% \fi
@@ -4222,7 +4273,7 @@
4222% \iffalse 4273% \iffalse
4223%<*example> 4274%<*example>
4224% \fi 4275% \fi
4225\begin{code} 4276\begin{alcode}
4226 \beginnumbering 4277 \beginnumbering
4227 \pstart 4278 \pstart
4228 \begin{arab} 4279 \begin{arab}
@@ -4231,7 +4282,7 @@
4231 \end{arab} 4282 \end{arab}
4232 \pend 4283 \pend
4233 \endnumbering 4284 \endnumbering
4234\end{code} 4285\end{alcode}
4235% \iffalse 4286% \iffalse
4236%</example> 4287%</example>
4237% \fi 4288% \fi
@@ -4256,10 +4307,10 @@
4256% \iffalse 4307% \iffalse
4257%<*example> 4308%<*example>
4258% \fi 4309% \fi
4259\begin{code} 4310\begin{alcode}
4260 \usepackage{arabluatex} 4311 \usepackage{arabluatex}
4261 \usepackage[nopar]{quran} 4312 \usepackage[nopar]{quran}
4262\end{code} 4313\end{alcode}
4263% \iffalse 4314% \iffalse
4264%</example> 4315%</example>
4265% \fi 4316% \fi
@@ -4298,12 +4349,12 @@
4298% \iffalse 4349% \iffalse
4299%<*example> 4350%<*example>
4300% \fi 4351% \fi
4301\begin{code} 4352\begin{alcode}
4302 % preamble 4353 % preamble
4303 \usepackage[export]{arabluatex} 4354 \usepackage[export]{arabluatex}
4304 % or: 4355 % or:
4305 \usepackage[export=true]{arabluatex} 4356 \usepackage[export=true]{arabluatex}
4306\end{code} 4357\end{alcode}
4307% \iffalse 4358% \iffalse
4308%</example> 4359%</example>
4309% \fi 4360% \fi
@@ -4323,11 +4374,11 @@
4323% \iffalse 4374% \iffalse
4324%<*example> 4375%<*example>
4325% \fi 4376% \fi
4326\begin{code} 4377\begin{alcode}
4327 \begin{arabexport} 4378 \begin{arabexport}
4328 <Running paragraphs of either Arabic or non-Arabic text> 4379 <Running paragraphs of either Arabic or non-Arabic text>
4329 \end{arabexport} 4380 \end{arabexport}
4330\end{code} 4381\end{alcode}
4331% \iffalse 4382% \iffalse
4332%</example> 4383%</example>
4333% \fi 4384% \fi
@@ -4385,11 +4436,11 @@
4385% \iffalse 4436% \iffalse
4386%<*example> 4437%<*example>
4387% \fi 4438% \fi
4388\begin{code} 4439\begin{alcode}
4389 Package arabluatex Warning: There are still 'arabtex' strings 4440 Package arabluatex Warning: There are still 'arabtex' strings
4390 to be converted. Please open <jobname><suffix>.tex and compile 4441 to be converted. Please open <jobname><suffix>.tex and compile
4391 it one more time. 4442 it one more time.
4392\end{code} 4443\end{alcode}
4393% \iffalse 4444% \iffalse
4394%</example> 4445%</example>
4395% \fi 4446% \fi
@@ -4407,9 +4458,9 @@
4407% \iffalse 4458% \iffalse
4408%<*example> 4459%<*example>
4409% \fi 4460% \fi
4410\begin{code} 4461\begin{alcode}
4411 pandoc file_out.tex -s -o file_out.odt 4462 pandoc file_out.tex -s -o file_out.odt
4412\end{code} 4463\end{alcode}
4413% \iffalse 4464% \iffalse
4414%</example> 4465%</example>
4415% \fi 4466% \fi
@@ -4421,7 +4472,7 @@
4421% \iffalse 4472% \iffalse
4422%<*example> 4473%<*example>
4423% \fi 4474% \fi
4424\begin{code} 4475\begin{alcode}
4425 % preamble: 4476 % preamble:
4426 \usepackage{arabluatex} % note that 'export' has been removed 4477 \usepackage{arabluatex} % note that 'export' has been removed
4427 \renewcommand{\txarb}[1]{#1} 4478 \renewcommand{\txarb}[1]{#1}
@@ -4431,7 +4482,7 @@
4431 % be safe to say: 4482 % be safe to say:
4432 \renewcommand{\prname}[2]{#2} 4483 \renewcommand{\prname}[2]{#2}
4433 % &c 4484 % &c
4434\end{code} 4485\end{alcode}
4435% \iffalse 4486% \iffalse
4436%</example> 4487%</example>
4437% \fi 4488% \fi
@@ -5092,6 +5143,14 @@
5092 {\NewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}}} 5143 {\NewDocumentCommand{\LR}{m}{\bgroup\textdir TLT\rmfamily#1\egroup}}}
5093% \end{macrocode} 5144% \end{macrocode}
5094% \end{macro} 5145% \end{macro}
5146% \begin{macro}{\SetArbNumbers}
5147% \changes{v1.21}{2022/06/15}{select Indian or Arabic numbers}
5148% \begin{macrocode}
5149\NewDocumentCommand{\SetArbNumbers}{m}{%
5150 \luadirect{arabluatex.setnums(\luastringN{#1})}%
5151}
5152% \end{macrocode}
5153% \end{macro}
5095% \begin{macro}{\RL} This one typesets its argument from right to 5154% \begin{macro}{\RL} This one typesets its argument from right to
5096% left. Same remark as above regarding the need of redefinition. 5155% left. Same remark as above regarding the need of redefinition.
5097% \begin{macrocode} 5156% \begin{macrocode}
@@ -5248,7 +5307,7 @@
5248% \end{macrocode} 5307% \end{macrocode}
5249% \end{macro} 5308% \end{macro}
5250% \begin{macro}{\altrfont} 5309% \begin{macro}{\altrfont}
5251% \changes{v1.21}{2020/07/13}{new command \cs{altrfont} to store 5310% \changes{v1.21}{2022/06/15}{new command \cs{altrfont} to store
5252% font and shape information (trans mode)} Finally \cs{altrfont} 5311% font and shape information (trans mode)} Finally \cs{altrfont}
5253% is used internally by \package{arabluatex} to store family and 5312% is used internally by \package{arabluatex} to store family and
5254% shape information about the font to be used for transliterated 5313% shape information about the font to be used for transliterated
diff --git a/arabluatex.el b/arabluatex.el
index 063fa61..0cd3fd3 100644
--- a/arabluatex.el
+++ b/arabluatex.el
@@ -2,7 +2,7 @@
2;; This file is part of the `arabluatex' package 2;; This file is part of the `arabluatex' package
3 3
4;; ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4;; ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5;; Copyright (C) 2016--2020 Robert Alessi 5;; Copyright (C) 2016--2022 Robert Alessi
6 6
7;; The author would like to express his grateful thanks to Arash 7;; The author would like to express his grateful thanks to Arash
8;; Esbati <arash@gnu.org> whose comments helped to improve this file 8;; Esbati <arash@gnu.org> whose comments helped to improve this file
@@ -125,6 +125,7 @@
125 "SetHemistichDelim" 125 "SetHemistichDelim"
126 '("bayt" 2) 126 '("bayt" 2)
127 "abjad" 127 "abjad"
128 '("SetArbNumbers" "Indian or Arabic")
128 "arbnull" 129 "arbnull"
129 "abraces" 130 "abraces"
130 "LR" 131 "LR"
diff --git a/arabluatex.ins b/arabluatex.ins
index f51c46d..afef368 100644
--- a/arabluatex.ins
+++ b/arabluatex.ins
@@ -1,7 +1,7 @@
1%% This file is part of the `arabluatex' package 1%% This file is part of the `arabluatex' package
2%% 2%%
3%% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 3%% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
4%% Copyright (C) 2016--2020 Robert Alessi 4%% Copyright (C) 2016--2022 Robert Alessi
5%% 5%%
6%% Please send error reports and suggestions for improvements to 6%% Please send error reports and suggestions for improvements to
7%% Robert Alessi <alessi@robertalessi.net> 7%% Robert Alessi <alessi@robertalessi.net>
@@ -43,7 +43,7 @@ This is a generated file.
43This file is part of the `arabluatex' package 43This file is part of the `arabluatex' package
44 44
45ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 45ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
46Copyright (C) 2016--2020 Robert Alessi 46Copyright (C) 2016--2022 Robert Alessi
47 47
48Please send error reports and suggestions for improvements to Robert 48Please send error reports and suggestions for improvements to Robert
49Alessi <alessi@robertalessi.net> 49Alessi <alessi@robertalessi.net>
diff --git a/arabluatex.lua b/arabluatex.lua
index 72b1e38..f639770 100644
--- a/arabluatex.lua
+++ b/arabluatex.lua
@@ -2,7 +2,7 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2020 Robert Alessi 5Copyright (C) 2016--2022 Robert Alessi
6 6
7Please send error reports and suggestions for improvements to Robert 7Please send error reports and suggestions for improvements to Robert
8Alessi <alessi@robertalessi.net> 8Alessi <alessi@robertalessi.net>
@@ -94,7 +94,8 @@ local albrkcmds = {
94 "LRmarginpar", 94 "LRmarginpar",
95 "arbmark", 95 "arbmark",
96 "abjad", 96 "abjad",
97 "ayah" 97 "ayah",
98 "SetArbNumbers"
98} 99}
99local brkcmds = {} 100local brkcmds = {}
100 101
@@ -170,7 +171,18 @@ local function holdcmd(str)
170 return str 171 return str
171end 172end
172 173
173local function arbnum(str) 174local indorarbnum = "Indian"
175
176function arabluatex.setnums(opt)
177 if opt == "Indian"
178 then
179 indorarbnum = "Indian"
180 else
181 indorarbnum = "Arabic"
182 end
183end
184
185local function arbnum(str) -- not used, see below
174 str = string.gsub(str, "([0-9%,%-%/]+)", function(num) 186 str = string.gsub(str, "([0-9%,%-%/]+)", function(num)
175 return string.reverse(num) 187 return string.reverse(num)
176 end) 188 end)
@@ -181,8 +193,11 @@ local function indnum(str)
181 str = string.gsub(str, "([0-9%,%-%/]+)", function(num) 193 str = string.gsub(str, "([0-9%,%-%/]+)", function(num)
182 return string.reverse(num) 194 return string.reverse(num)
183 end) 195 end)
184 for i = 1,#numbers do 196 if indorarbnum == "Indian"
185 str = string.gsub(str, numbers[i].a, numbers[i].b) 197 then
198 for i = 1,#numbers do
199 str = string.gsub(str, numbers[i].a, numbers[i].b)
200 end
186 end 201 end
187 return str 202 return str
188end 203end
@@ -590,11 +605,19 @@ local function novoceasy(str)
590 return str 605 return str
591end 606end
592 607
593local function transdmg(str, rules) 608local function transdmg(str, mode, rules)
594 str = string.gsub(str, "\\arb(%b{})", function(inside) 609 str = string.gsub(str, "\\arb(%b{})", function(inside)
595 inside = string.sub(inside, 2, -2) 610 inside = string.sub(inside, 2, -2)
596 for i = 1,#hamzatrdmg do 611 if mode == "dmg"
597 inside = string.gsub(inside, hamzatrdmg[i].a, hamzatrdmg[i].b) 612 then
613 for i = 1,#hamzatrnoinitialdmg do
614 inside = string.gsub(inside, hamzatrnoinitialdmg[i].a, hamzatrnoinitialdmg[i].b)
615 end
616 elseif mode == "dmg+"
617 then
618 for i = 1,#hamzatrdmg do
619 inside = string.gsub(inside, hamzatrdmg[i].a, hamzatrdmg[i].b)
620 end
598 end 621 end
599 for i = 1,#tanwintrdmg do 622 for i = 1,#tanwintrdmg do
600 inside = string.gsub(inside, tanwintrdmg[i].a, tanwintrdmg[i].b) 623 inside = string.gsub(inside, tanwintrdmg[i].a, tanwintrdmg[i].b)
@@ -1062,8 +1085,8 @@ function arabluatex.processtrans(str, mode, rules, scheme)
1062 if scheme == "buckwalter" then 1085 if scheme == "buckwalter" then
1063 str = processbuckw(str) 1086 str = processbuckw(str)
1064 end 1087 end
1065 if mode == "dmg" then 1088 if mode == "dmg" or mode == "dmg+" then
1066 str = transdmg(str, rules) 1089 str = transdmg(str, mode, rules)
1067 elseif mode == "loc" then 1090 elseif mode == "loc" then
1068 str = transloc(str) 1091 str = transloc(str)
1069 elseif mode == "arabica" then 1092 elseif mode == "arabica" then
diff --git a/arabluatex_fullvoc.lua b/arabluatex_fullvoc.lua
index a53adce..adfccf4 100644
--- a/arabluatex_fullvoc.lua
+++ b/arabluatex_fullvoc.lua
@@ -2,7 +2,7 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2020 Robert Alessi 5Copyright (C) 2016--2022 Robert Alessi
6 6
7Please send error reports and suggestions for improvements to Robert 7Please send error reports and suggestions for improvements to Robert
8Alessi <alessi@robertalessi.net> 8Alessi <alessi@robertalessi.net>
diff --git a/arabluatex_novoc.lua b/arabluatex_novoc.lua
index f3410e7..b77cfda 100644
--- a/arabluatex_novoc.lua
+++ b/arabluatex_novoc.lua
@@ -2,7 +2,7 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2020 Robert Alessi 5Copyright (C) 2016--2022 Robert Alessi
6 6
7Please send error reports and suggestions for improvements to Robert 7Please send error reports and suggestions for improvements to Robert
8Alessi <alessi@robertalessi.net> 8Alessi <alessi@robertalessi.net>
diff --git a/arabluatex_trans.lua b/arabluatex_trans.lua
index 455b57b..c5c0b05 100644
--- a/arabluatex_trans.lua
+++ b/arabluatex_trans.lua
@@ -2,7 +2,7 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2020 Robert Alessi 5Copyright (C) 2016--2022 Robert Alessi
6 6
7Please send error reports and suggestions for improvements to Robert 7Please send error reports and suggestions for improvements to Robert
8Alessi <alessi@robertalessi.net> 8Alessi <alessi@robertalessi.net>
@@ -202,6 +202,91 @@ hamzatrdmg = {
202 {a="(i)(')([^uaiUAI])", b="%1ʾ%3"} 202 {a="(i)(')([^uaiUAI])", b="%1ʾ%3"}
203} 203}
204 204
205hamzatrnoinitialdmg = {
206 -- next lines for ʾalif alone
207 {a="(%.A)l%-(%^n)", b=".|l-%2"}, --additional (^n is lunar)
208 {a="([%(%[%|%<%s%-O])(%.A)l%-(%^n)", b="%1.|l-%3"}, --additional (^n is lunar) --p
209 {a="(%.A)l%-([%_%^%.]?[tdrzsnc])", b=".|%2-%2"},
210 {a="([%(%[%|%<%s%-O])(%.A)l%-([%_%^%.]?[tdrzsnc])", b="%1.|%3-%3"}, --p
211 {a="(%.A)([uai])l%-(%^n)", b="||%2l-%3"}, --additional (^n is lunar)
212 {a="([%(%[%|%<%s%-O])(%.A)([uai])l%-(%^n)", b="%1||%3l-%4"}, --additional (^n is lunar) --p
213 {a="(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="||%2%3-%3"},
214 {a="([%(%[%|%<%s%-O])(%.A)([uai])l%-([%_%^%.]?[tdrzsnc])", b="%1||%3%4-%4"}, --p
215 {a="(%.A)([^uai])", b=".|%2"},
216 {a="(%.A)([uai])", b="||%2"},
217 -- hard coded hamza
218 {a="|\"'", b="ʾ"},
219 {a="A\"'", b="ʾA"},
220 {a="[au]\"'", b="ʾ"},
221 {a="w\"'", b="ʾ"},
222 {a="i\"'", b="ʾ"},
223 {a="y\"'", b="ʾ"},
224 -- hamza takes tašdīd too
225 {a="''([Uu])", b="ʾʾ%1"},
226 {a="''([Aa])", b="ʾʾ%1"},
227 {a="''([Ii])", b="ʾʾ%1"},
228 -- initial long u and i (for a, see below)
229 {a="%'%_U", b="||U"},
230 {a="%'%_I", b="||I"},
231 -- taḫfīfu 'l-hamza
232 {a="'u'([^uaiUAI])", b="|U%1"},
233 {a="'i'([^uaiUAI])", b="|I%1"},
234 {a="^u'([^uaiUAI])", b="U%1"},
235 {a="([^uaiUAIYN][%s%(%[%<])u'([^uaiUAI])", b="%1U%2"},
236 {a="^i'([^uaiUAI])", b="I%1"},
237 {a="([^uaiUAIYN][%s%(%[%<])i'([^uaiUAI])", b="%1I%2"},
238 -- madda (historic writing below)
239 {a="'a'([^uaiUAI])", b="ʾA%1"},
240 {a="'a?A", b="ʾA"},
241 {a="(A)(')(i)$", b="%1ʾ%3"},
242 {a="(A)(')(i)(%W)", b="%1ʾ%3%4"},
243 {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda
244 {a="(A)(')", b="%1ʾ"}, -- historic madda
245 -- initial (needs both ^ and %W patterns)
246 -- 'aw: the diphthong is to be resolved into 'awi' (next 8 lines)
247 {a="^('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1i"},
248 {a="(%W)('aw)(O)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)([%S]-O)", b="%1%2i"},
249 {a="^('aw)(O)(\"?[uai])([%S]-O)", b="%1i"},
250 {a="(%W)('aw)(O)(\"?[uai])([%S]-O)", b="%1%2i"},
251 {a="^('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1i%2%3"},
252 {a="(%W)('aw)(%s)(['][%_%^%.]?[l'btjghxdrzs`fqkmnwy]%-)", b="%1%2i%3%4"},
253 {a="^('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1i%2%3"}, --p
254 {a="(%W)('aw)(%s)([%(%[%|%<]?\"?[uai])", b="%1%2i%3%4"}, --p
255 -- then the 'initial' rules for the remaining cases
256 {a="^(')([ua])", b="||%2"},
257 {a="^(')(i)", b="||%2"},
258 -- consider replacing initial %W with [%s%(%[%<%-]:
259 -- {a="(%W)(')([ua])", b="%1||%3"},
260 -- {a="(%W)(')(i)", b="%1||%3"},
261 {a="([%s%(%[%<%-])(')([ua])", b="%1||%3"},
262 {a="([%s%(%[%<%-])(')(i)", b="%1||%3"},
263 -- final
264 {a="([Iy])(')(aN)$", b="%1ʾ%3"},
265 {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"},
266 {a="([^uai])(')([uai]N?)$", b="%1ʾ%3"},
267 {a="([^uai])(')([uai]N?)(%W)", b="%1ʾ%3%4"},
268 {a="([UI])(')([uai])$", b="%1ʾ%3"},
269 {a="([UI])(')([uai])(%W)", b="%1ʾ%3%4"},
270 -- middle
271 {a="(U)(')", b="%1ʾ"},
272 {a="([Iy])(')", b="%1ʾ"},
273 {a="([^uai])(')([uU])", b="%1ʾ%3"},
274 {a="([^uai])(')(%_?[aAY])", b="%1ʾ%3"},
275 {a="([^uai])(')([iI])", b="%1ʾ%3"},
276 {a="(u)(')([uU])", b="%1ʾ%3"},
277 {a="(u)(')(%_?[aAY])", b="%1ʾ%3"},
278 {a="(u)(')([iI])", b="%1ʾ%3"},
279 {a="(a)(')(%_?[aAY])", b="%1ʾ%3"},
280 {a="(a)(')([uU])", b="%1ʾ%3"},
281 {a="(a)(')([iI])", b="%1ʾ%3"},
282 {a="(i)(')(%_?[aAY])", b="%1ʾ%3"},
283 {a="(i)(')([uU])", b="%1ʾ%3"},
284 {a="(i)(')([iI])", b="%1ʾ%3"},
285 {a="(a)(')([^uaiUAI])", b="%1ʾ%3"},
286 {a="(u)(')([^uaiUAI])", b="%1ʾ%3"},
287 {a="(i)(')([^uaiUAI])", b="%1ʾ%3"}
288}
289
205tanwintrdmg = { 290tanwintrdmg = {
206 {a="%-?([uai]NU)(O)([ui])([%S]-O)", b="\\arbup{un%3}"}, 291 {a="%-?([uai]NU)(O)([ui])([%S]-O)", b="\\arbup{un%3}"},
207 {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"}, 292 {a="%-?([uai]NU)(%s)([ui])", b="\\arbup{un%3}%2'"},
diff --git a/arabluatex_voc.lua b/arabluatex_voc.lua
index 7301540..362c866 100644
--- a/arabluatex_voc.lua
+++ b/arabluatex_voc.lua
@@ -2,7 +2,7 @@
2This file is part of the `arabluatex' package 2This file is part of the `arabluatex' package
3 3
4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX 4ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
5Copyright (C) 2016--2020 Robert Alessi 5Copyright (C) 2016--2022 Robert Alessi
6 6
7Please send error reports and suggestions for improvements to Robert 7Please send error reports and suggestions for improvements to Robert
8Alessi <alessi@robertalessi.net> 8Alessi <alessi@robertalessi.net>
diff --git a/makefile b/makefile
index d6a1e7d..19012c3 100644
--- a/makefile
+++ b/makefile
@@ -33,6 +33,21 @@ local: clean sty
33 fi 33 fi
34 cp $(pkg)*.el $(HOMEDIR)/.emacs.d/auctex/auto 34 cp $(pkg)*.el $(HOMEDIR)/.emacs.d/auctex/auto
35 35
36inst: doc
37 if [ ! -d "$(TEXMFDIR)/tex/lualatex/arabluatex" ]; then \
38 mkdir -p $(TEXMFDIR)/tex/lualatex/arabluatex; \
39 fi
40 cp $(pkg)*.{sty,lua} $(TEXMFDIR)/tex/lualatex/arabluatex
41 if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \
42 mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \
43 fi
44 cp $(pkg)*.el $(HOMEDIR)/.emacs.d/auctex/auto
45 if [ ! -d "$(TEXMFDIR)/doc/lualatex/arabluatex" ]; then \
46 mkdir -p $(TEXMFDIR)/doc/lualatex/arabluatex; \
47 fi
48 cp $(pkg).pdf $(TEXMFDIR)/doc/lualatex/arabluatex
49 cp -r samples/ $(TEXMFDIR)/doc/lualatex/arabluatex
50
36auctex: clean 51auctex: clean
37 if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ 52 if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \
38 mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \ 53 mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \
@@ -54,7 +69,7 @@ package: clean all
54 tar czf arabluatex-$(ver).tar.gz arabluatex.tds.zip arabluatex/ 69 tar czf arabluatex-$(ver).tar.gz arabluatex.tds.zip arabluatex/
55 70
56clean: 71clean:
57 rm -rf $(TEXMFDIR)/tex/lualatex/arabluatex/ 72 rm -rf $(TEXMFDIR)/{tex,doc}/lualatex/arabluatex/
58 rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/arabluatex*.{el,elc} 73 rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/arabluatex*.{el,elc}
59 rm -rf tex/ doc/ source/ auto/ 74 rm -rf tex/ doc/ source/ auto/
60 rm -rf arabluatex/ 75 rm -rf arabluatex/
@@ -68,4 +83,4 @@ clean:
68 pandoc -s README.tex -o README.md && sed -i 's/{#.*}//g' README.md 83 pandoc -s README.tex -o README.md && sed -i 's/{#.*}//g' README.md
69 pandoc -s README.tex -o about.html 84 pandoc -s README.tex -o about.html
70 85
71.PHONY: sty doc all local auctex package clean 86.PHONY: sty doc all local inst auctex package clean