summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-09 22:01:37 +0000
committerKarl Berry <karl@freefriends.org>2021-02-09 22:01:37 +0000
commit48b3bc41d0b91de1472734c786a3506067fc99c1 (patch)
tree0be93741d0f22369f02e567ef83a01c0cee665f5 /Master/texmf-dist/tex/latex
parentfe491675252d9e6fe3ae6b1c67b198daed5cf936 (diff)
texnegar (9feb21)
git-svn-id: svn://tug.org/texlive/trunk@57692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua31
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex2
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua4
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex3
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua52
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty2
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex2
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty2
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar.lua4
-rw-r--r--Master/texmf-dist/tex/latex/texnegar/texnegar.sty2
10 files changed, 73 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua b/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
index 64ba467ee45..c1c7fe3ade6 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
@@ -16,8 +16,8 @@
-- local texnegar_char_table = texnegar_char_table
-- texnegar_char_table.module = {
-- name = "texnegar_char_table",
--- version = "0.1d",
--- date = "2021-01-31",
+-- version = "0.1e",
+-- date = "2021-02-09",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -30,6 +30,31 @@
-- texnegar_char_table.warning = warn or (function (s) luatexbase.module_warning("texnegar_char_table", s) end)
-- texnegar_char_table.error = err or (function (s) luatexbase.module_error("texnegar_char_table", s) end)
+local peCharTableDiacritic = {
+ [1611] = utf8.char(1611), -- "ً", utf8.codepoint("ً") == 1611, "\u{064B}", ARABIC-FATHATAN
+ [1612] = utf8.char(1612), -- "ٌ", utf8.codepoint("ٌ") == 1612, "\u{064C}", ARABIC-DAMMATAN
+ [1613] = utf8.char(1613), -- "ٍ", utf8.codepoint("ٍ") == 1613, "\u{064D}", ARABIC-KASRATAN
+ [1614] = utf8.char(1614), -- "َ", utf8.codepoint("َ") == 1614, "\u{064E}", ARABIC-FATHA
+ [1615] = utf8.char(1615), -- "ُ", utf8.codepoint("ُ") == 1615, "\u{064F}", ARABIC-DAMMA
+ [1616] = utf8.char(1616), -- "ِ", utf8.codepoint("ِ") == 1616, "\u{0650}", ARABIC-KASRA
+ [1617] = utf8.char(1617), -- "ّ", utf8.codepoint("ّ") == 1617, "\u{0651}", ARABIC-SHADDA
+ [1618] = utf8.char(1618), -- "ْ", utf8.codepoint("ْ") == 1618, "\u{0652}", ARABIC-SUKUN
+ [1619] = utf8.char(1619), -- "ٓ", utf8.codepoint("ٓ") == 1619, "\u{0653}", ARABIC-MADDA ABOVE
+ [1620] = utf8.char(1620), -- "ٔ", utf8.codepoint("ٔ") == 1620, "\u{0654}", ARABIC-HAMZA ABOVE
+ [1621] = utf8.char(1621), -- "ٕ", utf8.codepoint("ٕ") == 1621, "\u{0655}", ARABIC-HAMZA BELOW
+ [1622] = utf8.char(1622), -- "ٖ", utf8.codepoint("ٖ") == 1622, "\u{0656}", ARABIC-SUBSCRIPT ALEF
+ [1623] = utf8.char(1623), -- "ٗ", utf8.codepoint("ٗ") == 1623, "\u{0657}", ARABIC-INVERTED DAMMA
+ [1624] = utf8.char(1624), -- "٘", utf8.codepoint("٘") == 1624, "\u{0658}", ARABIC-MARK NOON GHUNNA
+ [1625] = utf8.char(1625), -- "ٙ", utf8.codepoint("ٙ") == 1625, "\u{0659}", ARABIC-ZWARAKAY
+ [1648] = utf8.char(1648), -- "", utf8.codepoint("") == 1648, "\u{0670}", ARABIC-SUPERSCRIPT ALEF
+ [64606] = utf8.char(64606), -- "", utf8.codepoint("") == 64606, "\u{FC5E}", ARABIC-LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM
+ [64607] = utf8.char(64607), -- "", utf8.codepoint("") == 64607, "\u{FC5F}", ARABIC-LIGATURE SHADDA WITH KASRATAN ISOLATED FORM
+ [64608] = utf8.char(64608), -- "", utf8.codepoint("") == 64608, "\u{FC60}", ARABIC-LIGATURE SHADDA WITH FATHA ISOLATED FORM
+ [64609] = utf8.char(64609), -- "", utf8.codepoint("") == 64609, "\u{FC61}", ARABIC-LIGATURE SHADDA WITH DAMMA ISOLATED FORM
+ [64610] = utf8.char(64610), -- "", utf8.codepoint("") == 64610, "\u{FC62}", ARABIC-LIGATURE SHADDA WITH KASRA ISOLATED FORM
+ [64611] = utf8.char(64611), -- "", utf8.codepoint("") == 64611, "\u{FC63}", ARABIC-LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM
+}
+
local peCharTableDigit = {
[1632] = utf8.char(1632), -- "٠", utf8.codepoint("٠") == 1632, "\u{0660}", ARABIC-INDIC DIGIT ZERO
[1633] = utf8.char(1633), -- "١", utf8.codepoint("١") == 1633, "\u{0661}", ARABIC-INDIC DIGIT ONE
@@ -212,7 +237,7 @@ local peCharTableFinal = {
[65276] = utf8.char(65276), -- "ﻼ", utf8.codepoint("ﻼ") == 65276, "\u{FEFC}", FINAL FORM LIGATURE LAM WITH ALEF
}
-return peCharTableInitial, peCharTableMedial, peCharTableFinal
+return peCharTableInitial, peCharTableMedial, peCharTableFinal, peCharTableDiacritic
--
--
-- End of file `texnegar-char-table.lua'.
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex b/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
index 7f68e2dd9a8..509fac80f29 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
@@ -12,7 +12,7 @@
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
-\ProvidesExplFile {texnegar-common-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-common-kashida.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\bool_if:NT \l_texnegar_ligature_bool
{
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua b/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
index 18b711294be..457de8b2b93 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
@@ -16,8 +16,8 @@
-- local texnegar_ini = texnegar_ini
-- texnegar_ini.module = {
-- name = "texnegar_ini",
--- version = "0.1d",
--- date = "2021-01-31",
+-- version = "0.1e",
+-- date = "2021-02-09",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex b/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
index 659b2988af8..18a501e622c 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
@@ -12,7 +12,7 @@
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
-\ProvidesExplFile {texnegar-ini.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-ini.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\def\TeXNegar{\TeX Negar}
@@ -447,6 +447,7 @@
\bool_if:NF \l_texnegar_minimal_bool
{
+ \directlua{dofile(kpse.find_file("luatex-tools.lua"))}
\input texnegar-luabidi.tex
}
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua b/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
index 9761462210e..a6f2fc97feb 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
@@ -16,8 +16,8 @@
-- local texnegar_luatex_kashida = texnegar_luatex_kashida
-- texnegar_luatex_kashida.module = {
-- name = "texnegar_luatex_kashida",
--- version = "0.1d",
--- date = "2021-01-31",
+-- version = "0.1e",
+-- date = "2021-02-09",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
@@ -30,7 +30,7 @@
-- texnegar_luatex_kashida.warning = warn or (function (s) luatexbase.module_warning("texnegar_luatex_kashida", s) end)
-- texnegar_luatex_kashida.error = err or (function (s) luatexbase.module_error("texnegar_luatex_kashida", s) end)
-local peCharTableInitial, peCharTableMedial, peCharTableFinal = dofile(kpse.find_file("texnegar-char-table.lua"))
+local peCharTableInitial, peCharTableMedial, peCharTableFinal, peCharTableDiacritic = dofile(kpse.find_file("texnegar-char-table.lua"))
local kashida_unicode = 1600
local kashida_subtype = 256
@@ -41,6 +41,7 @@ local GLUE = node_id("glue")
local GLYPH = node_id("glyph")
local HLIST = node_id("hlist")
local RULE = node_id("rule")
+local VLIST = node_id("vlist")
local WHATSIT = node_id("whatsit")
local l_texnegar_kashida_glyph_bool = token.create("l_texnegar_kashida_glyph_bool")
@@ -143,11 +144,11 @@ function ProcessTableKashidaHlist(ksh_hlistNode, hbox_num, in_font)
local tn_id = tn.id
local tn_subtype = tn.subtype
- if tn_id == 0 then
+ if tn_id == HLIST then
for tp in node.traverse(tn.head) do
local tp_id = tp.id
local tp_subtype = tp.subtype
- if tp_id == 29 then
+ if tp_id == GLYPH then
if l_texnegar_color_bool.mode == c_true_bool.mode then
local col_str = color_tbl[1] .. " " .. color_tbl[2] .. " " .. color_tbl[3]
local col_str_rg = col_str .. " rg "
@@ -179,17 +180,17 @@ function ProcessTableKashidaHlist(ksh_hlistNode, hbox_num, in_font)
tn_width = tn.width
ksh_hlistNode.width = tn_width
end
- elseif tp_id == 0 then
+ elseif tp_id == HLIST then
if tp.subtype ~= 3 then
tbl_kashida_hlist_nodes[ #tbl_kashida_hlist_nodes + 1 ] = tp
end
end
end
- elseif tn_id == 1 then
+ elseif tn_id == VLIST then
do end
- elseif tn_id == 8 then
+ elseif tn_id == WHATSIT then
do end
- elseif tn_id == 29 then
+ elseif tn_id == GLYPH then
if l_texnegar_color_bool.mode == c_true_bool.mode then
local col_str = color_tbl[1] .. " " .. color_tbl[2] .. " " .. color_tbl[3]
local col_str_rg = col_str .. " rg "
@@ -305,13 +306,28 @@ function StretchGlyph(t_plb_node, t_plb_glyph_node, t_gluePerJoiner, t_dir, t_fi
node_glue.leader.dir = t_dir
- node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue)
+ local t_plb_glyph_node_next = t_plb_glyph_node.next
+ local t_plb_glyph_node_next_id = t_plb_glyph_node_next.id
+ if not t_plb_glyph_node_next then
+ node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue)
+ else
+ if t_plb_glyph_node_next_id == GLYPH then
+ local t_plb_glyph_node_next_char = t_plb_glyph_node_next.char
+ if peCharTableDiacritic[t_plb_glyph_node_next_char] then
+ node.insert_after(t_plb_node.list, t_plb_glyph_node_next, node_glue)
+ else
+ node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue)
+ end
+ else
+ node.insert_after(t_plb_node.list, t_plb_glyph_node, node_glue)
+ end
+ end
if t_filler == "leaders+hrule" then
for tn in node.traverse(t_plb_node.head) do
local tn_id = tn.id
local tn_subtype = tn.subtype
- if tn_id == 12 and tn_subtype == 100 then
+ if tn_id == GLUE and tn_subtype == 100 then
local t_hbox = node.new(HLIST)
local t_hrule = node.copy(tn)
@@ -355,20 +371,20 @@ function GetFillerSpec(t_plb_node, t_plb_head_node, t_tbl_line_fields, t_CharTab
for p in node.traverse(t_plb_head_node) do
local p_id = p.id
local p_subtype = p.subtype
- if p_id == 0 then
+ if p_id == HLIST then
t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - p.width
if p.subtype ~= 3 then
tbl_hlist_nodes[ #tbl_hlist_nodes + 1 ] = p
end
- elseif p_id == 1 then
+ elseif p_id == VLIST then
t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - p.width
tbl_vlist_nodes[ #tbl_vlist_nodes + 1 ] = p
- elseif p_id == 12 then
+ elseif p_id == GLUE then
tbl_p_glue = GetGlue(p, t_plb_node)
t_tbl_line_fields.lineWidthRemainder = t_tbl_line_fields.lineWidthRemainder - tbl_p_glue["effective_glue"]
t_tbl_line_fields.total_glues = t_tbl_line_fields.total_glues + 1
t_tbl_line_fields.stretchedGlue = t_tbl_line_fields.stretchedGlue + tbl_p_glue["delta"]
- elseif p_id == 29 then
+ elseif p_id == GLYPH then
tbl_p_glyph, t_tbl_line_fields = GetGlyph(p, t_tbl_line_fields, t_CharTableInitial, t_CharTableMedial, t_CharTableFinal)
selected_font_old = selected_font
selected_font = tbl_p_glyph["font"]
@@ -405,7 +421,7 @@ function ProcessTableHlist(tmphl_n)
local tbl_p_glue, tbl_p_glyph
- if (tmphl_n_id == 0) and (tmphl_n_subtype == 1 or tmphl_n_subtype == 2) then
+ if (tmphl_n_id == HLIST) and (tmphl_n_subtype == 1 or tmphl_n_subtype == 2) then
tbl_line_fields.line_width = tmphl_n.width
tbl_line_fields.line_dir = tmphl_n.dir
tbl_line_fields.lineWidthRemainder = tbl_line_fields.line_width
@@ -470,9 +486,9 @@ function ProcessTableVlist(tmpvl_n)
local tmpvl_n_subtype = tmpvl_n.subtype
for vbNode in node.traverse(tmpvl_n) do
- if vbNode.id == 1 and vbNode.subtype == 0 then
+ if vbNode.id == VLIST and vbNode.subtype == 0 then
for tr_vbNode in node.traverse(vbNode.head) do
- if (tr_vbNode.id == 0) and (tr_vbNode.subtype == 1 or tr_vbNode.subtype == 2) then
+ if (tr_vbNode.id == HLIST) and (tr_vbNode.subtype == 1 or tr_vbNode.subtype == 2) then
ProcessTableHlist(tr_vbNode)
end
end
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty b/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
index 8490d2a5f11..70240a4478f 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
@@ -12,7 +12,7 @@
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
-\ProvidesExplPackage {texnegar-luatex} {2021-01-31} {0.1d} { Full implementation of kashida feature in xetex and luatex }
+\ProvidesExplPackage {texnegar-luatex} {2021-02-09} {0.1e} { Full implementation of kashida feature in xetex and luatex }
\tex_input:D { texnegar-ini.tex }
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex b/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
index 6e2d4d25b15..52d56f216fd 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
@@ -12,7 +12,7 @@
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
-\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplFile {texnegar-xetex-kashida.tex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\newXeTeXintercharclass \c_texnegar_d_charclass % dual-joiner class
\newXeTeXintercharclass \c_texnegar_l_charclass % lam
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty b/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
index e2c6f8710d1..2e27bdf3a2a 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
@@ -13,7 +13,7 @@
%% this license is at: http://www.latex-project.org/lppl.txt
%%
\RequirePackage{zref-savepos}[2020-03-03]
-\ProvidesExplPackage {texnegar-xetex} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplPackage {texnegar-xetex} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\tex_input:D { texnegar-ini.tex }
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar.lua b/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
index 2c9ee7897b0..5a9a428d4d7 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
@@ -16,8 +16,8 @@
-- local texnegar = texnegar
-- texnegar.module = {
-- name = "texnegar",
--- version = "0.1d",
--- date = "2021-01-31",
+-- version = "0.1e",
+-- date = "2021-02-09",
-- description = "Full implementation of kashida feature in XeLaTex and LuaLaTeX",
-- author = "Hossein Movahhedian",
-- copyright = "Hossein Movahhedian",
diff --git a/Master/texmf-dist/tex/latex/texnegar/texnegar.sty b/Master/texmf-dist/tex/latex/texnegar/texnegar.sty
index b1dfe7f0d3a..a95b7497079 100644
--- a/Master/texmf-dist/tex/latex/texnegar/texnegar.sty
+++ b/Master/texmf-dist/tex/latex/texnegar/texnegar.sty
@@ -21,7 +21,7 @@
\RequirePackage{newverbs}[2010/09/02]
\RequirePackage{environ}[2014/05/04]
-\ProvidesExplPackage {texnegar} {2021-01-31} {0.1d} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
+\ProvidesExplPackage {texnegar} {2021-02-09} {0.1e} { Full implementation of kashida feature in XeLaTex and LuaLaTeX }
\sys_if_engine_luatex:T
{