Debian Codegraph @

texk/web2c/euptexdir/tests/inhibitglue.tex

raw
1 %#!ptex2pdf -e inhibitglue.tex
2 \font\cmr=cmr10\cmr
3 \font\tentt=cmtt10\tentt
4 \ifx\kanjiskip\undefined\else
5 \ifnum\jis"2121="3000
6 \jfont\jpy=umin10 at 10pt\jpy
7 \else
8 \jfont\jpy=min10 at 10pt\jpy
9 \fi
10 \fi
11
12 \parindent0pt
13 \def\head#1{\par\noindent{\tentt ■\string#1}\par}
14 \noautospacing \noautoxspacing
15
16 %%% unexpandable tokens with non-discardable nodes
17
18 \head{\null}
19 あ)\inhibitglue (あ\par % ベタ
20 あ)\null\inhibitglue (あ\par % 二分
21 あ)\inhibitglue\null (あ\par % 二分
22 あ)\null\inhibitglue\null (あ\par % 全角【TL17二分】
23 あ)\null (あ\par % 全角
24
25 \head{\unbox}
26 \def\unbox{\unhcopy200 }
27 \setbox200=\hbox{}
28 あ)\inhibitglue (あ\par % ベタ
29 あ)\unbox\inhibitglue (あ\par % 二分
30 あ)\inhibitglue\unbox (あ\par % ベタ【TL17二分】
31 あ)\unbox\inhibitglue\unbox (あ\par % 二分
32 あ)\unbox (あ\par % 全角
33 \setbox200=\hbox{漢}
34 あ)\inhibitglue (あ\par % ベタ
35 あ)\unbox\inhibitglue (あ\par % 前二分
36 あ)\inhibitglue\unbox (あ\par % 後二分
37 あ)\unbox\inhibitglue\unbox (あ\par % 前後二分【TL17前二分】
38 あ)\unbox (あ\par % 前後二分
39
40 \head{\vrule}
41 あ)\inhibitglue (あ\par % ベタ
42 あ)\vrule\inhibitglue (あ\par % 二分
43 あ)\inhibitglue\vrule (あ\par % 二分
44 あ)\vrule\inhibitglue\vrule (あ\par % 全角【TL17二分】
45 あ)\vrule (あ\par % 全角
46
47 \head{\discretionary}
48 \def\disc{\discretionary{}{}{}}
49 あ)\inhibitglue (あ\par % ベタ
50 あ)\disc\inhibitglue (あ\par % 二分
51 あ)\inhibitglue\disc (あ\par % 二分
52 あ)\disc\inhibitglue\disc (あ\par % 全角【TL17二分】
53 あ)\disc (あ\par % 全角
54
55 \head{\special}
56 \def\spec{\special{}}
57 あ)\inhibitglue (あ\par % ベタ
58 あ)\spec\inhibitglue (あ\par % 二分
59 あ)\inhibitglue\spec (あ\par % 二分
60 あ)\spec\inhibitglue\spec (あ\par % 全角【TL17二分】
61 あ)\spec (あ\par % 全角
62
63 \head{\write-1}
64 \def\tlog{\write-1{}}
65 あ)\inhibitglue (あ\par % ベタ
66 あ)\tlog\inhibitglue (あ\par % 二分
67 あ)\inhibitglue\tlog (あ\par % 二分
68 あ)\tlog\inhibitglue\tlog (あ\par % 全角【TL17二分】
69 あ)\tlog (あ\par % 全角
70
71 \head{\insert}
72 \def\ins{\insert201{}}
73 あ)\inhibitglue (あ\par % ベタ
74 あ)\inhibitglue\ins (あ\par % 二分
75 あ)\ins\inhibitglue (あ\par % 二分
76 あ)\ins\inhibitglue\ins (あ\par % 全角【TL17二分】
77 あ)\ins (あ\par % 全角
78
79 \head{\mark}
80 \def\mrk{\mark{}}
81 あ)\inhibitglue (あ\par % ベタ
82 あ)\inhibitglue\mrk (あ\par % 二分
83 あ)\mrk\inhibitglue (あ\par % 二分
84 あ)\mrk\inhibitglue\mrk (あ\par % 全角【TL17二分】
85 あ)\mrk (あ\par % 全角
86
87 \head{\vadjust}
88 \def\adj{\vadjust{}}
89 あ)\inhibitglue (あ\par % ベタ
90 あ)\inhibitglue\adj (あ\par % 二分
91 あ)\adj\inhibitglue (あ\par % 二分
92 あ)\adj\inhibitglue\adj (あ\par % 全角【TL17二分】
93 あ)\adj (あ\par % 全角
94
95 %\head{\math}
96 %\def\math{$ $}
97 %あ)\inhibitglue (あ\par % ベタ
98 %あ)\inhibitglue\math (あ\par % 二分
99 %あ)\math\inhibitglue (あ\par % 二分
100 %あ)\math\inhibitglue\math (あ\par % 全角【TL17二分】
101 %あ)\math (あ\par % 全角
102
103 %%% unexpandable tokens with discardable nodes (glue, kern, penalty)
104
105 \head{\hskip0pt}
106 \def\zskip{\hskip0pt}
107 あ)\inhibitglue (あ\par % ベタ
108 あ)\zskip\inhibitglue (あ\par % 二分
109 あ)\inhibitglue\zskip (あ\par % 二分
110 あ)\zskip\inhibitglue\zskip (あ\par % 全角
111 あ)\zskip (あ\par % 全角
112
113 \head{\kern0pt}
114 \def\zkern{\kern0pt}
115 あ)\inhibitglue (あ\par % ベタ
116 あ)\zkern\inhibitglue (あ\par % 二分
117 あ)\inhibitglue\zkern (あ\par % 二分
118 あ)\zkern\inhibitglue\zkern (あ\par % 全角
119 あ)\zkern (あ\par % 全角
120
121 \head{\penalty10000}
122 \def\zpena{\penalty10000 }
123 あ)\inhibitglue (あ\par % ベタ
124 あ)\zpena\inhibitglue (あ\par % 二分
125 あ)\inhibitglue\zpena (あ\par % 二分
126 あ)\zpena\inhibitglue\zpena (あ\par % 全角【TL17二分】
127 あ)\zpena (あ\par % 全角
128
129 %%% unexpandable tokens
130
131 \head{\relax}
132 あ)\inhibitglue (あ\par % ベタ
133 あ)\relax\inhibitglue (あ\par % 二分
134 あ)\inhibitglue\relax (あ\par % ベタ【TL17二分】
135 あ)\relax\inhibitglue\relax (あ\par % 二分
136 あ)\relax (あ\par % 全角
137 ああ\inhibitglue\relax (あ\par % ベタ【TL17二分】
138 ああ\relax\inhibitglue (あ\par % ベタ
139 あ)\relax\inhibitglue ああ\par % 二分
140 あ)\inhibitglue\relax ああ\par % ベタ
141
142 \head{\ignorespaces}
143 \let\ignsp=\ignorespaces
144 あ)\inhibitglue (あ\par % ベタ
145 あ)\ignsp\inhibitglue (あ\par % 二分
146 あ)\inhibitglue\ignsp (あ\par % ベタ【TL17二分】
147 あ)\ignsp\inhibitglue\ignsp (あ\par % 二分
148 あ)\ignsp (あ\par % 全角
149
150 \head{\spacefactor1000}
151 \def\spf{\spacefactor1000 }
152 あ)\inhibitglue (あ\par % ベタ
153 あ)\spf\inhibitglue (あ\par % 二分
154 あ)\inhibitglue\spf (あ\par % ベタ【TL17二分】
155 あ)\spf\inhibitglue\spf (あ\par % 二分
156 あ)\spf (あ\par % 全角
157
158 \head{\let}
159 \def\letab{\let\a\b}
160 あ)\inhibitglue (あ\par % ベタ
161 あ)\letab\inhibitglue (あ\par % 二分
162 あ)\inhibitglue\letab (あ\par % ベタ【TL17二分】
163 あ)\letab\inhibitglue\letab (あ\par % 二分
164 あ)\letab (あ\par % 全角
165
166 %%% grouping
167
168 \head{\group}
169 あ)(あ\par % 一括
170 あ){}(あ\par % 別々
171 あ){}\inhibitglue (あ\par % 左
172 あ)\inhibitglue {}(あ\par % なし【TL17右】
173 あ){}\inhibitglue{}(あ\par % 左
174 あ){\inhibitglue }(あ\par % 左
175 あ)\inhibitglue (あ\par % なし
176 あ)・あ\par % 一括
177 あ){}・あ\par % 別々
178 あ){}\inhibitglue ・あ\par % 左
179 あ)\inhibitglue {}・あ\par % なし【TL17右】
180 あ){}\inhibitglue{}・あ\par % 左
181 あ){\inhibitglue }・あ\par % 左
182 あ)\inhibitglue ・あ\par % なし
183 あ・(あ\par % 一括
184 あ・{}(あ\par % 別々
185 あ・{}\inhibitglue (あ\par % 左
186 あ・\inhibitglue {}(あ\par % なし【TL17右】
187 あ・{}\inhibitglue{}(あ\par % 左
188 あ・{\inhibitglue }(あ\par % 左
189 あ・\inhibitglue (あ\par % なし
190
191
192 \head{\inhibitglue\ at 内側リスト}
193 あ\inhibitglue\setbox0=\vbox{『}(\par % ベタ【TL17二分】
194 あ\setbox0=\hbox{\inhibitglue}(\par % 二分【TL17ベタ】
195 )\setbox0=\hbox{\inhibitglue}(\par % 全角【TL17二分】
196
197 あ\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:二分,「前:二分
198 あ\setbox0=\vbox{\hsize10zw「\inhibitglue}(い\box0\par % (前:二分,「前:二分
199 あ\inhibitglue\setbox0=\vbox{\hsize10zw「}(い\box0\par % (前:ベタ【TL17二分】,「前:二分
200 あ\setbox0=\vbox{\hsize10zw\leavevmode\inhibitglue 「}(い\box0\par % (前:二分,「前:ベタ
201
202
203 %%% \unskip vs \inhibitglue (e-pTeX \lastnodesubtype is required)
204 \ifx\lastnodesubtype\undefined \expandafter\end \fi
205
206 \head{\inhibitglue\ test}
207 \setbox200=\hbox{)\hskip10pt\unskip
208 \xdef\gluetype{\the\lastnodetype}%
209 \xdef\jfmgluesubtype{\the\lastnodesubtype}}
210 \protected\def\removejfmglue{%
211 \ifnum\lastnodetype=\gluetype\relax
212 \ifnum\lastnodesubtype=\jfmgluesubtype\relax
213 \unskip
214 \fi
215 \fi}
216
217 あ)\inhibitglue あ\par % 消える
218 あ)\relax\inhibitglue あ\par % 消えない
219 あ)\relax\removejfmglue あ\par % 消える【新設】
220 %% for tabular environment
221 あ)\hskip20pt\unskip\unskip あ\par % 消える
222 あ)\hskip20pt\unskip\inhibitglue あ\par % 消えない
223 あ)\hskip20pt\unskip\removejfmglue あ\par % 消える【新設】
224
225
226 %% reset \inhibitglue at char_node
227 \vrule\inhibitglue ;あ( % ;前ベタ,;後四分
228
229
230 \bye