Skip to content

Commit

Permalink
fix \mathcode for 128--255 not working
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Jan 24, 2022
1 parent 43ca470 commit 4e8aff1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
6 changes: 2 additions & 4 deletions source/texk/web2c/ptexdir/ptex-base.ch
Original file line number Diff line number Diff line change
Expand Up @@ -6123,16 +6123,14 @@ mmode+char_num: begin scan_char_num; cur_chr:=cur_val;
@y
mmode+letter,mmode+other_char,mmode+char_given:
if is_char_ascii(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
mmode+kanji,mmode+kana,mmode+other_kchar: begin
cx:=cur_chr; set_math_kchar(KANJI(cx));
end;
mmode+char_num: begin scan_char_num; cur_chr:=cur_val;
if is_char_ascii(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
end;
@z
Expand Down
12 changes: 4 additions & 8 deletions source/texk/web2c/uptexdir/uptex-m.ch
Original file line number Diff line number Diff line change
Expand Up @@ -982,31 +982,27 @@ kanji,kana,other_kchar,hangul: cx:=cur_chr;
@x
mmode+letter,mmode+other_char,mmode+char_given:
if is_char_ascii(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
mmode+kanji,mmode+kana,mmode+other_kchar: begin
cx:=cur_chr; set_math_kchar(KANJI(cx));
end;
mmode+char_num: begin scan_char_num; cur_chr:=cur_val;
if is_char_ascii(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
end;
@y
mmode+letter,mmode+other_char,mmode+char_given:
if check_echar_range(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
mmode+kanji,mmode+kana,mmode+other_kchar,mmode+hangul: begin
cx:=cur_chr; set_math_kchar(KANJI(cx));
end;
mmode+char_num: begin scan_char_num; cur_chr:=cur_val;
if check_echar_range(cur_chr) then
if cur_chr<128 then set_math_char(ho(math_code(cur_chr)))
else set_math_char(cur_chr)
set_math_char(ho(math_code(cur_chr)))
else set_math_kchar(cur_chr);
end;
mmode+kchar_given:
Expand Down

0 comments on commit 4e8aff1

Please sign in to comment.