X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fltj-math.lua;h=793d6586aa05154b4c0adc66f1efadfe37b2bb0e;hb=5cacff7566d354102546a09869ed303c5a6130d9;hp=784a55f09f735d41637af902125753717971b31c;hpb=29d01d6b97bfa15d0aa5f8ee3ef2e6c407bf4b0b;p=luatex-ja%2Fluatexja.git diff --git a/src/ltj-math.lua b/src/ltj-math.lua index 784a55f..793d658 100644 --- a/src/ltj-math.lua +++ b/src/ltj-math.lua @@ -3,8 +3,8 @@ -- luatexbase.provides_module({ name = 'luatexja.math', - date = '2011/08/14', - version = '0.1', + date = '2012/07/19', + version = '0.2', description = 'Handling routines for Japanese characters in math mode', }) module('luatexja.math', package.seeall) @@ -20,6 +20,7 @@ local node_next = node.next local node_free = node.free local has_attr = node.has_attribute local set_attr = node.set_attribute +local tex_getcount = tex.getcount local attr_jchar_class = luatexbase.attributes['ltj@charclass'] local attr_icflag = luatexbase.attributes['ltj@icflag'] @@ -40,7 +41,7 @@ local id_frac = node.id('fraction') local id_simple = node.id('noad') local id_sub_mlist = node.id('sub_mlist') -local PROCESSED = 8 +local PROCESSED = 11 local ltjf_font_metric_table = ltjf.font_metric_table local ltjf_find_char_class = ltjf.find_char_class @@ -102,12 +103,12 @@ function (p, sty) if sty == 0 then mode = 'mjtext' elseif sty == 1 then mode = 'mjscr' end - local f = ltjs.get_penalty_table(mode, fam, -1, tex.getcount('ltj@@stack')) + local f = ltjs.get_penalty_table(mode, fam, -1, tex_getcount('ltj@@stack')) if f ~= -1 then local q = node_new(id_sub_box) local r = node_new(id_glyph); r.next = nil r.char = p.char; r.font = f; r.subtype = 256 - set_attr(r, attr_yablshift, 0) + set_attr(r, attr_ykblshift, 0) set_attr(r, attr_icflag, PROCESSED) local met = ltjf_font_metric_table[f] ltjw.head = r; ltjw.capsule_glyph(r, tex.mathdir , true, met, ltjf_find_char_class(p.char, met));