diff options
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | bin | 717582 -> 717626 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | bin | 1149384 -> 1149406 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua | 45 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua | 12 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua | 5 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua | 13 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/luatexja.lua | 3 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/luatexja.sty | 2 |
13 files changed, 52 insertions, 64 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index a769b41a75f..d37dc3db679 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/README +++ b/Master/texmf-dist/doc/luatex/luatexja/README @@ -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 @@ Installation 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 @@ Notes 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 diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf Binary files differindex 7ad9b0ebc5b..5ee7e4047d8 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf Binary files differindex 8f1095869c3..2ed0625eb1c 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx index 7c167d96f61..58f2cc15bd1 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx @@ -3019,8 +3019,8 @@ the direction inside the box and that outside the box differ. % \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 @@ the direction inside the box and that outside the box differ. % \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 @@ the direction inside the box and that outside the box differ. \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 @@ the direction inside the box and that outside the box differ. % \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 @@ the direction inside the box and that outside the box differ. % \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}}$}} % diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua index 71584d8b5cf..053b63ab1a4 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-adjust.lua @@ -514,7 +514,7 @@ do 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 @@ do 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty index 2ce01d71b17..d46b54a1faf 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty @@ -103,7 +103,7 @@ %% \ltj@gobble@glue <glue> %! 次に続くグルー値を(2 回展開で)読み捨てる. \def\ltj@gobble@glue{ - \directlua{token.scan_glue()} + \directlua{node.free(token.scan_glue())} } %% \ltj@gobble@dimen <dimen> diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua index d660915a31a..dfb19ee2d0b 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-compat.lua @@ -25,12 +25,12 @@ local function to_kansuji(num) 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua index db320509d18..565190be2d3 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua @@ -92,11 +92,12 @@ end 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 @@ local function create_dir_whatsit(hd, gc, new_dir) 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 @@ do 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 @@ do 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 @@ do 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 @@ do 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 @@ do 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua index 61c21b90944..3d046f0c018 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua @@ -746,12 +746,14 @@ local function new_jfm_glue(mc, bc, ac) 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua index 64cb1a0da98..70557c08a83 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua @@ -229,10 +229,7 @@ do } 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua index 1fc6f7b2d37..f8b97c144b6 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-lineskip.lua @@ -18,12 +18,13 @@ local node_prev = node.direct.getprev 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 @@ function ltjl.p_dummy(before, after) 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 @@ do 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 function dir_adjust_append_vlist(b, loc, prev, mirrored) 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) diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua index f7957a116de..8da4251882c 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua @@ -583,6 +583,9 @@ local function debug_show_node_X(p,print_fn, limit, inner_depth) 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 diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty index aa3d1f54632..5eab1c4e356 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty @@ -27,7 +27,7 @@ \newif\ifltj@disablejfam %%%% VERSION -\def\LuaTeXjaversion{20220703.0} +\def\LuaTeXjaversion{20220807.0} %% Check if LaTeX is used. \begingroup\expandafter\expandafter\expandafter\endgroup |