OSDN Git Service
(root)
/
luatex-ja
/
luatexja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modified check_box function; sync with ptex-base_130104_math-spc_beta.diff
[luatex-ja/luatexja.git]
/
src
/
ltj-math.lua
diff --git
a/src/ltj-math.lua
b/src/ltj-math.lua
index
bf5185f
..
793d658
100644
(file)
--- a/
src/ltj-math.lua
+++ b/
src/ltj-math.lua
@@
-3,8
+3,8
@@
--
luatexbase.provides_module({
name = 'luatexja.math',
--
luatexbase.provides_module({
name = 'luatexja.math',
- date = '201
1/08/14
',
- version = '0.
1
',
+ date = '201
2/07/19
',
+ version = '0.
2
',
description = 'Handling routines for Japanese characters in math mode',
})
module('luatexja.math', package.seeall)
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 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 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 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
local ltjf_font_metric_table = ltjf.font_metric_table
local ltjf_find_char_class = ltjf.find_char_class
@@
-102,18
+103,15
@@
function (p, sty)
if sty == 0 then mode = 'mjtext'
elseif sty == 1 then mode = 'mjscr'
end
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
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)
- local met = ltjf_font_metric_table[f]
- local class = ltjf_find_char_class(p.char, met)
- set_attr(r, attr_jchar_class, class)
+ set_attr(r, attr_ykblshift, 0)
set_attr(r, attr_icflag, PROCESSED)
set_attr(r, attr_icflag, PROCESSED)
- l
tjw.char_data = met.size_cache.char_type[class
]
- ltjw.head = r; ltjw.capsule_glyph(r, tex.mathdir , true, met,
class
);
+ l
ocal met = ltjf_font_metric_table[f
]
+ ltjw.head = r; ltjw.capsule_glyph(r, tex.mathdir , true, met,
ltjf_find_char_class(p.char, met)
);
q.head = ltjw.head; node_free(p); p=q;
end
end
q.head = ltjw.head; node_free(p); p=q;
end
end