X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-ruby.lua;h=1237cea46287c6277f6929177658f0a4b004a3f6;hb=d177010c46e52e722b4752eded1ae4a6807953df;hp=67474d31ce2a5560682af72d2e3ed5cecf9f748e;hpb=1dc395e8e6e5fa0352799748b530a987f4dafed8;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-ruby.lua b/src/ltj-ruby.lua index 67474d3..1237cea 100644 --- a/src/ltj-ruby.lua +++ b/src/ltj-ruby.lua @@ -3,7 +3,7 @@ -- luatexbase.provides_module({ name = 'luatexja.ruby', - date = '2015/09/18', + date = '2017/05/05', description = 'Ruby annotation', }) module('luatexja.ruby', package.seeall) @@ -205,7 +205,7 @@ do local hic = has_attr(hx, attr_icflag) if (hic == KANJI_SKIP) or (hic == KANJI_SKIP_JFM) or (hic == XKANJI_SKIP) or (hic == XKANJI_SKIP_JFM) - or ((hic<=FROM_JFM+2) and (hic>=FROM_JFM-2)) then + or ((hic<=FROM_JFM+63) and (hic>=FROM_JFM)) then -- この 5 種類の空白をのばす if getid(hx) == id_kern then local k = node_new(id_glue) @@ -215,7 +215,7 @@ do h = insert_after(h, hx, k); h = node_remove(h, hx); node_free(hx); hx = k else -- glue - setglue(hx, getfield(hx, 'width'), round(middle*65536), 0, + setglue(hx, getfield(hx, 'width'), round(middle*65536), 0, 2, 0) end end @@ -673,9 +673,9 @@ luatexbase.add_to_callback('hpack_filter', post_high_hbox, 'ltj.ruby.post_hbox', ---------------------------------------------------------------- do local RIPRE = luatexja.stack_table_index.RIPRE - local function whatsit_callback(Np, lp, Nq, bsl) + local function whatsit_callback(Np, lp, Nq) if Np.nuc then return Np - elseif getfield(lp, 'user_id') == RUBY_PRE then + elseif getfield(lp, 'user_id') == RUBY_PRE then Np.first, Np.nuc, Np.last = lp, lp, lp local lpv = getfield(lp, 'value') local x = node_next(node_next(lpv)) @@ -711,6 +711,8 @@ do set_attr(lpv, attr_ruby_maxprep, 0) end return Np + else + return Np end end luatexbase.add_to_callback("luatexja.jfmglue.whatsit_getinfo", whatsit_callback,