summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-01-04 02:51:17 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-01-04 02:51:17 +0000
commit4480e8cd981ae7af0fb20133e1d35138e637f2e4 (patch)
tree7de5861980ea8d0ffd6294eb2bb753de6cc36a6d
parentec6cf765f0cb6b9b6f953d8e34f0c652b2f95686 (diff)
xkanjiskip around math_node etc. by Hironori Kitagawa.
git-svn-id: svn://tug.org/texlive/trunk@28720 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch30
-rw-r--r--Build/source/texk/web2c/uptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/uptexdir/uptex-m.ch6
4 files changed, 34 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index 97bdfc1b305..1befd59bdd8 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-04 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptex-base.ch: \xkanjiskip around math_node etc.
+
2012-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/ptex.am (ptex_version.h): Enable silent rules.
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index e9233991d3a..f8f3b7d3e4c 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -6275,6 +6275,8 @@ If the first matter is a character, |first_char| is stored it.
in the list, |first_char| and |last_char| is null.
@^recursion@>
+Note that |first_char| and |last_char| may be |math_node|.
+
@<Glob...@>=
@!first_char:pointer; {first printable character}
@!last_char:pointer; {last printable character}
@@ -6309,6 +6311,14 @@ while p<>null do
ligature_node: if check_box(lig_ptr(p)) then flag:=true;
ins_node,disp_node,mark_node,adjust_node,whatsit_node,penalty_node:
do_nothing;
+ math_node:
+ if (subtype(p)=before)or(subtype(p)=after) then
+ begin if find_first_char then
+ begin find_first_char:=false; first_char:=p;
+ end;
+ last_char:=p; flag:=true;
+ end
+ else do_nothing; {\.{\\beginR} etc.}
othercases begin flag:=true;
if find_first_char then find_first_char:=false
else last_char:=null;
@@ -6445,21 +6455,27 @@ if shift_amount(p)=0 then
end
@ @<Insert a space before the |first_char|@>=
-if font_dir[font(first_char)]<>dir_default then
+if type(first_char)=math_node then
+ begin ax:=qo("0");
+ if insert_skip=after_wchar then @<Insert KANJI-ASCII spacing@>;
+ end
+else if font_dir[font(first_char)]<>dir_default then
begin KANJI(cx):=info(link(first_char));
if insert_skip=after_schar then @<Insert ASCII-KANJI spacing@>
else if insert_skip=after_wchar then @<Insert KANJI-KANJI spacing@>;
- insert_skip:=after_wchar;
end
else
begin ax:=qo(character(first_char));
if insert_skip=after_wchar then @<Insert KANJI-ASCII spacing@>;
- if auto_xsp_code(ax)>=2 then
- insert_skip:=after_schar else insert_skip:=no_skip;
end;
@ @<Insert a space after the |last_char|@>=
-if font_dir[font(last_char)]<>dir_default then
+if type(last_char)=math_node then
+ begin ax:=qo("0");
+ if auto_xsp_code(ax)>=2 then
+ insert_skip:=after_schar else insert_skip:=no_skip;
+ end
+else if font_dir[font(last_char)]<>dir_default then
begin insert_skip:=after_wchar;
if is_char_node(link(p))and(font_dir[font(link(p))]<>dir_default) then
begin @<Append KANJI-KANJI spacing@>; p:=link(p);
@@ -6477,7 +6493,9 @@ begin if (subtype(p)=before)and(insert_skip=after_wchar) then
insert_skip:=no_skip;
end
else if subtype(p)=after then
- begin ax:=qo("0"); insert_skip:=after_schar;
+ begin ax:=qo("0");
+ if auto_xsp_code(ax)>=2 then
+ insert_skip:=after_schar else insert_skip:=no_skip;
end
else insert_skip:=no_skip;
end
diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog
index dc676da24d1..95fc9af66ca 100644
--- a/Build/source/texk/web2c/uptexdir/ChangeLog
+++ b/Build/source/texk/web2c/uptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-04 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * uptex-m.ch: \xkanjiskip around math_node etc.
+
2012-12-16 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/uptex.am (uptex_version.h): Enable silent rules.
diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch
index b9c8bc31165..e1d2725f30c 100644
--- a/Build/source/texk/web2c/uptexdir/uptex-m.ch
+++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch
@@ -1069,12 +1069,10 @@ if font_dir[font(p)]<>dir_default then
@z
@x
-@ @<Insert a space before the |first_char|@>=
-if font_dir[font(first_char)]<>dir_default then
+else if font_dir[font(first_char)]<>dir_default then
begin KANJI(cx):=info(link(first_char));
@y
-@ @<Insert a space before the |first_char|@>=
-if font_dir[font(first_char)]<>dir_default then
+else if font_dir[font(first_char)]<>dir_default then
begin KANJI(cx):=info(link(first_char)) mod max_cjk_val;
@z