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
Fix a bug in ltj-adjust.lua
[luatex-ja/luatexja.git]
/
src
/
ltj-adjust.lua
diff --git
a/src/ltj-adjust.lua
b/src/ltj-adjust.lua
index
1bceda3
..
84f75b9
100644
(file)
--- a/
src/ltj-adjust.lua
+++ b/
src/ltj-adjust.lua
@@
-107,6
+107,9
@@
local function get_total_stretched(p, line)
local total = 0
for q in node_traverse_id(id_glue, getlist(p)) do
local a, ic = get_stretched(q, go, gs), get_attr_icflag(q)
local total = 0
for q in node_traverse_id(id_glue, getlist(p)) do
local a, ic = get_stretched(q, go, gs), get_attr_icflag(q)
+ if ic == KANJI_SKIP_JFM then ic = KANJI_SKIP
+ elseif ic == XKANJI_SKIP_JFM then ic = XKANJI_SKIP
+ end
if type(res[ic]) == 'number' then
-- kanjiskip, xkanjiskip は段落内で spec を共有しているが,
-- それはここでは望ましくないので,各 glue ごとに異なる spec を使う.
if type(res[ic]) == 'number' then
-- kanjiskip, xkanjiskip は段落内で spec を共有しているが,
-- それはここでは望ましくないので,各 glue ごとに異なる spec を使う.
@@
-124,8
+127,6
@@
local function get_total_stretched(p, line)
gs_used_line[qs] = line
end
end
gs_used_line[qs] = line
end
end
- elseif ic == KANJI_SKIP_JFM then ic = KANJI_SKIP
- elseif ic == XKANJI_SKIP_JFM then ic = XKANJI_SKIP
end
res[ic], total = res[ic] + a, total + a
else
end
res[ic], total = res[ic] + a, total + a
else
@@
-137,7
+138,9
@@
end
local function clear_stretch(p, ic, name)
for q in node_traverse_id(id_glue, getlist(p)) do
local function clear_stretch(p, ic, name)
for q in node_traverse_id(id_glue, getlist(p)) do
- if get_attr_icflag(q) == ic then
+ local f = get_attr_icflag(q)
+ if (f == ic) or ((ic ==KANJI_SKIP) and (f == KANJI_SKIP_JFM))
+ or ((ic ==XKANJI_SKIP) and (f == XKANJI_SKIP_JFM)) then
local qs = getfield(q, 'spec')
if getfield(qs, 'writable') then
setfield(qs, name..'_order', 0)
local qs = getfield(q, 'spec')
if getfield(qs, 'writable') then
setfield(qs, name..'_order', 0)