1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
% File ucode.tex:
% (0) sets \czech, \slovak to Cork encoded hyphen-pattern numbers,
% (1) sets \catcode, \l/uccode for characters (code by Cork),
% (2) defines \csaccents for new behavior of \v, \', etc (code by Cork),
% (3) defines some \sequences for special cs-fonts characters.
% (4) redefines character-like macros from plainTeX as \chardef
% (5) if encTeX with \mubytein>0 is activated reads t1enc-u.tex file
%
% Created by Petr Olsak <olsak@math.feld.cvut.cz>, November 2012
\def\tmp#1#2\relax{\def\tmp{#2}}\tmp ^^^^abcd\relax
\ifx\tmp\empty \else
\errhelp={The ucode.tex file expects the TeX engine which work in Unicode
internally.}
\errmessage{Sorry, the Unicoded TeX engine (like luatex, xetex) is not detected}
\endinput \fi
\message{Font encoding set to Unicode.}
\let\unicoded\font % macros can do \ifx\font\unicoded ...\else...\fi
%% (0) \czech, \slovak. You can use \chyph, \shyph after this file is loaded.
\ifx\czUnicode\undefined
\message{WARNING: czech+slovak hyphenation patterns are not loaded in Unicode.}
\else
\csname unicodelangs\endcsname
\fi
%% (1a) \catcodes:
\catcode225=11 % a-acute
\catcode193=11 % A-acute
\catcode228=11 % a-diaeresis
\catcode196=11 % A-diaeresis
\catcode269=11 % c-caron
\catcode268=11 % C-caron
\catcode271=11 % d-caron
\catcode270=11 % D-caron
\catcode233=11 % e-acute
\catcode201=11 % E-acute
\catcode283=11 % e-caron
\catcode282=11 % E-caron
\catcode237=11 % i-acute
\catcode205=11 % I-acute
\catcode314=11 % l-acute
\catcode313=11 % L-acute
\catcode318=11 % l-caron
\catcode317=11 % L-caron
\catcode328=11 % n-caron
\catcode327=11 % N-caron
\catcode243=11 % o-acute
\catcode211=11 % O-acute
\catcode244=11 % o-circumflex
\catcode212=11 % O-circumflex
\catcode246=11 % o-diaeresis
\catcode214=11 % O-diaeresis
\catcode341=11 % r-acute
\catcode340=11 % R-acute
\catcode345=11 % r-caron
\catcode344=11 % R-caron
\catcode353=11 % s-caron
\catcode352=11 % S-caron
\catcode357=11 % t-caron
\catcode356=11 % T-caron
\catcode250=11 % u-acute
\catcode218=11 % U-acute
\catcode367=11 % u-ring
\catcode366=11 % U-ring
\catcode252=11 % u-diaeresis
\catcode220=11 % U-diaeresis
\catcode253=11 % y-acute
\catcode221=11 % Y-acute
\catcode382=11 % z-caron
\catcode381=11 % Z-caron
%% (1b) \lccodes, \uccodes
\def\tmp #1 #2 {\lccode#1=#1 \lccode#2=#1 \uccode#1=#2 \uccode#2=#2 }
\tmp 225 193
\tmp 228 196
\tmp 269 268
\tmp 271 270
\tmp 233 201
\tmp 283 282
\tmp 237 205
\tmp 314 313
\tmp 318 317
\tmp 328 327
\tmp 243 211
\tmp 244 212
\tmp 246 214
\tmp 341 340
\tmp 345 344
\tmp 353 352
\tmp 357 356
\tmp 250 218
\tmp 367 366
\tmp 252 220
\tmp 253 221
\tmp 382 381
%% (2) \csaccents, \cmaccents
\def\accentscommands{\string\^,\string\`,\string\',\string\v,\string\",%
\string\r,\string\c,\string\~,\string\H,\string\u,%
\string\. and \string\k}
\def\csaccentsmessage{%
\message{The \accentscommands\space expands to characters by Unicode.}}
\ifx\cmaccentsmessage\undefined
\def\cmaccentsmessage{%
\message{The \accentscommands\space are defined similar as plainTeX.}}
\fi
\def\csaccents{\csaccentsmessage
\def\^##1{\ifx o##1^^f4\else
\ifx O##1^^d4\else
\ifx a##1^^e2\else
\ifx A##1^^c2\else
\ifx e##1^^ea\else
\ifx E##1^^ca\else
\ifx i##1^^ee\else
\ifx I##1^^ce\else
\ifx u##1^^fb\else
\ifx U##1^^db\else
{\accent"005E ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}\let\^^D=\^%
\def\`##1{\ifx a##1^^e0\else
\ifx A##1^^c0\else
\ifx e##1^^e8\else
\ifx E##1^^c8\else
\ifx i##1^^ec\else
\ifx I##1^^cc\else
\ifx o##1^^f2\else
\ifx O##1^^d2\else
\ifx u##1^^f9\else
\ifx U##1^^d9\else
{\accent"0060 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\'##1{\ifx a##1^^e1\else
\ifx e##1^^e9\else
\ifx\i##1^^ed\else
\ifx i##1^^ed\else
\ifx o##1^^f3\else
\ifx u##1^^fa\else
\ifx y##1^^fd\else
\ifx r##1^^^^0155\else
\ifx l##1^^^^013a\else
\ifx A##1^^c1\else
\ifx E##1^^c9\else
\ifx I##1^^cd\else
\ifx O##1^^d3\else
\ifx U##1^^da\else
\ifx Y##1^^dd\else
\ifx R##1^^^^0154\else
\ifx L##1^^^^0139\else
\ifx C##1^^^^0106\else
\ifx N##1^^^^0143\else
\ifx S##1^^^^015a\else
\ifx Z##1^^^^0179\else
\ifx c##1^^^^0107\else
\ifx n##1^^^^0144\else
\ifx s##1^^^^015b\else
\ifx z##1^^^^017a\else
{\accent"00B4 ##1}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\v##1{\ifx e##1^^^^011b\else
\ifx s##1^^^^0161\else
\ifx c##1^^^^010d\else
\ifx r##1^^^^0159\else
\ifx z##1^^^^017e\else
\ifx d##1^^^^010f\else
\ifx t##1^^^^0165\else
\ifx l##1^^^^013e\else
\ifx n##1^^^^0148\else
\ifx E##1^^^^011a\else
\ifx S##1^^^^0160\else
\ifx C##1^^^^010c\else
\ifx R##1^^^^0158\else
\ifx Z##1^^^^017d\else
\ifx D##1^^^^010e\else
\ifx T##1^^^^0164\else
\ifx L##1^^^^013d\else
\ifx N##1^^^^0147\else
{\accent"02C7 ##1}%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi}\let\^^_=\v%
\def\"##1{\ifx a##1^^e4\else
\ifx o##1^^f6\else
\ifx u##1^^fc\else
\ifx A##1^^c4\else
\ifx O##1^^d6\else
\ifx U##1^^dc\else
\ifx Y##1^^^^0178\else
\ifx E##1^^cb\else
\ifx I##1^^cf\else
\ifx y##1^^b8\else
\ifx e##1^^eb\else
\ifx i##1^^ef\else
{\accent"00A8 ##1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}%
\def\r##1{\ifx u##1^^^^016f\else
\ifx U##1^^^^016e\else
\ifx A##1^^c5\else
\ifx a##1^^e5\else
{\accent"00B0 ##1}\fi\fi\fi\fi}%
\def\c##1{\ifx C##1^^c7\else
\ifx c##1^^e7\else
\ifx S##1^^^^015e\else
\ifx s##1^^^^015f\else
\ifx T##1^^^^0162\else
\ifx t##1^^^^0163\else
{\char"00B8 ##1}\fi\fi\fi\fi\fi\fi}%
\def\~##1{\ifx A##1^^c3\else
\ifx N##1^^d1\else
\ifx O##1^^d5\else
\ifx a##1^^e3\else
\ifx n##1^^f1\else
\ifx o##1^^f5\else
{\accent"007E ##1}\fi\fi\fi\fi\fi\fi}%
\def\H##1{\ifx O##1^^^^0150\else
\ifx U##1^^^^0170\else
\ifx o##1^^^^0151\else
\ifx u##1^^^^0171\else
{\accent"02DD ##1}\fi\fi\fi\fi}%
\def\u##1{\ifx A##1^^^^0102\else
\ifx G##1^^^^011e\else
\ifx a##1^^^^0103\else
\ifx g##1^^^^011f\else
{\accent"02D8 ##1}\fi\fi\fi\fi}%
\def\=##1{\ifx d##1^^^^0111\else
{\accent"00AF ##1}\fi}%
\def\.##1{\ifx i##1^^69\else
\ifx z##1^^^^017c\else
\ifx I##1^^^^0130\else
\ifx Z##1^^^^017b\else
{\accent"02D9 ##1}\fi\fi\fi\fi}%
\def\k##1{\ifx A##1^^^^0104\else
\ifx E##1^^^^0118\else
\ifx a##1^^^^0105\else
\ifx e##1^^^^0119\else
{\char"02DB ##1}\fi\fi\fi\fi}%
%% for backward compatibility:
\def\softd{\v{d}}\def\softt{\v{t}}\def\ou{\r{u}}%
\def\softl{\v{l}}\def\softL{\v{L}}}
\def\cmaccents{\cmaccentsmessage
\def\^##1{{\accent94 ##1}}\let\^^D=\^%
\def\`##1{{\accent18 ##1}}%
\def\'##1{{\accent19 ##1}}%
\def\v##1{{\accent20 ##1}}\let\^^_=\v%
\def\"##1{{\accent"7F ##1}}%
\let\r=\undefined\def\ou{{\accent6u}}}
\ifx\r\undefined \else \csaccents \fi %% re-set \csaccents
%% (3) special \sequences for UNICODEd fonts.
%% Czech left a right double qoutes
\chardef\clqq="201E \sfcode"201E=0
\chardef\crqq="201C \sfcode"201C=0
%% French double quotes
\chardef\flqq="00AB \sfcode"00AB=0
\chardef\frqq="00BB \sfcode"00BB=0
%% Other characters
\def\ogonek #1{\setbox0\hbox{#1}\ifdim\ht0=1ex\accent"02DB #1%
\else{\ooalign{\unhbox0\crcr\hss\char"02DB}}\fi}
\chardef\promile="2030
%% Alternative \hyphenchar ("je-li" is no "je\hyphenchar li").
\let\extrahyphenchar=\undefined
\let\extrahyphens=\undefined
%% The czech quotes:
\def\uv{\bgroup\aftergroup\closequotes\leavevmode
\afterassignment\clqq\let\next=}
\def\closequotes{\unskip\crqq\relax}
%% (4) re-definition character-like macros from plainTeX:
\chardef \S 167
\chardef \P 182
\chardef \ss 223
\chardef \L 321
\chardef \l 322
\chardef \ae 230
\chardef \oe 339
\chardef \o 248
\chardef \AE 198
\chardef \OE 338
\chardef \O 216
\chardef \i 305
\chardef \j 567
\chardef \aa 229
\chardef \AA 197
% new characters in T1 encoding:
\chardef \Eth 272
\chardef \NG 330
\chardef \Thorn 222
\chardef \eth 273
\chardef \ng 331
\chardef \thorn 254
\chardef \flq 8249
\chardef \frq 8250
\chardef \clq 8218
\chardef \crq 8219
\chardef \elqq 8220
\chardef \erqq 8221
\chardef \sterling 163
\let\pound=\sterling
%% (5) reading UTF-8 input encoding from t1enc-u.tex file
\ifx\mubytein\undefined \expandafter \endinput \fi
\ifnum\mubytein=0 \expandafter \endinput \fi
\input t1enc-u
\endinput
|