summaryrefslogtreecommitdiff
path: root/tex/context/base/m-gamma.tex
blob: 05f5d3a42541b229ecce3a0d16003ec5a3418bc5 (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
%D \module
%D   [       file=m-gamma,
%D        version=2002.05.15,
%D          title=\CONTEXT\ Extra Modules,
%D       subtitle=Basic \OMEGA\ Support,
%D         author={Idris Samawi Hamid, Hans Hagen},
%D           date=\currentdate,
%D      copyright={PRAGMA-ADE, Idris Samawi Hamid}]
%D
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

%D Most of this module is written by Idris Samawi Hamid.

%D We define a couple of symbolic \OTP\ filters and
%D sequences. First the filters:
%D
%D Todo: better names, no funny abbreviations.

\definefiltersynonym [utf8 to unicode16]  [inutf8]
\definefiltersynonym [IdOCP]              [id]
\definefiltersynonym [BasicLatinTexUni]   [lat2uni]
\definefiltersynonym [BasicLatinUniToFont][uni2lat]
\definefiltersynonym [GrTexUni]           [grpo2uni]
\definefiltersynonym [GrUniToFont]        [uni2greek]
\definefiltersynonym [ArabUni]            [7arb2uni]
\definefiltersynonym [BerberUni]          [7ber2uni]
\definefiltersynonym [UrduUni]            [7urd2uni]
\definefiltersynonym [AfghaPashtoUni]     [7pas2uni]
\definefiltersynonym [PakiPashtoUni]      [7pap2uni]
\definefiltersynonym [SindhiUni]          [7snd2uni]
\definefiltersynonym [TifinaghUni]        [7tbe2uni]
\definefiltersynonym [LatinBerberUni]     [7lbe2uni]
\definefiltersynonym [UniCUni]            [uni2cuni]
\definefiltersynonym [CUniArab]           [cuni2oar]
\definefiltersynonym [NoKeshidehCUniArab] [cuni2nar]

%D Next we define the sequences.

\definefiltersequence
  [NilOCP]
  [IdOCP]

\definefiltersequence
  [BasicLatinOCP]
  [BasicLatinTexUni,BasicLatinUniToFont]

\definefiltersequence
  [GreekOCP]
  [GrTexUni,GrUniToFont]

\definefiltersequence
  [ArabicOCP]
  [ArabUni,UniCUni,CUniArab]

\definefiltersequence
  [ArabicNoKeshidehOCP]
  [ArabUni,UniCUni,NoKeshidehCUniArab]

\definefiltersequence
  [ArabicBerberOCP]
  [BerberUni,UniCUni,CUniArab]

\definefiltersequence
  [TifinaghOCP]
  [TifinaghUni,BasicLatinUniToFont]

\definefiltersequence
  [LatinBerberOCP]
  [LatinBerberUni,BasicLatinUniToFont]

\definefiltersequence
  [UrduOCP]
  [UrduUni,UniCUni,CUniArab]

\definefiltersequence
  [UrduNoKeshidehOCP]
  [UrduUni,UniCUni,NoKeshidehCUniArab]

\definefiltersequence
  [AfghaPashtoOCP]
  [AfghaPashtoUni,UniCUni,CUniArab]

\definefiltersequence
  [PakiPashtoOCP]
  [PakiPashtoUni,UniCUni,CUniArab]

\definefiltersequence
  [SindhiOCP]
  [SindhiUni,UniCUni,CUniArab]

%D We wrap a couple of languages in environmen tmacros.
%D beware: this solution is far from perfect!
%D
%D Todo: better interface to directional primitives.
%D
%D Todo: proper language support (labels etc).

\definestartstop
  [latin]
  [commands=%
    {\usefiltersequence[BasicLatinOCP]%
     \switchtobodyfont[omlgc]}]

\definestartstop
  [greek]
  [commands=%
    {\usefiltersequence[GreekOCP]%
     \switchtobodyfont[omlgc]%
     \language=3\lefthyphenmin2\righthyphenmin=2}]

\definestartstop
  [arab]
  [commands=%
    {\usefiltersequence[ArabicOCP]
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [smallarab]
  [commands=%
    {\usefiltersequence[ArabicNoKeshidehOCP]
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [latberber]
  [commands=%
    {\usefiltersequence[LatinBerberOCP]
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [tifinagh]
  [commands=%
    {\usefiltersequence[TifinaghOCP]
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [berber]
  [commands=%
    {\usefiltersequence[ArabicBerberOCP]
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [urdu]
  [commands=%
    {\usefiltersequence[UrduOCP]%
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [smallurdu]
  [commands=%
    {\usefiltersequence[UrduNoKeshidehOCP]%
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [pashto]
  [commands=%
    {\usefiltersequence[AfghaPashtoOCP]%
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [pashtop]
  [commands=%
    {\usefiltersequence[PakiPashtoOCP]%
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]

\definestartstop
  [sindhi]
  [commands=%
    {\usefiltersequence[SindhiOCP]%
     \switchtobodyfont[omarb]%
     \textdir TRT\pardir TRT}]


\let\typeout\message \input grlccode.tex

%D We (pre)define a couple of fonts:

\usetypescriptfile[type-omg]

\usetypescript[OmegaArab]
\usetypescript[OmegaLGC]

%D Dangerous definitions:

\startencoding[omega]

  \definecharacter textbraceleft  {^^^^f07b}
  \definecharacter textbraceright {^^^^f07d}
  \definecharacter textbackslash  {^^^^f05c}
  \definecharacter textbullet     {{\clearocplists\mm\sy\char"0F}}
  \definecharacter dotlessi       {^^^^0131}
  \definecharacter ssharp         {^^^^00df}

\stopencoding

\enableencoding [omega]

%D Some logo's:

\unexpanded \def\OMEGA {{\switchtobodyfont[omlgc]^^^^03a9}}
\unexpanded \def\OTP   {\OMEGA TP}

%D A few funny definitions:

\def\#{^^^^f023}
\def\${^^^^f024}
\def\%{^^^^f025}
\def\&{^^^^f026}

%D I have no idea what this has to do with omega:

\def\heshe {\lohi{he} {she}}
\def\himher{\lohi{him}{her}}
\def\hisher{\lohi{his}{her}}

% Brrr

\setuptolerance [verytolerant]

\endinput