texlive[64071] Master/texmf-dist: luatexja (7aug22)

commits+karl at tug.org commits+karl at tug.org
Sun Aug 7 23:41:57 CEST 2022


Revision: 64071
          http://tug.org/svn/texlive?view=revision&revision=64071
Author:   karl
Date:     2022-08-07 23:41:57 +0200 (Sun, 07 Aug 2022)
Log Message:
-----------
luatexja (7aug22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/luatexja/README
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-08-07 21:41:57 UTC (rev 64071)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20220703.0
+The LuaTeX-ja Package 20220807.0
 --------------------------------
 Copyright (c) 2011--2022 The LuaTeX-ja project
 License: modified BSD (see COPYING)
@@ -42,9 +42,9 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20220703.0 in the Git repository by
+      or tagged as 20220807.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20220703.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20220807.0;sf=tgz>
 
    b. Extract the archive and process following three files by LuaLaTeX
       to generate classes for Japanese typesetting:
@@ -93,4 +93,4 @@
   This file and ltj-kinsoku.lua are not used anymore.
   (Do not remove ltj-kinsoku.tex.)
 
-Last commit date: Sun Jul 3 11:15:41 2022 +0900
+Last commit date: Sun Aug 7 12:20:08 2022 +0900

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2022-08-07 21:41:57 UTC (rev 64071)
@@ -3019,8 +3019,8 @@
 %
    \put(4,7.2){\line(0,1){1.8}}
    \put(11,7.2){\line(0,1){1.8}}
-   \put(8,8){\vector(-1,0){0.5}\vector(1,0){3}}
-   \put(7,8){\vector(-1,0){3}\vector(1,0){0.5}}
+   \put(8,8){\vector(-1,0){0.5}}\put(8,8){\vector(1,0){3}}
+   \put(7,8){\vector(-1,0){3}}\put(7,8){\vector(1,0){0.5}}
    \put(9.25,8.2){\makebox(0,0)[b]{$H_{\mathrm{T}}$}}
    \put(5.75,8.2){\makebox(0,0)[b]{$D_{\mathrm{T}}$}}
 %
@@ -3044,7 +3044,7 @@
 %
    \put(4,7.2){\line(0,1){1.8}}
    \put(11,7.2){\line(0,1){1.8}}
-   \put(7.5,8){\vector(-1,0){3.5}\vector(1,0){3.5}}
+   \put(7.5,8){\vector(-1,0){3.5}}\put(7.5,8){\vector(1,0){3.5}}
    \put(13,8){\vector(-1,0){2}}
    \put(7.5,8.2){\makebox(0,0)[b]{$H_{\mathrm{D}}$}}
    \put(12,8.2){\makebox(0,0)[b]{$D_{\mathrm{D}}$}}
@@ -3063,7 +3063,7 @@
    \put(11.2,0){\line(1,0){3.8}}
 %
    \put(2,7){\line(1,0){1.8}}
-   \put(3,3.5){\vector(0,1){3.5}\vector(0,-1){3.5}}
+   \put(3,3.5){\vector(0,1){3.5}}\put(3,3.5){\vector(0,-1){3.5}}
    \put(2.8,3.5){\makebox(0,0)[r]{$H_{\mathrm{Y}}$}}
    \put(3,-2){\vector(0,1){2}}
    \put(2.8,-1){\makebox(0,0)[r]{$D_{\mathrm{Y}}$}}
@@ -3094,8 +3094,8 @@
 %
    \put(4,7.2){\line(0,1){1.8}}
    \put(11,7.2){\line(0,1){1.8}}
-   \put(6.5,8){\vector(-1,0){2.5}\vector(1,0){2.5}}
-   \put(10,8){\vector(-1,0){1}\vector(1,0){1}}
+   \put(6.5,8){\vector(-1,0){2.5}}\put(6.5,8){\vector(1,0){2.5}}
+   \put(10,8){\vector(-1,0){1}}\put(10,8){\vector(1,0){1}}
    \put(10,8.2){\makebox(0,0)[b]{$H_{\mathrm{T}}$}}
    \put(6.5,8.2){\makebox(0,0)[b]{$D_{\mathrm{T}}$}}
 %
@@ -3119,8 +3119,8 @@
 %
    \put(4,7.2){\line(0,1){1.8}}
    \put(11,7.2){\line(0,1){1.8}}
-   \put(5,8){\vector(-1,0){1}\vector(1,0){1}}
-   \put(8.5,8){\vector(-1,0){2.5}\vector(1,0){2.5}}
+   \put(5,8){\vector(-1,0){1}}\put(5,8){\vector(1,0){1}}
+   \put(8.5,8){\vector(-1,0){2.5}}\put(8.5,8){\vector(1,0){2.5}}
    \put(5,8.2){\makebox(0,0)[b]{$H_{\mathrm{D}}$}}
    \put(8.5,8.2){\makebox(0,0)[b]{$D_{\mathrm{D}}$}}
 %

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -514,7 +514,7 @@
   end  
   function ltjl.p_profile(before, after, mirrored, bw)
     local range, tls 
-      = init_range(), luatexja.adjust.profile_hgap_factor*tex.lineskip.width
+      = init_range(), luatexja.adjust.profile_hgap_factor*tex.get('lineskip', false)
     profile_inner(before, range, 3, true,     tls)
     profile_inner(after,  range, 4, mirrored, tls)
     range = range:flatten()
@@ -544,9 +544,9 @@
     end
     if dist < tex.lineskiplimit then
     local f = max(1, bw*ltja.step_factor)
-       copy_glue(g, tex.baselineskip, 1, normal - f * floor((dist-tex.lineskip.width)/f))
+       copy_glue(g, 'baselineskip', 1, normal - f * floor((dist-tex.get('lineskip', false))/f))
     else
-       copy_glue(g, tex.baselineskip, 2, normal)
+       copy_glue(g, 'baselineskip', 2, normal)
     end
   end
 end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty	2022-08-07 21:41:57 UTC (rev 64071)
@@ -103,7 +103,7 @@
 %% \ltj at gobble@glue <glue>
 %! 次に続くグルー値を(2 回展開で)読み捨てる. 
 \def\ltj at gobble@glue{
-  \directlua{token.scan_glue()}
+  \directlua{node.free(token.scan_glue())}
 }
 
 %% \ltj at gobble@dimen <dimen>

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -25,12 +25,12 @@
       num = -num; tex.write '-'
    end
    local s = ""
-   while num~=0 do
+   repeat
       s = utfchar(
          ltjs.get_stack_table(luatexja.stack_table_index.KSJ + num%10,
                                 '', tex.getcount 'ltj@@stack')) .. s
       num=math.floor(num/10)
-   end
+   until num==0
    tex.write(s)
 end
 

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -92,11 +92,12 @@
 
 local get_dir_count, get_adjust_dir_count
 do
+   local node_attr = node.has_attribute
    local function get_dir_count_inner(h)
       if h then
          if h.id==id_whatsit and h.subtype==sid_user and h.user_id==DIR then
-            return ((node.has_attribute(h, attr_icflag) or 0)<PROCESSED_BEGIN_FLAG)
-               and (node.has_attribute(h,attr_dir)%dir_node_auto) or 0
+            return ((node_attr(h, attr_icflag) or 0)<PROCESSED_BEGIN_FLAG)
+               and (node_attr(h,attr_dir)%dir_node_auto) or 0
          else
             return 0
          end
@@ -263,13 +264,12 @@
       return hd
    else
       local w = dir_pool[new_dir]()
-      setfield(w, 'next', hd)
       set_attr(w, attr_icflag, PROCESSED_BEGIN_FLAG)
       set_attr(hd, attr_icflag,
                get_attr_icflag(hd) + PROCESSED_BEGIN_FLAG)
       ensure_tex_attr(attr_icflag, 0)
       ensure_tex_attr(attr_dir, 0)
-      return w
+      return insert_before(hd, hd, w)
    end
 end
 
@@ -329,11 +329,12 @@
          end
       end
       if hd==wh[1] then
-         ltjs.list_dir =has_attr(hd,attr_dir)
+         ltjs.list_dir = has_attr(hd, attr_dir)
          local x = node_next(hd)
          while x and getid(x)==id_glue and getsubtype(x)==3 do
             node_remove(hd,x); node_free(x); x = node_next(hd)
          end
+         if #wh==1 then wh[1]=nil else wh[#wh], wh[1]=nil, wh[#wh] end
       end
       for i=1,#wh do
          hd = node_remove(hd, wh[i]); node_free(wh[i]); wh[i] = nil
@@ -344,17 +345,13 @@
             ensure_tex_attr(attr_icflag, 0)
          end
          return hd
-      else
+      elseif gc=='vtop' then
          local n = node_next(hd)
-         if gc=='vtop' then
-            local w = create_dir_whatsit(hd, gc, ltjs.list_dir)
-            -- move dir whatsit after hd
-            setfield(hd, 'next', w); setfield(w, 'next', n)
-            return hd
-         else
-            hd = create_dir_whatsit(hd, gc, ltjs.list_dir)
-            return hd
-         end
+         local w = create_dir_whatsit(hd, gc, ltjs.list_dir)
+         -- move dir whatsit after hd
+         setfield(hd, 'next', w); setfield(w, 'next', n); 
+         return hd
+      else return create_dir_whatsit(hd, gc, ltjs.list_dir)
       end
    end
 end
@@ -548,7 +545,7 @@
                   and getfield(hd, 'user_id')==DIR then
                      local d = hd
                      nh, hd = node_remove(nh, hd)
-                     if is_copy and (not dir_backup) then
+                     if is_copy==true and (not dir_backup) then
                         dir_backup = d; setfield(dir_backup, 'next', nil)
                      else
                         node_free(d)
@@ -729,7 +726,7 @@
             end
             local _, wh =  get_box_dir(b, 0) -- clean dir_node attached to the box
             if wh then
-               node.direct.flush_list(getfield('value', wh))
+               node.direct.flush_list(getfield(wh, 'value'))
                setfield(wh, 'value', nil)
             end
          end
@@ -1036,23 +1033,11 @@
 end
 
 do
-   -- supply direction whatsit to the main vertical list "of the next page"
    local function dir_adjust_pre_output(h, gc)
       return to_node(create_dir_whatsit_vbox(to_direct(h), gc))
    end
-   ltjb.add_to_callback('pre_output_filter',
-                        dir_adjust_pre_output,
+   ltjb.add_to_callback('pre_output_filter', dir_adjust_pre_output, 
                         'ltj.direction', 10000)
-
-   function luatexja.direction.remove_end_whatsit()
-      local h=tex.lists.page_head
-      if h and (not h.next) and
-         h.id==id_whatsit and h.subtype==sid_user and
-         h.user_id == DIR then
-            tex.lists.page_head = nil
-            node.free(h)
-      end
-   end
 end
 
 -- append_to_vlist filter: done in ltj-lineskip.lua

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -746,12 +746,14 @@
    local g = mc[bc][ac]
    if g then
        if g[1] then
-           return node_copy(g[1]), g.ratio, false, false, false
+          local k = node_new(id_kern, 1); setfield(k, 'kern', g[1]) 
+          set_attr(k, attr_icflag, FROM_JFM)
+          return k, g.ratio, false, false, false
        else
-         local f = node_new(id_glue)
-         set_attr(f, attr_icflag, g.priority)
-         setglue(f, g.width, g.stretch, g.shrink)
-         return f, g.ratio, g.kanjiskip_natural, g.kanjiskip_stretch, g.kanjiskip_shrink
+          local f = node_new(id_glue)
+          set_attr(f, attr_icflag, g.priority)
+          setglue(f, g.width, g.stretch, g.shrink)
+          return f, g.ratio, g.kanjiskip_natural, g.kanjiskip_stretch, g.kanjiskip_shrink
       end
    end
    return false, 0

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -229,10 +229,7 @@
                   }
             end
             for k,w in pairs(v.kern) do
-               local g = node_new(id_kern, 1)
-               setfield(g, 'kern', w[1])
-               set_attr(g, attr_icflag, FROM_JFM)
-               v[k] = {g, ratio=w[2]/sz}
+               v[k] = {w[1], ratio=w[2]/sz}
             end
          end
          v.glue, v.kern = nil, nil

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -18,12 +18,13 @@
 local node_next = node.direct.getnext
 local getid = node.direct.getid
 local getsubtype = node.direct.getsubtype
+local texget = tex.get
 
 local node_getglue = node.getglue
 local setglue = node.direct.setglue
-local function copy_glue (new_glue, old_glue, subtype, new_w)
+local function copy_glue (new_glue, old_glue_name, subtype, new_w)
    setfield(new_glue, 'subtype', subtype)
-   local w,st,sp,sto,spo = node_getglue(old_glue)
+   local w,st,sp,sto,spo = texget(old_glue_name, true)
    setglue(new_glue, new_w or w, st, sp, sto, spo)
 end
 ltjl.copy_glue = copy_glue
@@ -33,9 +34,9 @@
 end
 function ltjl.l_dummy(dist, g, adj, normal, bw, loc)
    if dist < tex.lineskiplimit then
-      copy_glue(g, tex.lineskip, 1, tex.lineskip.width + adj)
+      copy_glue(g, 'lineskip', 1, texget('lineskip', false) + adj)
    else
-      copy_glue(g, tex.baselineskip, 2, normal)
+      copy_glue(g, 'baselineskip', 2, normal)
    end
 end
 
@@ -49,7 +50,7 @@
 local traverse_id = node.direct.traverse_id
 local function adjust_glue(nh)
    local h = to_direct(nh)
-   local bw = tex.baselineskip.width
+   local bw = texget('baselineskip',false)
    for x in traverse_id(id_glue, h) do
      local xs = getsubtype(x)
      if (xs==1) or (xs==2) then
@@ -83,7 +84,7 @@
    local new_b = loc=='box' and 
       make_dir_whatsit(old_b, old_b, get_dir_count(), 'append_vlist') or old_b
    if prev > -65536000 then
-      local bw = tex.baselineskip.width
+      local bw = texget('baselineskip', false)
       local normal = bw - prev - getfield(new_b, mirrored and 'depth' or 'height')
       local lmin, adj = nil, 0
       local tail = to_direct(tex.nest[tex.nest.ptr].tail)

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua	2022-08-07 21:41:57 UTC (rev 64071)
@@ -583,6 +583,9 @@
             debug_show_node_X(q, print_fn, limit, inner_depth)
          end
       end
+   elseif pt == 'attribute' then
+      s = base .. ' [' .. p.number .. '] = ' .. p.value
+      print_fn(s)
    else
       print_fn(base)
    end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-08-07 21:41:10 UTC (rev 64070)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-08-07 21:41:57 UTC (rev 64071)
@@ -27,7 +27,7 @@
 \newif\ifltj at disablejfam
 
 %%%% VERSION
-\def\LuaTeXjaversion{20220703.0}
+\def\LuaTeXjaversion{20220807.0}
 
 %% Check if LaTeX is used.
 \begingroup\expandafter\expandafter\expandafter\endgroup



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