texlive[43739] Master/texmf-dist: arabluatex

commits+karl at tug.org commits+karl at tug.org
Tue Apr 11 00:02:09 CEST 2017


Revision: 43739
          http://tug.org/svn/texlive?view=revision&revision=43739
Author:   karl
Date:     2017-04-11 00:02:09 +0200 (Tue, 11 Apr 2017)
Log Message:
-----------
arabluatex

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf
    trunk/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
    trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
    trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
    trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua

Modified: trunk/Master/texmf-dist/doc/lualatex/arabluatex/arabluatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx	2017-04-10 21:55:58 UTC (rev 43738)
+++ trunk/Master/texmf-dist/source/lualatex/arabluatex/arabluatex.dtx	2017-04-10 22:02:09 UTC (rev 43739)
@@ -27,7 +27,7 @@
 %<package-info>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package-info>\ProvidesPackage{arabluatex}
 %<*package-info>
-    [2017/03/30 v1.8 An ArabTeX-like interface for LuaLaTeX]
+    [2017/04/02 v1.8.2 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}[2017/03/30]
+\usepackage{arabluatex}[2017/04/02]
 \usepackage[nopar]{quran}
 \usepackage{varioref}
 \usepackage{hyperxmp}
@@ -165,6 +165,7 @@
   pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode},
   pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={Arabic language,
     arabtex, luatex}}
+\usepackage[scale=1.5]{ccicons}
 \usepackage[toc,lot]{multitoc}
 \usepackage{paralist}
 \setdefaultitem{\textendash}{\textendash}{\textendash}{\textendash}
@@ -216,7 +217,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{697}
+% \CheckSum{700}
 %
 % \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
@@ -310,6 +311,7 @@
 % \url{https://notabug.org/ralessi/arabluatex/issues}
 % \end{compactitem}
 %
+% \marginpar{\texttt{gpl3+}}
 % 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
@@ -340,7 +342,8 @@
 % \subsection*{License applicable to this document}
 % \label{sec:documentation-license}
 % Copyright \textcopyright\ 2016--2017  Robert Alessi
-% 
+%
+% \ccbysa\marginpar{\texttt{CC BY-SA 4.0}}
 % This document is licensed under the Creative Commons
 % Attribution-ShareAlike 4.0 International License. To view a copy of
 % this license, visit
@@ -965,7 +968,7 @@
 % \begin{quote}
 %   |.hay_aUTuN| \arb[voc]{.hay_aUTuN} \arb[trans]{.hay_aUTuN},
 %   |.sal_aUTuN| \arb[voc]{.sal_aUTuN} \arb[trans]{.sal_aUTuN},
-%   |mi^sk_aUTuN| \arb[voc]{mi^sk_aUTuN} \arb[trans]{mi^sk_aUTuN},
+%   |mi^sk_aUTuN| \arb[voc]{mi^sk_aUTuN} \arb[trans]{mi^s\-k_aUTuN},
 %   |tawr_aITuN| \arb[voc]{tawr_aITuN} \arb[trans]{tawr_aITuN}.
 %
 %   And so also: |al-rib_aIT-u| \arb[voc]{al-rib_aIT-u}
@@ -1594,11 +1597,11 @@
 % \begin{compactenum}[(a)]
 % \item \arb[trans]{'alif-u 'l-wa.sl-i}:---
 %   \begin{quote}
-%     |fI "istisqA'-a| \arb[voc]{fI "istisqA'-a} \arb[trans]{fI
-%     "istisqA'-a}, |wa-"istisqA'-u| \arb[voc]{wa-"istisqA'-u}
-%     \arb[trans]{wa-"is\-tisqA'-u}, |qAla| |"uhrub| |fa-lan|
-%     |tuqtala| \arb[voc]{qAla "uhrub fa-lan tuqtala} \arb[trans]{qAla
-%     "uhrub fa-lan tuqtala}.
+%     |fI "istiq.sA'-iN| \arb[voc]{fI "istiq.sA'-iN} \arb[trans]{fI
+%     "istiq.sA'-iN}, |wa-"istiq.sA'-uN| \arb[voc]{wa-"istiq.sA'-uN}
+%     \allowbreak\arb[trans]{wa-"istiq.sA'-uN}, |qAla| |"uhrub|
+%     |fa-lan| |tuqtala| \arb[voc]{qAla "uhrub fa-lan tuqtala}
+%     \arb[trans]{qAla "uhrub fa-lan tuqtala}.
 %   \end{quote}
 % \item \arb[trans]{sukUn}:---
 %   \begin{quote}
@@ -2452,7 +2455,7 @@
 %
 % \SetTranslitConvention{dmg}
 % \begin{arab}[trans]
-%   \LR{\textbf{\emph{\enquote*{dmg}} standard}:} 'at_A .sadIquN 'il_A
+%   \LR{\textbf{\emph{\enquote*{dmg}} standard:}} 'at_A .sadIquN 'il_A
 %   \cap{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN
 %   qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI
 %   'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \cap{ju.hA}:
@@ -2467,7 +2470,7 @@
 % 
 % \SetTranslitConvention{loc}
 % \begin{arab}[trans]
-%   \LR{\textbf{\emph{\enquote*{loc}} standard}:} 'at_A .sadIquN 'il_A
+%   \LR{\textbf{\emph{\enquote*{loc}} standard:}} 'at_A .sadIquN 'il_A
 %   \cap{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI safraTiN
 %   qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu 'ilay-ka fI
 %   'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla \cap{ju.hA}:
@@ -2483,7 +2486,7 @@
 %
 % \SetTranslitConvention{arabica}
 % \begin{arab}[trans]
-%   \LR{\textbf{\emph{\enquote*{arabica}} standard}:} 'at_A .sadIquN
+%   \LR{\textbf{\emph{\enquote*{arabica}} standard:}} 'at_A .sadIquN
 %   'il_A \cap{ju.hA} ya.tlubu min-hu .himAra-hu li-yarkaba-hu fI
 %   safraTiN qa.sIraTiN fa-qAla la-hu: \enquote{sawfa 'u`Idu-hu
 %   'ilay-ka fI 'l-masA'-i wa-'adfa`u la-ka 'ujraTaN.} fa-qAla
@@ -3084,7 +3087,7 @@
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{arabluatex}%
-[2017/03/30 v1.8 An ArabTeX-like interface for LuaLaTeX]
+[2017/04/02 v1.8.2 An ArabTeX-like interface for LuaLaTeX]
 \RequirePackage{ifluatex}
 %    \end{macrocode}
 % \package{arabluatex} requires \LuaLaTeX\ of course. Issue a warning
@@ -3296,6 +3299,21 @@
   {\luadirect{tex.sprint(cap(\luastringN{#1}))}}
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}{\Cap} \cs{cap} may 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{Cap} does the same as \cs{cap} except
+%   that \emph{it is never discarded}. For that reason, \cs{Cap}
+%   \emph{should never be used outside the} |trans|
+%   \emph{mode}. \package{arabluatex} uses \cs{Cap} internally so as
+%   to prevent \cs{cap} from being discarded in case words that are to
+%   be transliterated are inserted into Arabic commands or
+%   environments where transliteration is not required. Therefore, it
+%   is not documented.
+%    \begin{macrocode}
+\let\Cap\cap
+%    \end{macrocode}
+% \end{macro}
 % \begin{macro}{\txarb} \cs{txarb} sets the direction to right-to-left
 %   and selects the Arabic font. It is used internally by several Lua
 %   functions, but available to the user should he wish to insert

Modified: trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua	2017-04-10 21:55:58 UTC (rev 43738)
+++ trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua	2017-04-10 22:02:09 UTC (rev 43739)
@@ -157,6 +157,11 @@
 end
 
 local function takeoutcapetc(str)
+   str = string.gsub(str, "(\\arb.?%[trans%])(%b{})", function(tag, body)
+			body = string.sub(body, 2, -2)
+			body = string.gsub(body, "(\\cap%s?)(%b{})", "\\Cap%2")
+			return string.format("%s{%s}", tag, body)
+   end)
    str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body)
 			body = string.sub(body, 2, -2)
 			return string.format("%s", body)
@@ -497,8 +502,8 @@
 local function transarabica(str)
    str = string.gsub(str, "\\arb(%b{})", function(inside)
    inside = string.sub(inside, 2, -2)
-   for i = 1,#hamzatrloc do
-      inside = string.gsub(inside, hamzatrloc[i].a, hamzatrloc[i].b)
+   for i = 1,#hamzatrarabica do
+      inside = string.gsub(inside, hamzatrarabica[i].a, hamzatrarabica[i].b)
    end
    for i = 1,#tanwintrloc do
       inside  = string.gsub(inside, tanwintrloc[i].a, tanwintrloc[i].b)
@@ -512,8 +517,8 @@
    for i = 1,#singletrarabica do
       inside = string.gsub(inside, singletrarabica[i].a, singletrarabica[i].b)
    end
-   for i = 1,#longvtrloc do
-      inside = string.gsub(inside, longvtrloc[i].a, longvtrloc[i].b)
+   for i = 1,#longvtrarabica do
+      inside = string.gsub(inside, longvtrarabica[i].a, longvtrarabica[i].b)
    end
    for i = 1,#shortvtrloc do
       inside = string.gsub(inside, shortvtrloc[i].a, shortvtrloc[i].b)

Modified: trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty	2017-04-10 21:55:58 UTC (rev 43738)
+++ trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty	2017-04-10 22:02:09 UTC (rev 43739)
@@ -41,7 +41,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{arabluatex}%
-[2017/03/30 v1.8 An ArabTeX-like interface for LuaLaTeX]
+[2017/04/02 v1.8.2 An ArabTeX-like interface for LuaLaTeX]
 \RequirePackage{ifluatex}
 \ifluatex\else
  \PackageError{arabluatex}{lualatex needed}{%
@@ -112,6 +112,7 @@
 \NewDocumentCommand{\SetArbUp}{m}{\RenewDocumentCommand{\al at arbup}{m}{#1}}
 \DeclareDocumentCommand{\cap}{m}%
   {\luadirect{tex.sprint(cap(\luastringN{#1}))}}
+\let\Cap\cap
 \DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir
   TRT\arabicfont#1\egroup}
 \DeclareDocumentCommand{\txtrans}{+m}{\bgroup\textdir

Modified: trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua	2017-04-10 21:55:58 UTC (rev 43738)
+++ trunk/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua	2017-04-10 22:02:09 UTC (rev 43739)
@@ -328,13 +328,15 @@
    {a="([%_]?[Uu])(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])", b="u%2%3"},
    {a="([%_]?[Ii])(%s)([%(%[%|%<]?['][%_%^%.]?[l'btjghxdrzs`fqkmnwy][%-l])", b="i%2%3"},
    {a="%-%-", b=""},
-   {a="iyyaT$", b="īyaT"},
-   {a="iyyaT(%W)", b="īyaT%1"},
-   {a="iyy$", b="ī"},
-   {a="iyy(%W)", b="ī%1"},
---   {a="T([^uai])", b="%1"},
+   {a="iyyaT(%p?)$", b="īyaT%1"},
+   {a="iyyaT(%p?%s)", b="īyaT%1"},
+   {a="iyy(%p?)$", b="ī%1"},
+   {a="iyy(%p?%s)", b="ī%1"},
+   --   {a="T([^uai])", b="%1"},
+   {a="T(\\arbup)", b="t%1"},
    {a="([a%'][%_%^%.]?[tdrzsln]%-)(%S-)T([%(%[%|%<%s])(a[%_%^%.]?[tdrzsln]%-)", b="%1%2h%3%4"}, --p
    {a="T([%(%[%|%<%s])(a[%_%^%.]?[tdrzsln]%-)", b="t%1%2"}, --p
+   {a="T([%|\"])", b="t%1"},
    {a="T(%p?%s)", b="h%1"},
    {a="T(%p?)$", b="h%1"},
    {a="T(%p?)(%W)", b="h%1%2"},
@@ -551,15 +553,15 @@
    {a="(%s)([uai])", b="%1%2"}, -- initial alif without hamza
    {a="%-%-", b=""},
    {a="uww", b="ūw"},
-   {a="iyy$", b="ī"},
-   {a="iyy(%W)", b="ī%1"},
+   {a="iyy(%p?)$", b="ī%1"},
+   {a="iyy(%p?%s)", b="ī%1"},
    {a="iyy", b="īy"},
    {a="([tkdsg])(h)", b="%1'%2"},
    --   {a="T([^uai])", b="h%1"},
    {a="([a%']l%-)(%S-)T([%(%[%|%<%s])(al%-)", b="%1%2h%3%4"}, --p
    {a="T([%(%[%|%<%s])(al%-)", b="t%1%2"}, --p
-   {a="T$", b="h"},
-   {a="T(%W)", b="h%1"},
+   {a="T(%p?)$", b="h%1"},
+   {a="T(%p?%s)", b="h%1"},
    {a="_t", b="th"},
    {a="%^g", b="j"},
    {a="%.h", b="ḥ"},
@@ -629,10 +631,78 @@
 
 -- arabica
 
+hamzatrarabica = { -- ≠ from hamzatrloc: initial hamza has to be held
+   -- hard coded hamza
+   {a="|\"'", b="ʾ"},
+   {a="A\"'", b="ʾA"},
+   {a="[au]\"'", b="ʾ"},
+   {a="w\"'", b="ʾ"},
+   {a="i\"'", b="ʾ"},
+   {a="y\"'", b="ʾ"},
+   -- hamza takes tašdīd too
+   {a="''([Uu])", b="ʾʾ%1"},
+   {a="''([Aa])", b="ʾʾ%1"},
+   {a="''([Ii])", b="ʾʾ%1"},
+   -- initial long u and i (for a, see below)
+   {a="%'%_U", b="U"},
+   {a="%'%_I", b="I"},
+   -- taḫfīfu 'l-hamza
+   {a="^'u'([^uaiUAI])", b="U%1"},
+   {a="(%W)'u'([^uaiUAI])", b="%1U%2"},
+   {a="'u'([^uaiUAI])", b="ʾU"},
+   {a="^'i'([^uaiUAI])", b="I%1"},
+   {a="(%W)'i'([^uaiUAI])", b="%1I%2"},
+   {a="'i'([^uaiUAI])", b="ʾI"},
+   -- madda (historic writing below)
+   {a="^(')(A)", b="%2"},
+   {a="(%W)(')(A)", b="%1%3"},
+   {a="^'a'([^uaiUAI])", b="A%1"},
+   {a="(%W)'a'([^uaiUAI])", b="%1A%2"},
+   {a="'a'([^uaiUAI])", b="A%1"},
+   {a="^'a?A", b="A"},
+   {a="(%W)'a?A", b="%1A"},
+   {a="'a?A", b="ʾA"},
+   {a="(A)(')(i)$", b="%1ʾ%3"},
+   {a="(A)(')(i)(%W)", b="%1ʾ%3%4"},
+   {a="(A)(')(i)", b="%1ʾ%3"}, -- historic madda
+   {a="(A)(')", b="%1ʾ"}, -- historic madda
+   -- initial (needs both ^ and %W patterns):
+   -- hold it for now (see below, beginning of digraphs table)
+   {a="^(')([ua])", b="@%2"},
+   {a="^(')(i)", b="@%2"},
+   {a="(%W)(')([ua])", b="%1@%3"},
+   {a="(%W)(')(i)", b="%1@%3"},
+   -- final
+   {a="([Iy])(')(aN)$", b="%1ʾ%3"},
+   {a="([Iy])(')(aN)(%W)", b="%1ʾ%3%4"},
+   {a="([^uai])(')([uai]N?)$", b="%1ʾ%3"},
+   {a="([^uai])(')([uai]N?)(%W)", b="%1ʾ%3%4"},
+   {a="([UI])(')([uai])$", b="%1ʾ%3"},
+   {a="([UI])(')([uai])(%W)", b="%1ʾ%3%4"},
+   -- middle
+   {a="(U)(')", b="%1ʾ"},
+   {a="([Iy])(')", b="%1ʾ"},
+   {a="([^uai])(')([uU])", b="%1ʾ%3"},
+   {a="([^uai])(')([aA])", b="%1ʾ%3"},
+   {a="([^uai])(')([iI])", b="%1ʾ%3"},
+   {a="(u)(')([uU])", b="%1ʾ%3"},
+   {a="(u)(')([aA])", b="%1ʾ%3"},
+   {a="(u)(')([iI])", b="%1ʾ%3"},
+   {a="(a)(')([aA])", b="%1ʾ%3"},
+   {a="(a)(')([uU])", b="%1ʾ%3"},
+   {a="(a)(')([iI])", b="%1ʾ%3"},
+   {a="(i)(')([aA])", b="%1ʾ%3"},
+   {a="(i)(')([uU])", b="%1ʾ%3"},
+   {a="(i)(')([iI])", b="%1ʾ%3"},
+   {a="(a)(')([^uaiUAI])", b="%1ʾ%3"},
+   {a="(u)(')([^uaiUAI])", b="%1ʾ%3"},
+   {a="(i)(')([^uaiUAI])", b="%1ʾ%3"}
+}
+
 trigraphstrarabica = { -- trigraphs or more
    -- 'llatI / 'llad_I
    {a="^'ll(a)([%_]?[dt])", b="ll%1%2"},
-   {a="([%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1ll%2%3"}, --p
+   {a="([%-%(%[%|%<%s])'ll(a)([%_]?[dt])", b="%1ll%2%3"}, --p
    -- al- + lām
    {a="^(a)l%-(l)", b="%1l-%2"},
    {a="(%s)(a)l%-(l)", b="%1%2l-%3"},
@@ -680,6 +750,8 @@
 }
 
 digraphstrarabica = {
+   {a="([uai]%-)(\"?[uai])", b="%1"}, -- hyphen + initial alif without hamza
+   {a="@", b=""}, -- remove the tag before the former hamza
    -- discard the ʾiʿrāb hyphen (begin)
    {a="(%-)(\"?[UI]na)(%p?%s)", b="%2%3"},
    {a="(%-)(\"?[UI]na)(%p?)$", b="%2%3"},
@@ -696,13 +768,13 @@
    {a="^(\"?[uai])", b="%1"},      -- initial alif without hamza
    {a="(%s)([uai])", b="%1%2"}, -- initial alif without hamza
    {a="%-%-", b=""},
-   {a="iyy$", b="ī"},
-   {a="iyy(%W)", b="ī%1"},
+   {a="iyy(%p?)$", b="ī%1"},
+   {a="iyy(%p?%s)", b="ī%1"},
    --   {a="T([^uai])", b="h%1"},
    {a="([a%']l%-)(%S-)aT([%(%[%|%<%s])(al%-)", b="%1%2a%3%4"}, --p
    {a="aT([%(%[%|%<%s])(al%-)", b="at%1%2"}, --p
-   {a="aT$", b="a"},
-   {a="aT(%W)", b="a%1"},
+   {a="aT(%p?)$", b="a%1"},
+   {a="aT(%p?%s)", b="a%1"},
    {a="_t", b="ṯ"},
    {a="%^g", b="ğ"},
    {a="%.h", b="ḥ"},
@@ -753,3 +825,8 @@
    {a="B", b=""}
 }
 
+longvtrarabica = {
+   {a="[AY]", b="ā"},
+   {a="U", b="ū"},
+   {a="I", b="ī"}
+}



More information about the tex-live-commits mailing list