--
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)
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']
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
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));