summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/arabluatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-04 23:45:57 +0000
committerKarl Berry <karl@freefriends.org>2018-01-04 23:45:57 +0000
commit196751def71387e14be5101a1953d0add736328e (patch)
treebc82db3a8a8749565abe1f2692573ccfc5d716c3 /Master/texmf-dist/tex/lualatex/arabluatex
parent493c985399debe97d5052f70079307d67d99b080 (diff)
arabluatex (4jan18)
git-svn-id: svn://tug.org/texlive/trunk@46217 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/arabluatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty2
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua64
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty12
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua2
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua49
-rw-r--r--Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua2
7 files changed, 105 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty
index 410924e409c..2491d3409f4 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex-patch.sty
@@ -11,7 +11,7 @@
%% This file is part of the `arabluatex' package
%%
%% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-%% Copyright (C) 2016--2017 Robert Alessi
+%% Copyright (C) 2016--2018 Robert Alessi
%%
%% Please send error reports and suggestions for improvements to Robert
%% Alessi <alessi@robertalessi.net>
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
index f6890edc432..2466093824c 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.lua
@@ -2,7 +2,7 @@
This file is part of the `arabluatex' package
ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-Copyright (C) 2016--2017 Robert Alessi
+Copyright (C) 2016--2018 Robert Alessi
Please send error reports and suggestions for improvements to Robert
Alessi <alessi@robertalessi.net>
@@ -192,10 +192,10 @@ 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")
+ body = string.gsub(body, "(\\uc%s?)(%b{})", "\\Uc%2")
return string.format("%s{%s}", tag, body)
end)
- str = string.gsub(str, "(\\cap.?)(%b{})", function(tag, body)
+ str = string.gsub(str, "(\\uc.?)(%b{})", function(tag, body)
body = string.sub(body, 2, -2)
return string.format("%s", body)
end)
@@ -665,25 +665,55 @@ function processtrans(str, mode, rules, scheme)
return str
end
-function cap(str)
+function uc(str)
str = string.gsub(str, "(\\txtrans.?)(%b{})", function(tag, body)
body = string.sub(body, 2, -2)
return string.format("%s", body)
end)
- if string.find(str, "[^\\]%-['`ʾʿ]") then
- str = string.gsub(str, "([^\\]%-['`])", "%1\\MakeUppercase ")
- str = string.gsub(str, "([^\\]%-ʿ)", "%1\\MakeUppercase ")
- str = string.gsub(str, "([^\\]%-ʾ)", "%1\\MakeUppercase ")
- elseif string.find(str, "[^\\]%-[^'`ʾʿ]") then
- str = string.gsub(str, "([^\\]%-)", "%1\\MakeUppercase ")
- elseif string.find(str, "^['`ʾʿ]") then
- str = string.gsub(str, "^(['`])", "%1\\MakeUppercase ")
- str = string.gsub(str, "^(ʿ)", "%1\\MakeUppercase ")
- str = string.gsub(str, "^(ʾ)", "%1\\MakeUppercase ")
- else
- str = "\\MakeUppercase "..str
+ str = string.gsub(str, "(%s[%(%<%[]?)(bn)", "%1{%2}")
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^([%S]-%-[`']?)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-[`']?)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^([%S]-%-ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^([%S]-%-ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)([%S]-%-ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^([`'])"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)([`'])"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^(ʾ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)(ʾ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^(ʿ)"..lcuc[i].a, "{%1"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)(ʿ)"..lcuc[i].a, "%1{%2"..lcuc[i].b.."}")
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "^"..lcuc[i].a, lcuc[i].b)
+ end
+ for i = 1,#lcuc do
+ str = string.gsub(str, "(%s[%(%<%[]?)"..lcuc[i].a, "%1"..lcuc[i].b)
end
-return "\\txtrans{"..str.."}"
+ return "\\txtrans{"..str.."}"
end
-- this function is adapted from an 'obsolete project' of Khaled
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
index e5a687c4f0e..6080ea096f9 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex.sty
@@ -11,7 +11,7 @@
%% This file is part of the `arabluatex' package
%%
%% ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-%% Copyright (C) 2016--2017 Robert Alessi
+%% Copyright (C) 2016--2018 Robert Alessi
%%
%% Please send error reports and suggestions for improvements to Robert
%% Alessi <alessi@robertalessi.net>
@@ -41,7 +41,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{arabluatex}%
-[2017/10/24 v1.9.2 An ArabTeX-like interface for LuaLaTeX]
+[2018/01/03 v1.10 An ArabTeX-like interface for LuaLaTeX]
\RequirePackage{ifluatex}
\ifluatex\else
\PackageError{arabluatex}{lualatex needed}{%
@@ -118,9 +118,11 @@
\NewDocumentCommand{\ArbUpDflt}{}{\let\al@arbup=\al@arbup@dflt}
\NewDocumentCommand{\NoArbUp}{}{\RenewDocumentCommand{\al@arbup}{m}{##1}}
\NewDocumentCommand{\SetArbUp}{m}{\RenewDocumentCommand{\al@arbup}{m}{#1}}
-\DeclareDocumentCommand{\cap}{m}%
- {\luadirect{tex.sprint(cap(\luastringN{#1}))}}
-\let\Cap\cap
+\NewDocumentCommand{\uc}{m}%
+ {\luadirect{tex.sprint(uc(\luastringN{#1}))}}
+\let\Uc\uc
+\NewDocumentCommand{\prname}{m}{%
+ \bgroup\SetTranslitStyle{\relax}\arb[trans]{\uc{#1}}\egroup}
\DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir
TRT\arabicfont#1\egroup}
\DeclareDocumentCommand{\txtrans}{+m}{\bgroup\textdir
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
index 769b8416b9a..77d95e38408 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_fullvoc.lua
@@ -2,7 +2,7 @@
This file is part of the `arabluatex' package
ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-Copyright (C) 2016--2017 Robert Alessi
+Copyright (C) 2016--2018 Robert Alessi
Please send error reports and suggestions for improvements to Robert
Alessi <alessi@robertalessi.net>
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua
index 77f6568fe40..0bbd6adb112 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_novoc.lua
@@ -2,7 +2,7 @@
This file is part of the `arabluatex' package
ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-Copyright (C) 2016--2017 Robert Alessi
+Copyright (C) 2016--2018 Robert Alessi
Please send error reports and suggestions for improvements to Robert
Alessi <alessi@robertalessi.net>
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
index 0f9043efc68..86a55b0bf2f 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_trans.lua
@@ -2,7 +2,7 @@
This file is part of the `arabluatex' package
ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-Copyright (C) 2016--2017 Robert Alessi
+Copyright (C) 2016--2018 Robert Alessi
Please send error reports and suggestions for improvements to Robert
Alessi <alessi@robertalessi.net>
@@ -35,7 +35,7 @@ nulltr = {
{a="[%^%_](.)", b="<??>%1"}
}
--- cap
+-- cap (legacy)
captr = {
-- dmg (defaut); loc as well
{a="ā", b="Ā"},
@@ -69,6 +69,51 @@ captr = {
{a="ī", b="Ī"}
}
+-- uc
+lcuc = {
+ {a="b", b="B"},
+ {a="t", b="T"},
+ {a="ṯ", b="Ṯ"},
+ {a="ǧ", b="Ǧ"},
+ {a="j", b="J"},
+ {a="ḥ", b="Ḥ"},
+ {a="ḫ", b="Ḫ"},
+ {a="d", b="D"},
+ {a="ḏ", b="Ḏ"},
+ {a="r", b="R"},
+ {a="z", b="Z"},
+ {a="s", b="S"},
+ {a="š", b="Š"},
+ {a="ṣ", b="Ṣ"},
+ {a="ḍ", b="Ḍ"},
+ {a="ṭ", b="Ṭ"},
+ {a="ẓ", b="Ẓ"},
+ {a="ġ", b="Ġ"},
+ {a="f", b="F"},
+ {a="q", b="Q"},
+ {a="k", b="K"},
+ {a="l", b="L"},
+ {a="m", b="M"},
+ {a="n", b="N"},
+ {a="h", b="H"},
+ {a="w", b="W"},
+ {a="y", b="Y"},
+ {a="u", b="U"},
+ {a="a", b="A"},
+ {a="i", b="I"},
+ {a="ū", b="Ū"},
+ {a="ā", b="Ā"},
+ {a="ī", b="Ī"},
+ -- additional characters
+ {a="p", b="P"},
+ {a="č", b="Č"},
+ {a="ž", b="Ž"},
+ {a="v", b="V"},
+ {a="g", b="G"},
+ {a="ñ", b="Ñ"},
+ {a="ch", b="Ch"}, -- loc
+}
+
-- dmg
hamzatrdmg = {
diff --git a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
index 4d9473a4eed..a0108fec739 100644
--- a/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
+++ b/Master/texmf-dist/tex/lualatex/arabluatex/arabluatex_voc.lua
@@ -2,7 +2,7 @@
This file is part of the `arabluatex' package
ArabLuaTeX -- Processing ArabTeX notation under LuaLaTeX
-Copyright (C) 2016--2017 Robert Alessi
+Copyright (C) 2016--2018 Robert Alessi
Please send error reports and suggestions for improvements to Robert
Alessi <alessi@robertalessi.net>