texlive[45950] Build/source/texk/web2c/ptexdir: ptex-base.ch:
commits+hironobu at tug.org
commits+hironobu at tug.org
Thu Nov 30 22:51:11 CET 2017
Revision: 45950
http://tug.org/svn/texlive?view=revision&revision=45950
Author: hironobu
Date: 2017-11-30 22:51:10 +0100 (Thu, 30 Nov 2017)
Log Message:
-----------
ptex-base.ch: suppress a space character after multibyte control symbol
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ptexdir/ChangeLog
trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
Added Paths:
-----------
trunk/Build/source/texk/web2c/ptexdir/tests/control-symbol.tex
Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2017-11-30 01:17:51 UTC (rev 45949)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog 2017-11-30 21:51:10 UTC (rev 45950)
@@ -1,3 +1,9 @@
+2017-11-30 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
+
+ * ptex-base.ch: Suppress a space character printed after the name
+ of a multibyte control symbol in print_cs().
+ * tests/control-symbol.tex: Added.
+
2017-10-04 Hironori Kitagawa <h_kitagawa2001 at yahoo.co.jp>
* ptex-base.ch: Direction check in \discretionary.
Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2017-11-30 01:17:51 UTC (rev 45949)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch 2017-11-30 21:51:10 UTC (rev 45950)
@@ -1410,6 +1410,30 @@
tats
@z
+ at x [17.???] l.???? - pTeX multibyte control symbol
+procedure print_cs(@!p:integer); {prints a purported control sequence}
+ at y
+procedure print_cs(@!p:integer); {prints a purported control sequence}
+var j, l:pool_pointer; @!cat:0..max_char_code;
+ at z
+
+ at x
+else begin print_esc(text(p));
+ print_char(" ");
+ end;
+ at y
+else begin l:=text(p);
+ print_esc(l); j:=str_start[l]; l:=str_start[l+1];
+ if l>j+1 then begin
+ if l-j=multistrlen(ustringcast(str_pool), l, j) then
+ begin cat:=kcat_code(kcatcodekey(fromBUFF(ustringcast(str_pool), l, j)));
+ if (cat<>other_kchar) then print_char(" ");
+ end
+ else print_char(" "); end
+ else print_char(" ");
+ end;
+ at z
+
@x [18.265] l.5903 - pTeX: \jfont \tfont
primitive("font",def_font,0);@/
@!@:font_}{\.{\\font} primitive@>
Added: trunk/Build/source/texk/web2c/ptexdir/tests/control-symbol.tex
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/tests/control-symbol.tex (rev 0)
+++ trunk/Build/source/texk/web2c/ptexdir/tests/control-symbol.tex 2017-11-30 21:51:10 UTC (rev 45950)
@@ -0,0 +1,80 @@
+\scrollmode
+% plain TeX ソース
+\def\+{A}
+\def\+{A}
+\def\X{\+}
+\def\Y{\+}
+
+\message{■control symbol}
+% 記号類扱いの単文字命令 → control symbol
+% (この時の和文文字の挙動が tex-jp-build#37 の問題)
+\ifx\kanjiskip\undefined
+ \catcode`\+=12
+ \catcode`\+=12
+\else
+ \catcode`\+=12
+ \kcatcode`+=18
+\fi
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+
+\message{■control word}
+% 普通の文字扱いの単文字命令 → control word
+\ifx\kanjiskip\undefined
+ \catcode`\+=11
+ \catcode`\+=11
+\else
+ \catcode`\+=11
+ \kcatcode`+=17
+\fi
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+
+\message{■control word}
+% 複数文字命令 → control word
+\def\ABC{A}
+\def\あいう{A}
+\def\X{\ABC}
+\def\Y{\あいう}
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+
+% csname
+\ifx\protected\undefined\else
+\catcode`\:=12
+\ifx\kanjiskip\undefined\else
+\kcatcode`!=18
+\fi
+\message{■csname}
+\protected\expandafter\def\csname :AB\endcsname{A}
+\protected\expandafter\def\csname !あい\endcsname{A}
+\edef\X{\csname :AB\endcsname}
+\edef\Y{\csname !あい\endcsname}
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+
+\protected\expandafter\def\csname AB:\endcsname{A}
+\protected\expandafter\def\csname あい!\endcsname{A}
+\edef\X{\csname AB:\endcsname}
+\edef\Y{\csname あい!\endcsname}
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+
+\ifx\ucs\undefined\else
+\message{■not_cjk}
+\kcatcode`ア=15
+\kcatcode`!=15
+\catcode"8A=12\relax
+\protected\expandafter\def\csname ア\endcsname{A}
+\protected\expandafter\def\csname !\endcsname{A}
+\edef\X{\csname ア\endcsname}
+\edef\Y{\csname !\endcsname}
+\show\X\relax\message{(\meaning\X)}
+\show\Y\relax\message{(\meaning\Y)}
+\fi
+\fi
+
+
+\end
+
+
Property changes on: trunk/Build/source/texk/web2c/ptexdir/tests/control-symbol.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list