OSDN Git Service

LuaTeX 0.85 has \nohrule and \novrule (subtype 3)
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 18 Mar 2016 11:54:06 +0000 (20:54 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Fri, 18 Mar 2016 11:54:06 +0000 (20:54 +0900)
src/ltj-jfmglue.lua
src/ltj-setwidth.lua

index 7edd5bc..11c59c6 100644 (file)
@@ -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)
index acbe754..e18e3a1 100644 (file)
@@ -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)