-box_stack_level = 0
--- This is used in jfmglue.lua.
-
-local function suppress_hyphenate_ja(head)
- local non_math = true
- for p in node.traverse(head) do
- if p.id == id_glyph and non_math then
- local i = has_attr(p, attr_icflag) or 0
- if i==0 and ltjc.is_ucs_in_japanese_char(p) then
- local v = has_attr(p, attr_curjfnt)
- if v then
- p.font = v
- end
- v = has_attr(p, attr_ykblshift)
- if v then
- set_attr(p, attr_yablshift, v)
- else
- unset_attr(p, attr_yablshift)
+local wt, wtd
+do
+ local start_time_measure, stop_time_measure
+ = ltjb.start_time_measure, ltjb.stop_time_measure
+ local head
+ local is_dir_tate
+ local suppress_hyphenate_ja_aux = {}
+ suppress_hyphenate_ja_aux[id_glyph] = function(p)
+ if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p) then
+ local pc = getchar(p)
+ local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
+ setfield(p, 'font', pf); set_attr(p, attr_curjfnt, pf)
+ setfield(p, 'subtype', floor(getsubtype(p)*0.5)*2)
+ set_attr(p, attr_orig_char, pc)
+ end
+ return p
+ end
+ suppress_hyphenate_ja_aux[id_math] = function(p)
+ return node_end_of_math(node_next(p)) end
+ suppress_hyphenate_ja_aux[50] = function(p) return p end
+ suppress_hyphenate_ja_aux[id_whatsit] = function(p)
+ if getsubtype(p)==sid_user then
+ local uid = getfield(p, 'user_id')
+ if uid==STCK then
+ wt[#wt+1] = p; head = node_remove(head, p)
+ elseif uid==DIR then
+ if has_attr(p, attr_icflag)<PROCESSED_BEGIN_FLAG then
+ ltjs.list_dir = has_attr(p, attr_dir)