summaryrefslogtreecommitdiff
path: root/tex/context/base/enco-def.tex
blob: a0d56c67496d1482cebb41b60ddc58b7d59cd69c (plain)
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
%D \module
%D   [     file=enco-def,
%D      version=2000.05.07, % 2000.20.12, % split from less verbose base file
%D        title=\CONTEXT\ Encoding Macros,
%D     subtitle=Default Character Definitions,
%D       author=Hans Hagen,
%D         date=\currentdate,
%D    copyright=PRAGMA-ADE]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Instead of overloading plain \TEX\ macros (and keeping them
%D available as an escape), we now use the more verbose
%D definitions in this file. Since memory is less a problem
%D these days, this verbosity has only a small price, but we
%D gain readability. The following definitions are based on
%D usage of the the original \TEX\ fonts, where composed
%D characters were not part of the design. So, occasionally
%D we have to revert to hacks. Thanks to all those users who
%D helped me to fill in the details!

\startencoding[default]

\definecharacter textcomma         ,
\definecharacter textperiod        .

\definecharacter textacute         19
\definecharacter textbottomdot     46
\definecharacter textbreve         21
\definecharacter textcaron         20
\definecharacter textcedilla       24
\definecharacter textcircumflex    94
\definecharacter textdiaeresis    127
\definecharacter textdotaccent     95
\definecharacter textgrave         18
\definecharacter texthungarumlaut 125
\definecharacter textmacron        22
\definecharacter textogonek        24 % fake
\definecharacter textring          23
\definecharacter texttilde        126

\definecharacter dotlessi         {\char"10 }
\definecharacter dotlessj         {\char"11 }
\definecharacter dotlessI         {I}
\definecharacter dotlessJ         {J}

\definecharacter endash           123
\definecharacter emdash           124

\definecharacter aeligature       {\char26 } % "1A
\definecharacter AEligature       {\char29 } % "1D
\definecharacter ijligature       {ij}
\definecharacter IJligature       {IJ}
\definecharacter oeligature       {\char27 } % "1B
\definecharacter OEligature       {\char30 } % "1E

\definecharacter ssharp           {\char25 } % "19
\definecharacter Ssharp           {SS}

\definecharacter thorn            {\missingglyph}
\definecharacter Thorn            {\missingglyph}

\definecharacter eth              {\missingglyph}
\definecharacter Eth              {\missingglyph}

\definecharacter exclamdown        60
\definecharacter questiondown      62

\definecharacter copyright        {\encircled{\txx C}}
\definecharacter registered       {\encircled{\txx R}}
\definecharacter trademark        {\high{\txx TM}}

\definecharacter sectionmark      {\mathematics{\mathhexbox278}}
\definecharacter paragraphmark    {\mathematics{\mathhexbox27B}}

\definecharacter onequarter       {\vulgarfraction{1}{4}}
\definecharacter onehalf          {\vulgarfraction{1}{2}}
\definecharacter threequarter     {\vulgarfraction{3}{4}}

\definecharacter onesuperior      {\high{1}}
\definecharacter twosuperior      {\high{2}}
\definecharacter threesuperior    {\high{3}}

\definecharacter textcent         {c}
\definecharacter textcurrency     {\missingglyph}
\definecharacter textdollar       {\fakedollar}
\definecharacter texteuro         {E}
\definecharacter textflorin       {\fakeflorin}
\definecharacter textsterling     {\fakesterling}
\definecharacter textyen          {Y}

\definecharacter ordfeminine      {\high{\txx a}}
\definecharacter ordmasculine     {\high{\txx o}}

\definecharacter percent          {\fakepercent}
\definecharacter perthousand      {\fakeperthousand}

\definecharacter softhyphen        45
\definecharacter periodcentered   {\mathematics\cdot}
\definecharacter compoundwordmark  23

\definecharacter textasciicircum    94
\definecharacter textasciitilde    126
\definecharacter textslash          47
\definecharacter textbackslash    {\tex{}} % todo
\definecharacter textbraceleft    {\mathematics\{}
\definecharacter textbraceright   {\mathematics\}}
\definecharacter textunderscore   {\fakeunderscore}
\definecharacter textvisiblespace {\fakevisiblespace}

\definecharacter textbrokenbar    {\mathematics\vert}
\definecharacter textbullet       {\mathematics\bullet}
\definecharacter textdag          {\mathematics\dag}
\definecharacter textddag         {\mathematics\ddag}
\definecharacter textdegree       {\mathematics{{}^{\circ}}}
\definecharacter textdiv          {\mathematics\div}
\definecharacter textellipsis     {\mathematics\cdots}
\definecharacter textfraction     {\mathematics/}
\definecharacter textlognot       {\mathematics\neg}
\definecharacter textminus        {\mathematics-}
\definecharacter textmu           {\mathematics\mu}
\definecharacter textmultiply     {\mathematics\times}
\definecharacter textpm           {\mathematics\pm}

\definecharacter quotedbl         {"}
\definecharacter quotedblbase     {,,}
\definecharacter quotedblleft     {``}
\definecharacter quotedblright    {''}

\definecharacter quotesingle      {`}
\definecharacter quotesinglebase  {,}

\definecharacter quoteleft        {`}
\definecharacter quoteright       {'}

\definecharacter guilsingleleft   {\fakeleftsubguillemot }
\definecharacter guilsingleright  {\fakerightsubguillemot}

\definecharacter leftguillemot    {\fakeleftguillemot }
\definecharacter rightguillemot   {\fakerightguillemot}

\definecharacter Acircumflex      {\buildtextaccent\textcircumflex A}
\definecharacter acircumflex      {\buildtextaccent\textcircumflex a}
\definecharacter Ccircumflex      {\buildtextaccent\textcircumflex C}
\definecharacter ccircumflex      {\buildtextaccent\textcircumflex c}
\definecharacter Ecircumflex      {\buildtextaccent\textcircumflex E}
\definecharacter ecircumflex      {\buildtextaccent\textcircumflex e}
\definecharacter Gcircumflex      {\buildtextaccent\textcircumflex G}
\definecharacter gcircumflex      {\buildtextaccent\textcircumflex g}
\definecharacter Hcircumflex      {\buildtextaccent\textcircumflex H}
\definecharacter hcircumflex      {\buildtextaccent\textcircumflex h}
\definecharacter Icircumflex      {\buildtextaccent\textcircumflex \dotlessI}
\definecharacter icircumflex      {\buildtextaccent\textcircumflex \dotlessi}
\definecharacter Jcircumflex      {\buildtextaccent\textcircumflex \dotlessJ}
\definecharacter jcircumflex      {\buildtextaccent\textcircumflex \dotlessj}
\definecharacter Ocircumflex      {\buildtextaccent\textcircumflex O}
\definecharacter ocircumflex      {\buildtextaccent\textcircumflex o}
\definecharacter Scircumflex      {\buildtextaccent\textcircumflex S}
\definecharacter scircumflex      {\buildtextaccent\textcircumflex s}
\definecharacter Ucircumflex      {\buildtextaccent\textcircumflex U}
\definecharacter ucircumflex      {\buildtextaccent\textcircumflex u}
\definecharacter Wcircumflex      {\buildtextaccent\textcircumflex W}
\definecharacter wcircumflex      {\buildtextaccent\textcircumflex w}
\definecharacter Ycircumflex      {\buildtextaccent\textcircumflex Y}
\definecharacter ycircumflex      {\buildtextaccent\textcircumflex y}

\definecharacter Agrave           {\buildtextaccent\textgrave A}
\definecharacter agrave           {\buildtextaccent\textgrave a}
\definecharacter Egrave           {\buildtextaccent\textgrave E}
\definecharacter egrave           {\buildtextaccent\textgrave e}
\definecharacter Igrave           {\buildtextaccent\textgrave \dotlessI}
\definecharacter igrave           {\buildtextaccent\textgrave \dotlessi}
\definecharacter Ograve           {\buildtextaccent\textgrave O}
\definecharacter ograve           {\buildtextaccent\textgrave o}
\definecharacter Ugrave           {\buildtextaccent\textgrave U}
\definecharacter ugrave           {\buildtextaccent\textgrave u}
\definecharacter Ygrave           {\buildtextaccent\textgrave Y}
\definecharacter ygrave           {\buildtextaccent\textgrave y}

\definecharacter Atilde           {\buildtextaccent\texttilde A}
\definecharacter atilde           {\buildtextaccent\texttilde a}
\definecharacter Itilde           {\buildtextaccent\texttilde \dotlessI}
\definecharacter itilde           {\buildtextaccent\texttilde \dotlessi}
\definecharacter Ntilde           {\buildtextaccent\texttilde N}
\definecharacter ntilde           {\buildtextaccent\texttilde n}
\definecharacter Otilde           {\buildtextaccent\texttilde O}
\definecharacter otilde           {\buildtextaccent\texttilde o}
\definecharacter Utilde           {\buildtextaccent\texttilde U}
\definecharacter utilde           {\buildtextaccent\texttilde u}

\definecharacter Adiaeresis       {\buildtextaccent\textdiaeresis A}
\definecharacter adiaeresis       {\buildtextaccent\textdiaeresis a}
\definecharacter Ediaeresis       {\buildtextaccent\textdiaeresis E}
\definecharacter ediaeresis       {\buildtextaccent\textdiaeresis e}
\definecharacter Idiaeresis       {\buildtextaccent\textdiaeresis \dotlessI}
\definecharacter idiaeresis       {\buildtextaccent\textdiaeresis \dotlessi}
\definecharacter Odiaeresis       {\buildtextaccent\textdiaeresis O}
\definecharacter odiaeresis       {\buildtextaccent\textdiaeresis o}
\definecharacter Udiaeresis       {\buildtextaccent\textdiaeresis U}
\definecharacter udiaeresis       {\buildtextaccent\textdiaeresis u}
\definecharacter Ydiaeresis       {\buildtextaccent\textdiaeresis Y}
\definecharacter ydiaeresis       {\buildtextaccent\textdiaeresis y}

\definecharacter Aacute           {\buildtextaccent\textacute A}
\definecharacter aacute           {\buildtextaccent\textacute a}
\definecharacter Cacute           {\buildtextaccent\textacute C}
\definecharacter cacute           {\buildtextaccent\textacute c}
\definecharacter Eacute           {\buildtextaccent\textacute E}
\definecharacter eacute           {\buildtextaccent\textacute e}
\definecharacter Iacute           {\buildtextaccent\textacute \dotlessI}
\definecharacter iacute           {\buildtextaccent\textacute \dotlessi}
\definecharacter Lacute           {\buildtextaccent\textacute L}
\definecharacter lacute           {\buildtextaccent\textacute l}
\definecharacter Nacute           {\buildtextaccent\textacute N}
\definecharacter nacute           {\buildtextaccent\textacute n}
\definecharacter Oacute           {\buildtextaccent\textacute O}
\definecharacter oacute           {\buildtextaccent\textacute o}
\definecharacter Racute           {\buildtextaccent\textacute R}
\definecharacter racute           {\buildtextaccent\textacute r}
\definecharacter Sacute           {\buildtextaccent\textacute S}
\definecharacter sacute           {\buildtextaccent\textacute s}
\definecharacter Uacute           {\buildtextaccent\textacute U}
\definecharacter uacute           {\buildtextaccent\textacute u}
\definecharacter Yacute           {\buildtextaccent\textacute Y}
\definecharacter yacute           {\buildtextaccent\textacute y}
\definecharacter Zacute           {\buildtextaccent\textacute Z}
\definecharacter zacute           {\buildtextaccent\textacute z}

%definecharacter Dstroke          {D}
%definecharacter dstroke          {d}

\definecharacter dstroke          {\pseudoencodeddj}
\definecharacter Dstroke          {\pseudoencodedDJ}
\definecharacter Hstroke          {H}
\definecharacter hstroke          {h}
\definecharacter Tstroke          {T}
\definecharacter tstroke          {t}

\definecharacter Cdotaccent       {\buildtextaccent\textdotaccent C}
\definecharacter cdotaccent       {\buildtextaccent\textdotaccent c}
\definecharacter Edotaccent       {\buildtextaccent\textdotaccent E}
\definecharacter edotaccent       {\buildtextaccent\textdotaccent e}
\definecharacter Gdotaccent       {\buildtextaccent\textdotaccent G}
\definecharacter gdotaccent       {\buildtextaccent\textdotaccent g}
\definecharacter Idotaccent       {\buildtextaccent\textdotaccent \dotlessI}
\definecharacter idotaccent       {\buildtextaccent\textdotaccent \dotlessi}
\definecharacter Zdotaccent       {\buildtextaccent\textdotaccent Z}
\definecharacter zdotaccent       {\buildtextaccent\textdotaccent z}

\definecharacter Amacron          {\buildtextaccent\textmacron A}
\definecharacter amacron          {\buildtextaccent\textmacron a}
\definecharacter Emacron          {\buildtextaccent\textmacron E}
\definecharacter emacron          {\buildtextaccent\textmacron e}
\definecharacter Imacron          {\buildtextaccent\textmacron \dotlessI}
\definecharacter imacron          {\buildtextaccent\textmacron \dotlessi}
\definecharacter Omacron          {\buildtextaccent\textmacron O}
\definecharacter omacron          {\buildtextaccent\textmacron o}
\definecharacter Umacron          {\buildtextaccent\textmacron U}
\definecharacter umacron          {\buildtextaccent\textmacron u}

\definecharacter Ccedilla         {\buildtextcedilla C}
\definecharacter ccedilla         {\buildtextcedilla c}
\definecharacter Kcedilla         {\buildtextcedilla K}
\definecharacter kcedilla         {\buildtextcedilla k}
\definecharacter Lcedilla         {\buildtextcedilla L}
\definecharacter lcedilla         {\buildtextcedilla l}
\definecharacter Ncedilla         {\buildtextcedilla N}
\definecharacter ncedilla         {\buildtextcedilla n}
\definecharacter Rcedilla         {\buildtextcedilla R}
\definecharacter rcedilla         {\buildtextcedilla r}
\definecharacter Scedilla         {\buildtextcedilla S}
\definecharacter scedilla         {\buildtextcedilla s}
\definecharacter Tcedilla         {\buildtextcedilla T}
\definecharacter tcedilla         {\buildtextcedilla t}

\definecharacter Ohungarumlaut    {\buildtextaccent\texthungarumlaut O}
\definecharacter ohungarumlaut    {\buildtextaccent\texthungarumlaut o}
\definecharacter Uhungarumlaut    {\buildtextaccent\texthungarumlaut U}
\definecharacter uhungarumlaut    {\buildtextaccent\texthungarumlaut u}

\definecharacter Aogonek          {\buildtextogonek A}
\definecharacter aogonek          {\buildtextogonek a}
\definecharacter Eogonek          {\buildtextogonek E}
\definecharacter eogonek          {\buildtextogonek e}
\definecharacter Iogonek          {\buildtextogonek I}
\definecharacter iogonek          {\buildtextogonek i}
\definecharacter Uogonek          {\buildtextogonek U}
\definecharacter uogonek          {\buildtextogonek u}

\definecharacter Aring            {\buildtextaccent\textring A}
\definecharacter aring            {\buildtextaccent\textring a}
\definecharacter Uring            {\buildtextaccent\textring U}
\definecharacter uring            {\buildtextaccent\textring u}

\definecharacter Abreve           {\buildtextaccent\textbreve A}
\definecharacter abreve           {\buildtextaccent\textbreve a}
\definecharacter Ebreve           {\buildtextaccent\textbreve E}
\definecharacter ebreve           {\buildtextaccent\textbreve e}
\definecharacter Gbreve           {\buildtextaccent\textbreve G}
\definecharacter gbreve           {\buildtextaccent\textbreve g}
\definecharacter Ibreve           {\buildtextaccent\textbreve \dotlessI}
\definecharacter ibreve           {\buildtextaccent\textbreve \dotlessi}
\definecharacter Obreve           {\buildtextaccent\textbreve O}
\definecharacter obreve           {\buildtextaccent\textbreve o}
\definecharacter Ubreve           {\buildtextaccent\textbreve U}
\definecharacter ubreve           {\buildtextaccent\textbreve u}

\definecharacter Ccaron           {\buildtextaccent\textcaron C}
\definecharacter ccaron           {\buildtextaccent\textcaron c}
\definecharacter Dcaron           {\buildtextaccent\textcaron D}
\definecharacter dcaron           {\buildtextaccent\textcaron d}
\definecharacter Ecaron           {\buildtextaccent\textcaron E}
\definecharacter ecaron           {\buildtextaccent\textcaron e}
\definecharacter Lcaron           {\buildtextaccent\textcaron L}
\definecharacter lcaron           {\buildtextaccent\textcaron l}
\definecharacter Ncaron           {\buildtextaccent\textcaron N}
\definecharacter ncaron           {\buildtextaccent\textcaron n}
\definecharacter Rcaron           {\buildtextaccent\textcaron R}
\definecharacter rcaron           {\buildtextaccent\textcaron r}
\definecharacter Scaron           {\buildtextaccent\textcaron S}
\definecharacter scaron           {\buildtextaccent\textcaron s}
\definecharacter Tcaron           {\buildtextaccent\textcaron T}
\definecharacter tcaron           {\buildtextaccent\textcaron t}
\definecharacter Ycaron           {\buildtextaccent\textcaron Y}
\definecharacter ycaron           {\buildtextaccent\textcaron y}
\definecharacter Zcaron           {\buildtextaccent\textcaron Z}
\definecharacter zcaron           {\buildtextaccent\textcaron z}

\definecharacter Lstroke          {\hsmash{\char32}L}
\definecharacter lstroke          {\hsmash{\char32}l}
\definecharacter Ostroke          {\char31 } % "1F
\definecharacter ostroke          {\char28 } % "1C

\definecharacter aumlaut          {\moveaccent{-.1ex}\adiaeresis}
\definecharacter eumlaut          {\moveaccent{-.1ex}\ediaeresis}
\definecharacter iumlaut          {\moveaccent{-.1ex}\idiaeresis}
\definecharacter oumlaut          {\moveaccent{-.1ex}\odiaeresis}
\definecharacter uumlaut          {\moveaccent{-.1ex}\udiaeresis}

\definecharacter Aumlaut          {\smashaccent\Adiaeresis}
\definecharacter Eumlaut          {\smashaccent\Ediaeresis}
\definecharacter Iumlaut          {\smashaccent\Idiaeresis}
\definecharacter Oumlaut          {\smashaccent\Odiaeresis}
\definecharacter Uumlaut          {\smashaccent\Udiaeresis}

\definecharacter scommaaccent     {s\quoteright}
\definecharacter Scommaaccent     {S\quoteright}
\definecharacter tcommaaccent     {t\quoteright}
\definecharacter Tcommaaccent     {T\quoteright}

\stopencoding

%D A few goodies:

\def\eszett  {\ssharp}
\def\Eszett  {\Ssharp}

\def\lslash  {\lstroke}
\def\Lslash  {\Lstroke}
\def\dslash  {\dstroke}
\def\Dslash  {\Dstroke}
\def\oslash  {\ostroke}
\def\Oslash  {\Ostroke}

% for plain tex's sake

\def\S       {\sectionmark  }
\def\P       {\paragraphmark}

% for latex users sake

\def\textS   {\sectionmark  }
\def\textP   {\paragraphmark}

% for old times sake

\def\florin  {\textflorin  }  \def\florijn{\textflorin}
\def\dollar  {\textdollar  }
\def\pound   {\textsterling}
\def\sterling{\textsterling}

% idem

\def\promille{\perthousand}
\def\permille{\perthousand}
\def\procent {\percent }
\def\permine {\fakepermine}

% some more

\def\hyphen  {\softhyphen}
\def\cwm     {\compoundwordmark}

% quotes

\def\lowerleftsingleninequote  {\quotesinglebase}
\def\lowerleftdoubleninequote  {\quotedblbase}
\def\lowerrightsingleninequote {\quotesinglebase}
\def\lowerrightdoubleninequote {\quotedblbase}

\def\upperleftsingleninequote  {\quoteright}
\def\upperleftdoubleninequote  {\quotedblright}
\def\upperrightsingleninequote {\quoteright}
\def\upperrightdoubleninequote {\quotedblright}

\def\upperleftsinglesixquote   {\quoteleft}
\def\upperleftdoublesixquote   {\quotedblleft}
\def\upperrightsinglesixquote  {\quoteleft}
\def\upperrightdoublesixquote  {\quotedblleft}

\def\leftsubguillemot          {\guilsingleleft}
\def\rightsubguillemot         {\guilsingleright}

%D A couple of fallbacks suggestion by users, slightly
%D adapted and obscured by memory saving hacks.

\unprotect

\startencoding[default]

\definecharacter textcent        {c\rlap{\hskip-.2\s!em
  \vrule\!!width.2\s!pt\!!height1.2\s!ex\!!depth.2\s!ex}}

\definecharacter texteuro        {C\rlap{\hskip-.75\s!em
  \vrule\!!width.4\s!em\!!height.85\s!ex\!!depth-.8\s!ex}}

\definecharacter textblacksquare {\dontleavehmode\hbox{%
  \vrule\!!width.3\s!em\!!height.4\s!em\!!depth-.1\s!em}}

\definecharacter textbrokenbar   {\dontleavehmode\hbox{\kern.05\s!em
  \vrule\!!width.4\s!pt\!!height1.8\s!ex\!!depth-.85\s!ex
                                  \llap{%
  \vrule\!!width.4\s!pt\!!height.35\s!ex\!!depth.6\s!ex}%
                                  \kern.05\s!em}}

\stopencoding

\protect

%D We also use symbolic names for math accents.

\startencoding[default]

\definecharacter mathacute      "7013
\definecharacter mathgrave      "7012
\definecharacter mathddot       "707F
\definecharacter mathtilde      "707E
\definecharacter mathbar        "7016
\definecharacter mathbreve      "7015
\definecharacter mathcheck      "7014
\definecharacter mathhat        "705E
\definecharacter mathvec        "017E
\definecharacter mathdot        "705F
\definecharacter mathwidetilde  "0365
\definecharacter mathwidehat    "0362

\stopencoding

\endinput