end
setfield(shipout_temp, 'head', a)
finalize_inner(shipout_temp)
- --luatexja.ext_show_node(to_node(shipout_temp), '> ', print,4)
setbox('global', "AtBeginShipoutBox", copy(getlist(shipout_temp)))
setfield(shipout_temp, 'head',nil)
end
while lp ~=last and (lpa>=PACKED) and (lpa<BOXBDD) do
if getid(lp)==id_hlist or getid(lp)==id_vlist then
head, lp, nc = ltjd_make_dir_whatsit(head, lp, list_dir, 'jfm pbox')
- if first then Np.first = nc end
+ Np.first = first and nc or Np.first
else
nc, lp = lp, node_next(lp)
end
-- get_attr_icflag() ではいけない!
end
Np.nuc = nc
- return check_next_ickern(lp)
+ lp = check_next_ickern(lp)
+ Np.last_char = check_box_high(Np, Np.first, lp)
+ return lp
end
local ltjw_apply_ashift_math = ltjw.apply_ashift_math
Np.first, Np.nuc, Np.last = (Np.first or lp), lp, lp;
Np.id = getid(lp); set_attr(lp, attr_icflag, PROCESSED)
ltjw_apply_ashift_disc(lp, (list_dir==dir_tate), tex_dir)
+ Np.last_char = check_box_high(Np, getfield(lp, 'replace'), nil)
return true, node_next(lp)
end,
[id_kern] = function(lp)
end
local set_np_xspc_alchar = set_np_xspc_alchar
--- Np の情報取得メインルーチン
- extract_np = function ()
- local x, i = Np.nuc, Np.id;
--- if i == id_jglyph then return set_np_xspc_jachar(Np, x)
--- elseif i == id_glyph then return set_np_xspc_alchar(Np, getchar(x), x, 1)
--- if i == id_hlist then Np.last_char = check_box_high(Np, getlist(x), nil)
- if i == id_pbox then Np.last_char = check_box_high(Np, Np.first, node_next(Np.last))
- elseif i == id_disc then Np.last_char = check_box_high(Np, getfield(x, 'replace'), nil)
--- elseif i == id_math then return set_np_xspc_alchar(Np, -1, x)
- end
- end
-
-- change the information for the next loop
-- (will be done if Nx is an alphabetic character or a hlist)
after_hlist = function (Nx)
local lp, last, par_indented = init_var(mode,dir)
lp = calc_np(lp, last)
if Np then
- extract_np(); handle_list_head(par_indented)
+ handle_list_head(par_indented)
else
return cleanup(mode)
end
lp = calc_np(lp, last)
while Np do
- extract_np();
adjust_nq();
local pid, pm = Np.id, Np.met
-- 挿入部
local ltjr_cidfont_data = ltjr.cidfont_data
local ltjc_is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char
local ltjd_get_dir_count = ltjd.get_dir_count
+local dir_tate = luatexja.dir_table.dir_tate
luatexja.userid_table.OTF = luatexbase.newuserwhatsitid('char_by_cid', 'luatexja')
luatexja.userid_table.VSR = luatexbase.newuserwhatsitid('replace_vs', 'luatexja')
local cid
do
- local dir_tate = luatexja.dir_table.dir_tate
local tex_get_attr = tex.getattribute
cid = function (key)
if key==0 then return append_jglyph(char) end
local function do_ivs_repr(head)
head = to_direct(head)
local p, r = head
+ local is_dir_tate = ltjs.list_dir == dir_tate
+ local attr_ablshift = is_dir_tate and attr_tablshift or attr_yablshift
+ local attr_kblshift = is_dir_tate and attr_tkblshift or attr_ykblshift
+ local attr_curfnt = is_dir_tate and attr_curtfnt or attr_curjfnt
while p do
local pid = getid(p)
if pid==id_glyph then
head, r = node_remove(head,q)
node_free(q)
if pt then
+ local is_jachar = (getfield(p, 'lang')==lang_ja)
local np = ivs_jglyph(pt, p, pf,
- (getfield(p, 'lang') or 0)==lang_ja and OTF or VSR)
+ is_jachar and OTF or VSR)
+ if is_jachar then
+ set_attr(np, attr_curfnt, pf)
+ set_attr(np, attr_kblshift, has_attr(p, attr_kblshift))
+ end
head = node_insert_after(head, p, np)
head = node_remove(head,p)
node_free(p)
'luatexja.otf.enable_ivs() was already called, so this call is ignored', '')
else
luatexbase.add_to_callback('hpack_filter',
- do_ivs_repr,'do_ivs', 1)
+ do_ivs_repr,'do_ivs',
+ luatexbase.priority_in_callback('hpack_filter',
+ 'ltj.hpack_filter_pre')+1)
luatexbase.add_to_callback('pre_linebreak_filter',
- do_ivs_repr, 'do_ivs', 1)
+ do_ivs_repr, 'do_ivs',
+ luatexbase.priority_in_callback('pre_linebreak_filter',
+ 'ltj.pre_linebreak_filter_pre')+1)
local ivs_callback = function (name, size, id)
return font_callback(
name, size, id,
local attr_icflag = luatexbase.attributes['ltj@icflag']
local is_ucs_in_japanese_char = ltjc.is_ucs_in_japanese_char_direct
+--local ltjs_orig_char_table = ltjs.orig_char_table
local ltjf_get_vert_glyph = ltjf.get_vert_glyph
local ltjf_replace_altfont = ltjf.replace_altfont
local attr_orig_char = luatexbase.attributes['ltj@origchar']
local start_time_measure, stop_time_measure
= ltjb.start_time_measure, ltjb.stop_time_measure
local head
- local is_dir_tate
local suppress_hyphenate_ja_aux = {}
suppress_hyphenate_ja_aux[id_glyph] = function(p)
if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p) then
local pc = getchar(p)
local pf = ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc)
- setfield(p, 'font', pf); --set_attr(p, attr_curjfnt, pf)
+ setfield(p, 'font', pf)
setfield(p, 'lang', lang_ja)
- set_attr(p, attr_orig_char, pc)
+ set_attr(p, attr_orig_char, pc)
end
return p
end
for _,p in pairs(wtd) do
node_free(p)
end
- is_dir_tate = ltjs.list_dir == dir_tate
- if is_dir_tate then
+ if ltjs.list_dir == dir_tate then
for p in Dnode.traverse_id(id_glyph,to_direct(head)) do
if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then
local pfn = has_attr(p, attr_curtfnt) or getfont(p)
luatexja.pretreat = {
set_box_stack_level = set_box_stack_level,
+ orig_char_table = orig_char_table,
}
return i or d
end
-
--------------------------------------------------------------------------------
-- nest table (obeys TeX's semantic nest)
--------------------------------------------------------------------------------
if (p.shift or 0)~=0 then
s = s .. ', shifted ' .. print_scaled(p.shift)
end
- if p.glue_sign or 0>= 1 then
+ if p.glue_set and p.glue_sign ==2 or ( p.glue_sign==1 and p.glue_set>0) then
s = s .. ' glue set '
if p.glue_sign == 2 then s = s .. '-' end
s = s .. tostring(floor(p.glue_set*10000)/10000)
江戸川区葛西はどっち?
\end{lstlisting}
-\end{document}
\ No newline at end of file
+
+\def\test{あいうえお
+ {\ltjsetparameter{yjabaselineshift=-2pt,tjabaselineshift=2pt}%
+ \vrule 葛葛󠄀城市と葛󠄁飾区\CID{200}}あ}
+\catcode`\@=11
+\ltjsetparameter{kanjiskip=4pt}
+
+\hbox{\jfont\F=KozMinPr6N-Regular:jfm=ujis at 12pt \F\CID{200}\test}
+
+\hrule
+
+\hbox{\tate\tfont\F=KozMinPr6N-Regular:jfm=ujisv at 12pt \F\CID{200}\test}
+
+
+\end{document}