From 41c534a9146d43de423ad5ffad4de18ca30c6fa4 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Fri, 18 Mar 2016 20:54:06 +0900 Subject: [PATCH] LuaTeX 0.85 has \nohrule and \novrule (subtype 3) --- src/ltj-jfmglue.lua | 3 ++- src/ltj-setwidth.lua | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ltj-jfmglue.lua b/src/ltj-jfmglue.lua index 7edd5bc..11c59c6 100644 --- a/src/ltj-jfmglue.lua +++ b/src/ltj-jfmglue.lua @@ -318,6 +318,7 @@ end local ltjw_apply_ashift_math = ltjw.apply_ashift_math local ltjw_apply_ashift_disc = ltjw.apply_ashift_disc local min, max = math.min, math.max +local rule_subtype = (status.luatex_version>=85) and 3 or 0 local function calc_np_aux_glyph_common(lp) Np.nuc = lp Np.first= (Np.first or lp) @@ -378,7 +379,7 @@ local function calc_np_aux_glyph_common(lp) end local r if adj_depth>node_depth then - r = node_new(id_rule) + r = node_new(id_rule,rule_subtype) setfield(r, 'width', 0); setfield(r, 'height', 0) setfield(r, 'depth',adj_depth); setfield(r, 'dir', tex_dir) set_attr(r, attr_icflag, PROCESSED) diff --git a/src/ltj-setwidth.lua b/src/ltj-setwidth.lua index acbe754..e18e3a1 100644 --- a/src/ltj-setwidth.lua +++ b/src/ltj-setwidth.lua @@ -74,6 +74,8 @@ local fshift = { down = 0, left = 0} local min, max = math.min, math.max +local rule_subtype = (status.luatex_version>=85) and 3 or 0 + -- 和文文字の位置補正(横) local function capsule_glyph_yoko(p, met, char_data, head, dir) if not char_data then return node_next(p), head, p end @@ -99,7 +101,7 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir) setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down) return node_next(p), head, p elseif ht_diff >= 0 and dp_diff >=0 then -- rule - local box = node_new(id_rule) + local box = node_new(id_rule,rule_subtype) setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down) setfield(box, 'width', 0) setfield(box, 'height', fheight - kbl) @@ -251,7 +253,7 @@ do setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust) end if adj_depth>node_depth then - local r = node_new(id_rule) + local r = node_new(id_rule,rule_subtype) setfield(r, 'width', 0); setfield(r, 'height', 0) setfield(r, 'depth', adj_depth); setfield(r, 'dir', tex_dir) set_attr(r, attr_icflag, PROCESSED) -- 2.11.0