+ local sid, sl = getid(s), getlist(s)
+ local b = node_next(node_next(node_next(sl)))
+ local info = dir_node_aux[get_box_dir(b)][b_dir%dir_node_auto]
+ local shift_old
+ for _,v in ipairs(info[sid]) do
+ if v[1]=='box' then
+ shift_old = v[2](
+ getfield(b,'width'), getfield(b, 'height'), getfield(b, 'depth'))
+ break
+ end
+ end
+ if set_box_dim_common(key, b, l_dir) then
+ local bw, bh, bd
+ = getfield(b,'width'), getfield(b, 'height'), getfield(b, 'depth')
+ -- re-calculate shift
+ for i,v in ipairs(info[sid]) do
+ if getid(sl)==id_kern then
+ setfield(sl, 'kern', v[2](bw,bh,bd) )
+ elseif getid(sl)==sid then
+ local d = getfield(sl, 'shift')
+ setfield(sl, 'shift',
+ getfield(sl, 'shift') - shift_old + v[2](bw,bh,bd) )
+ end
+ sl = node_next(sl)
+ end
+ -- re-calculate dimension of s, if s is created "automatically"
+ if b_dir<dir_node_manual then
+ setfield(s, 'width', info.width(bw,bh,bd))
+ setfield(s, 'height', info.height(bw,bh,bd))
+ setfield(s, 'depth', info.depth(bw,bh,bd))
+ end
+ end