summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/ptexdir/ptex-base.ch
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/ptexdir/ptex-base.ch')
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch30
1 files changed, 18 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index 6b77387d58e..36496b2e4b2 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -74,6 +74,8 @@
% (2022-10-24) HY pTeX p4.1.0 Add new syntax \font [in jis/ucs].
% New primitives: \tojis, \ptextracingfonts and \ptexfontname.
% (2023-09-17) HY pTeX p4.1.1 Support more than 256 different glue/kern.
+% (2024-09-22) HK pTeX p4.1.2 Enable to get character codes
+% from control symbols by using backquote.
@x
% Here is TeX material that gets inserted after \input webmac
@@ -88,8 +90,8 @@
@y
@d pTeX_version=4
@d pTeX_minor_version=1
-@d pTeX_revision==".1"
-@d pTeX_version_string=='-p4.1.1' {current \pTeX\ version}
+@d pTeX_revision==".2"
+@d pTeX_version_string=='-p4.1.2' {current \pTeX\ version}
@#
@d pTeX_banner=='This is pTeX, Version 3.141592653',pTeX_version_string
@d pTeX_banner_k==pTeX_banner
@@ -1305,10 +1307,11 @@ for k:=0 to 255 do
begin cat_code(k):=other_char; kcat_code(k):=other_kchar;
math_code(k):=hi(k); sf_code(k):=1000;
auto_xsp_code(k):=0;
+ inhibit_xsp_type(k):=0; kinsoku_type(k):=0;
end;
for k:=0 to 1023 do
- begin inhibit_xsp_code(k):=0; inhibit_xsp_type(k):=0;
- kinsoku_code(k):=0; kinsoku_type(k):=0;
+ begin inhibit_xsp_code(k):=0;
+ kinsoku_code(k):=0;
end;
@z
@x [17.232] l.4971 - pTeX: initialize cat_code, cur_jfont, cur_tfont
@@ -1523,6 +1526,9 @@ primitive("ptextracingfonts",assign_int,int_base+ptex_tracing_fonts_code);@/
@d v_offset==dimen_par(v_offset_code)
@d t_baseline_shift==dimen_par(t_baseline_shift_code)
@d y_baseline_shift==dimen_par(y_baseline_shift_code)
+@#
+@d enc_jis=1
+@d enc_ucs=2
@z
@x l.5542 - pTeX:
@@ -1660,8 +1666,8 @@ procedure print_font_dir_and_enc(f:internal_font_number);
begin
if font_dir[f]=dir_tate then print("/TATE")
else if font_dir[f]=dir_yoko then print("/YOKO");
- if font_enc[f]=2 then print("+Unicode")
- else if font_enc[f]=1 then print("+JIS");
+ if font_enc[f]=enc_ucs then print("+Unicode")
+ else if font_enc[f]=enc_jis then print("+JIS");
end;
@z
@@ -3324,9 +3330,9 @@ if jfm_flag<>dir_default then
for k:=ctype_base[f] to ctype_base[f]+nt-1 do
begin
fget; read_twentyfourx(cx);
- if jfm_enc=2 then {Unicode TFM}
+ if jfm_enc=enc_ucs then {Unicode TFM}
font_info[k].hh.rh:=toDVI(fromUCS(cx))
- else if jfm_enc=1 then {JIS-encoded TFM}
+ else if jfm_enc=enc_jis then {JIS-encoded TFM}
font_info[k].hh.rh:=toDVI(fromJIS(cx))
else
font_info[k].hh.rh:=tokanji(cx); {|kchar_code|}
@@ -3584,9 +3590,9 @@ continue:
end;
p:=link(p);
jc:=KANJI(info(p));
- if font_enc[f]=2 then {Unicode TFM}
+ if font_enc[f]=enc_ucs then {Unicode TFM}
jc:=toUCS(jc)
- else if font_enc[f]=1 then {JIS-encoded TFM}
+ else if font_enc[f]=enc_jis then {JIS-encoded TFM}
begin if toJIS(jc)=0 then char_warning_jis(f,jc);
jc:=toJIS(jc); end
else
@@ -7075,8 +7081,8 @@ exit:end;
@ @<Scan the font encoding specification@>=
begin jfm_enc:=0;
if scan_keyword_noexpand("in") then
- if scan_keyword_noexpand("jis") then jfm_enc:=1
- else if scan_keyword_noexpand("ucs") then jfm_enc:=2
+ if scan_keyword_noexpand("jis") then jfm_enc:=enc_jis
+ else if scan_keyword_noexpand("ucs") then jfm_enc:=enc_ucs
else begin
print_err("Unknown TFM encoding");
@.Unknown TFM encoding@>