---! ixbase.to_skip() と同じ
- local function to_skip(val)
- if type(val) == "userdata" then
- return val
- end
- local res = node.new(glue_spec_id)
- if val == nil then
- res.width = 0
- elseif type(val) == "number" then
- res.width = val
- elseif type(val) == "table" then
- copy_skip(res, val)
- else
- local t = tostring(val):lower():explode()
- local w, p, m = t[1], t[3], t[5]
- if t[2] == "minus" then
- p, m = nil, t[3]
- end
- res.width = tex.sp(t[1])
- if p then
- res.stretch, res.stretch_order = parse_dimen(p)
- end
- if m then
- res.shrink, res.shrink_order = parse_dimen(m)
- end
- end
- return res
- end
-
- local function dump_skip(s)
- print(("%s+%s<%s>-%s<%s>"):format(
- s.width or 0, s.stretch or 0, s.stretch_order or 0,
- s.shrink or 0, s.shrink_order or 0))
- end
-