From 03282d8528ff06458868dee6d8a284e2998ebad1 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Wed, 19 Nov 2014 09:38:17 +0000 Subject: web2c/eptexdir, web2c/euptexdir: Fix a bug introduced in \lastnodechar (H. Kitagawa) git-svn-id: svn://tug.org/texlive/trunk@35619 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/eptexdir/eptex.ech | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Build/source/texk/web2c/eptexdir/eptex.ech') diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech index 3cf81163cb0..07d81b821e2 100644 --- a/Build/source/texk/web2c/eptexdir/eptex.ech +++ b/Build/source/texk/web2c/eptexdir/eptex.ech @@ -111,6 +111,10 @@ if not is_char_node(tx) then @# @d find_effective_tail==find_effective_tail_epTeX @# +@d find_last_char== +if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) +else cur_val:=qo(character(tx)) + @d ignore_font_kerning== begin if ((type(tx)=glue_node) and (subtype(tx)=jfm_skip+1)) or ((type(tx)=penalty_node) and (subtype(tx)=kinsoku_pena)) then @@ -131,8 +135,7 @@ if not is_char_node(tx) then cur_val:=qo(character(r)); end end -else if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) -else cur_val:=qo(character(tx)); +else find_last_char; end @z @@ -151,9 +154,13 @@ end begin cur_val_level:=int_val; cur_val:=-1; end else cur_val_level:=cur_chr; - if (cur_chr=last_node_char_code)and(is_char_node(tx))and(tx<>head) then - begin if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) - else cur_val:=qo(character(tx)); end; + if (cur_chr=last_node_char_code)and(is_char_node(tx))and(tx<>head) then + { |tx| might be ``second node'' of a KANJI character; so we need to look the node before |tx| } + begin r:=head; q:=head; + while q<>tx do begin r:=q; q:=link(q); end; { |r| is the node just before |tx| } + if (r<>head)and is_char_node(r) then if font_dir[font(r)]<>dir_default then tx:=r; + find_last_char; + end; @z @x [26.424] e-pTeX: node types -- cgit v1.2.3