module('luatexja.jfmglue', package.seeall)
local err, warn, info, log = luatexbase .errwarinf(_NAME)
+luatexja.load_module('base'); local ltjb = luatexja.base
luatexja.load_module('stack'); local ltjs = luatexja.stack
luatexja.load_module('jfont'); local ltjf = luatexja.jfont
local pairs = pairs
end
-- 文字クラスの決定
-local function slow_find_char_class(c, m, oc)
- local xc = c or oc
- local cls = ltjf_find_char_class(oc, m)
- if xc ~= oc and cls==0 then cls = ltjf_find_char_class(-xc, m) end
- return cls, xc
+local slow_find_char_class
+do
+ slow_find_char_class = function (c, m, oc)
+ local cls = ltjf_find_char_class(oc, m)
+ if not c and cls==0 then
+ return ltjf_find_char_class(-c, m), oc
+ else
+ return cls, oc
+ end
+ end
end
local zero_glue = node_new(id_glue)
-- We think that "Np is a Japanese character" if Np.met~=nil,
-- "Np is an alphabetic character" if Np.pre~=nil,
-- "Np is not a character" otherwise.
-local after_hlist, after_alchar, extract_np
+after_hlist = nil -- global
+local after_alchar, extract_np
do
local PRE = luatexja.stack_table_index.PRE
local POST = luatexja.stack_table_index.POST
local lp, par_indented, lpi, lps = head, 'boxbdd', getid(head), getsubtype(head)
while lp and ((lpi==id_whatsit and lps~=sid_user)
or ((lpi==id_hlist) and (lps==3))) do
- if (lpi==id_hlist) and (lps==3) then par_indented = 'parbdd' end
+ if (lpi==id_hlist) and (lps==3) then
+ Np.char, par_indented = 'parbdd', 'parbdd'
+ Np.width = getfield(lp, 'width')
+ end
lp=node_next(lp); lpi, lps = getid(lp), getsubtype(lp) end
return lp, node_tail(head), par_indented
- else
+ else
return head, nil, 'boxbdd'
end
end