texlive[57692] Master/texmf-dist: texnegar (9feb21)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 9 23:01:38 CET 2021


Revision: 57692
          http://tug.org/svn/texlive?view=revision&revision=57692
Author:   karl
Date:     2021-02-09 23:01:37 +0100 (Tue, 09 Feb 2021)
Log Message:
-----------
texnegar (9feb21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/texnegar.pdf
    trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
    trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
    trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/INSTALL.txt	2021-02-09 22:01:37 UTC (rev 57692)
@@ -1,7 +1,7 @@
   texnegar -- INSTALL
 ======================
 
-    Source:  texnegar.dtx (2021-01-31 v0.1d)
+    Source:  texnegar.dtx (2021-02-09 v0.1e)
     Author:  Hossein Movahhedian
     Info:    filecontents + macro + verbatim
     License: LPPL 1.3c

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-texnegar.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-ligature-xep.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/doc-samples-xep.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx
===================================================================
--- trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-doc.ltx	2021-02-09 22:01:37 UTC (rev 57692)
@@ -63,7 +63,7 @@
    }
 }
 
-\date{Released \quad 2021-01-31 \quad v0.1d}
+\date{Released \quad 2021-02-09 \quad v0.1e}
 
 \definecolor{HMhighlightBlueI}{rgb}{0,0,1}
 \definecolor{HMhighlightbgYellowII}{rgb}{1,1,1}
@@ -535,6 +535,12 @@
         fonts other than \textsf{HM Series} and \textsf{Adobe Arab}.
 \end{Itemize}
 
+\SubSecItem{2021-02-09~v0.1e}
+\begin{Itemize}
+  \item Fixed the problem of inserting the kashida before the diacritical marks. Now, after stretching,
+        the diacritical marks appear before kashida.
+\end{Itemize}
+
 \section*{To Do's}
 
 To do

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

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-luatex-leaders-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-bidi-leaders-hrule.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-glyph.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/texnegar-xetex-xepersian-leaders-hrule.pdf
===================================================================
(Binary files differ)

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

Modified: trunk/Master/texmf-dist/doc/latex/texnegar/xepersian-XB.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/source/latex/texnegar/texnegar.dtx	2021-02-09 22:01:37 UTC (rev 57692)
@@ -101,7 +101,7 @@
 %    }^^A
 % }
 %
-% \date{Released \quad 2021-01-31 \quad v0.1d}
+% \date{Released \quad 2021-02-09 \quad v0.1e}
 %
 % \maketitle
 %
@@ -137,7 +137,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
   {
@@ -165,7 +165,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-luatex-sty>
-\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 }
 
@@ -201,7 +201,7 @@
 %    \begin{macrocode}
 %<*texnegar-xetex-sty>
 \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 }
 
@@ -218,7 +218,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-ini-tex>
-\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}
 
@@ -653,6 +653,7 @@
 
 \bool_if:NF \l_texnegar_minimal_bool
   {
+    \directlua{dofile(kpse.find_file("luatex-tools.lua"))}
     \input texnegar-luabidi.tex
   }
 
@@ -663,7 +664,7 @@
 % \subsection{File: \texttt{texnegar-common-kashida.tex}}
 %    \begin{macrocode}
 %<*texnegar-common-kashida-tex>
-\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
 {
@@ -740,7 +741,7 @@
 %
 %    \begin{macrocode}
 %<*texnegar-xetex-kashida-tex>
-\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
@@ -961,8 +962,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",
@@ -975,6 +976,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
@@ -1157,7 +1183,7 @@
   [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'.
@@ -1186,8 +1212,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",
@@ -1338,8 +1364,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",
@@ -1392,8 +1418,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",
@@ -1406,7 +1432,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
@@ -1417,6 +1443,7 @@
 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")
@@ -1519,11 +1546,11 @@
         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 "
@@ -1555,17 +1582,17 @@
                         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 "
@@ -1681,13 +1708,28 @@
 
     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)
 
@@ -1731,20 +1773,20 @@
     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"]
@@ -1781,7 +1823,7 @@
 
     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
@@ -1846,9 +1888,9 @@
     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

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-char-table.lua	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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 @@
   [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'.

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-common-kashida.tex	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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
 {

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.lua	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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",

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-ini.tex	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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
   }
 

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex-kashida.lua	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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 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 @@
         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 @@
                         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 @@
 
     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 @@
     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 @@
 
     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 @@
     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

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-luatex.sty	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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 }
 

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex-kashida.tex	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar-xetex.sty	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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 }
 

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.lua	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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",

Modified: trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty	2021-02-09 22:01:07 UTC (rev 57691)
+++ trunk/Master/texmf-dist/tex/latex/texnegar/texnegar.sty	2021-02-09 22:01:37 UTC (rev 57692)
@@ -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
   {



More information about the tex-live-commits mailing list.