From adc43c3c243ed95215af6fe02d71e393c178da23 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Thu, 19 Nov 2015 20:15:06 +0100 Subject: 2015-11-19 19:15:00 --- tex/context/base/node-res.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'tex/context/base/node-res.lua') diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua index 85fb63adf..10144399c 100644 --- a/tex/context/base/node-res.lua +++ b/tex/context/base/node-res.lua @@ -67,10 +67,12 @@ local tonode = nuts.tonode local getbox = nuts.getbox local getfield = nuts.getfield -local setfield = nuts.setfield local getid = nuts.getid local getlist = nuts.getlist +local setfield = nuts.setfield +local setchar = nuts.setchar + local copy_nut = nuts.copy local new_nut = nuts.new local free_nut = nuts.free @@ -140,13 +142,7 @@ local glue = register_nut(new_nut("glue")) -- glue.spec = nil local glue_spec = register_nut(new_nut("glue_spec")) local glyph = register_nut(new_nut("glyph",0)) -local textdir = nil - -if nodes.nativedir then - textdir = register_nut(new_nut("dir")) -else - textdir = register_nut(new_nut("whatsit",whatsitcodes.dir)) -end +local textdir = register_nut(new_nut("dir")) local latelua = register_nut(new_nut("whatsit",whatsitcodes.latelua)) local special = register_nut(new_nut("whatsit",whatsitcodes.special)) @@ -183,7 +179,7 @@ end function nutpool.glyph(fnt,chr) local n = copy_nut(glyph) if fnt then setfield(n,"font",fnt) end - if chr then setfield(n,"char",chr) end + if chr then setchar(n,chr) end return n end @@ -432,7 +428,7 @@ function nutpool.noad() return copy_nut(noad) end -function nutpool.hlist(list,width,height,depth) +function nutpool.hlist(list,width,height,depth,shift) local n = copy_nut(hlist) if list then setfield(n,"list",list) @@ -446,10 +442,13 @@ function nutpool.hlist(list,width,height,depth) if depth then setfield(n,"depth",depth) end + if shift then + setfield(n,"shift",shift) + end return n end -function nutpool.vlist(list,width,height,depth) +function nutpool.vlist(list,width,height,depth,shift) local n = copy_nut(vlist) if list then setfield(n,"list",list) @@ -463,6 +462,9 @@ function nutpool.vlist(list,width,height,depth) if depth then setfield(n,"depth",depth) end + if shift then + setfield(n,"shift",shift) + end return n end -- cgit v1.2.3