cont-log.mkiv /size: 8925 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=cont-log,
3
%D version=1995.10.10,
4
%D title=\CONTEXT\ Miscellaneous Macros,
5
%D subtitle=\TEX\ Logos,
6
%D author=J. Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\writestatus
{
loading
}{
ConTeXt
TeX
Logos
}
15 16
%D The system that is used to typeset this text is called \TEX, typeset with an
17
%D lowered~E. From te beginning of \TEX, authors of macro packages adapted this
18
%D raising and lowering style. In this module we define some of those logos.
19 20
\unprotect
21 22
\unexpanded
\def
\TeX
23
{
\dontleavehmode
24
\begingroup
25
T
%
26
\setbox
\scratchbox
\hbox
{
M
}
%
27
\kern
-
.
1
6
6
7
\wd
\scratchbox
28
\lower
.
5
\exheight
\hbox
{
E
}
%
29
\kern
-
.
1
2
5
\wd
\scratchbox
30
X
%
31
\endgroup
}
32 33
\unexpanded
\def
\TeXsuffix
{
\wordboundary
\TeX
}
34
\unexpanded
\def
\TeXprefix
{
\TeX
\wordboundary
}
35 36
\unexpanded
\def
\ConTeXt
37
{
\dontleavehmode
38
\begingroup
39
Con
%
40
\wordboundary
41
\setbox
\scratchboxone
\hbox
{
T
\kern
\zeropoint
e
}
%
42
\setbox
\scratchboxtwo
\hbox
{
Te
}
%
43
\discretionary
{
-
}{}{
\kern\dimexpr\wd
\scratchboxtwo
-
\wd
\scratchboxone
\relax
}
%
44
\TeX
t
%
45
\endgroup
}
46 47
\unexpanded
\def
\PPCHTeX
{
ppch
\TeX
}
48
\unexpanded
\def
\PRAGMA
{
Pragma
ADE
}
49 50
\unexpanded
\def
\LaTeX
% requested by erik frambach
51
{
\dontleavehmode
52
\begingroup
53
\setbox
\scratchbox
\hbox
{
L
}
%
54
\scratchdimen
\ht
\scratchbox
55
\setbox
\scratchbox
\hbox
{
\doresetattribute
{
case
}
\txx
A
}
%
56
L
\kern
-
.
5
5
\wd
\scratchbox
57
\raise
\scratchdimen
\hbox
{
\lower\ht
\scratchbox
\copy
\scratchbox
}
%
58
\kern
-
.
2
\wd
\scratchbox
\TeX
59
\endgroup
}
60 61
\unexpanded
\def
\TaBlE
62
{
T
%
63
\kern
-
.
2
7
\emwidth
\lower
.
5
\exheight
\hbox
{
A
}
%
64
\kern
-
.
1
8
\emwidth
B
%
65
\kern
-
.
1
\emwidth
\lower
.
5
\exheight
\hbox
{
L
}
%
66
\kern
-
.
0
7
5
\emwidth
E
}
67 68
\unexpanded
\def
\PiCTeX
69
{
P
%
70
\kern
-
.
1
2
\emwidth
\lower
.
5
\exheight
\hbox
{
I
}
%
71
\kern
-
.
0
7
5
\emwidth
C
%
72
\kern
-
.
1
1
\emwidth
\TeX
}
73 74
\def
\syst_logos_ams_script
#
1
%
75
{
\normalstartimath
76
\cal
\ifdim
\bodyfontsize
>
1
.
1
\emwidth
\scriptstyle\fi
#
1
%
77
\normalstopimath
}
78 79
\unexpanded
\def
\AmSTeX
80
{
\dontleavehmode
81
\syst_logos_ams_script
A
%
82
\kern
-
.
1
6
6
7
\emwidth
\lower
.
5
\exheight
\hbox
{
\syst_logos_ams_script
M
}
%
83
\kern
-
.
1
2
5
\emwidth
\syst_logos_ams_script
S
%
84
-
\TeX
}
85 86
\unexpanded
\def
\LamSTeX
87
{
L
%
88
\kern
-
.
4
\emwidth
\raise
.
3
\exheight
\hbox
{
\syst_logos_ams_script
A
}
%
89
\kern
-
.
2
5
\emwidth
\lower
.
4
\exheight
\hbox
{
\syst_logos_ams_script
M
}
%
90
\kern
-
.
1
\emwidth
{
\syst_logos_ams_script
S
}
%
91
-
\TeX
}
92 93
% \unexpanded\def\AmSLaTeX
94
% {\dontleavehmode
95
% \syst_logos_ams_script A%
96
% \kern-.1667\emwidth\lower.5\exheight\hbox{\syst_logos_ams_script M}%
97
% \kern-.125\emwidth{\syst_logos_ams_script S}%
98
% -\LaTeX}
99 100
%D Alternative \CONTEXT\ logo, first Idris S.~Hamid's version:
101
%D
102
%D \def\Context
103
%D {{\sc C\kern -.0667emo\kern -.0667emn\kern -.0549emt\kern
104
%D -.1667em\lower.5ex\hbox {e}\kern -.125emx\kern -.0549emt}}
105
%D
106
%D I changed this into one that adapts itself:
107 108
\unexpanded
\def
\Context
% wrong usage of \getscaledglyph
109
{
\dontleavehmode
110
\begingroup
111
C
%
112
\kern
-
.
0
6
6
7
\emwidth
113
\getscaledglyph
{
.
8
}
\empty
{
%
114
O
\kern
-
.
0
6
6
7
\emwidth
115
N
%
116
\discretionary
{
-
}{}{
\kern
-
.
0
5
4
9
\emwidth
}
%
117
T
%
118
\doifelseitalic
119
{
\kern
-
.
1
\emwidth
}
%
120
{
\kern
-
.
1
6
6
7
\emwidth
}
%
121
\lower
.
5
\exheight
\hbox
{
E
}
%
122
\doifelseitalic
123
\empty
124
{
\kern
-
.
1
1
em
}
%
125
X
%
126
\kern
-
.
0
5
5
\emwidth
127
T
%
128
}
%
129
\endgroup
}
130 131
%D The \METAFONT\ and \METAPOST\ logos adapt themselves to the current fontsize, an
132
%D ugly but usefull hack.
133 134
\let
\logofont
\nullfont
135 136
% \loadmapfile[original-base.map] % stil needed? not if we assume afm
137 138
\unexpanded
\def
\setMFPfont
% more sensitive for low level changes
139
{
\font
\logofont
=
logo
%
140
\ifx
\fontalternative
\s!bf\s!bf
\else
141
\ifx
\fontalternative
\s!it\s!sl
\else
142
\ifx
\fontalternative
\s!sl\s!sl
\else
143
\ifx
\fontalternative
\s!bi\s!bf
\else
144
\ifx
\fontalternative
\s!bs\s!bf
\else
145
\fi\fi\fi\fi\fi
146
1
0
at
\currentfontscale
\bodyfontsize
% there is no afm in the minimals yet
147
\logofont
}
148 149
\def
\syst_logos_meta_hyphen
% there is no hyphenchar in this font
150
{
\discretionary
{
\vrule
\s!height
.
3
3
\emwidth
\s!depth
-
.
2
7
\emwidth
\s!width
.
3
3
\emwidth
}{}{}}
151 152
\unexpanded
\def
\MetaFont
153
{
\dontleavehmode
154
\begingroup
155
\setMFPfont
META
\syst_logos_meta_hyphen
FONT
%
156
\endgroup
}
157 158
% \unexpanded\def\MetaPost
159
% {\dontleavehmode
160
% \begingroup
161
% \setMFPfont META\syst_logos_meta_hyphen POST%
162
% \endgroup}
163
%
164
% As decided on the ConText Meeting 2013 the logo has been simplified:
165 166
\unexpanded
\def
\MetaPost
167
{
MetaPost
}
168 169
\unexpanded
\def
\MetaFun
170
{
MetaFun
}
171 172
%D \macros
173
%D {TEX, METAFONT, METAPOST, METAFUN,
174
%D PICTEX, TABLE,
175
%D CONTEXT, PPCHTEX,
176
%D AMSTEX, LATEX, LAMSTEX}
177
%D
178
%D We define the funny written ones as well as the less error prone upper case names
179
%D (in \CONTEXT\ we tend to write all user defined commands, like abbreviations, in
180
%D uppercase.)
181 182
\unexpanded
\def
\METAFONT
{
\MetaFont
}
183
\unexpanded
\def
\METAPOST
{
\MetaPost
}
184
\unexpanded
\def
\PPCHTEX
{
\PPCHTeX
}
185
\unexpanded
\def
\CONTEXT
{
\ConTeXt
}
186
\unexpanded
\def
\METAFUN
{
\MetaFun
}
187 188
\unexpanded
\def
\TEX
{
\TeX
}
189
\unexpanded
\def
\LATEX
{
\LaTeX
}
190
\unexpanded
\def
\PICTEX
{
\PiCTeX
}
191
\unexpanded
\def
\TABLE
{
\TaBlE
}
192
\unexpanded
\def
\AMSTEX
{
\AmSTeX
}
193
\unexpanded
\def
\LAMSTEX
{
\LamSTeX
}
194
\unexpanded
\def
\INRSTEX
{
inrs
\TeX
}
195 196
%D And this is how they show up: \TeX, \MetaFont, \MetaPost, \PiCTeX, \TaBlE, \ConTeXt,
197
%D \PPCHTeX, \AmSTeX, \LaTeX, \LamSTeX.
198 199
%D Some placeholders:
200 201
\unexpanded
\def
\eTeX
{
\mathematics
{
\varepsilon
}
-
\TeX
}
202
\unexpanded
\def
\pdfTeX
{
pdf
\wordboundary
\TeX
}
203
\unexpanded
\def
\pdfeTeX
{
pdfe
-
\wordboundary
\TeX
}
204
\unexpanded
\def
\luaTeX
{
lua
\wordboundary
\TeX
}
205
\unexpanded
\def
\Lua
{
Lua
}
206
\unexpanded
\def
\luajitTeX
{
lua
\wordboundary
jit
\wordboundary
\TeX
}
207
\unexpanded
\def
\luametaTeX
{
lua
\wordboundary
meta
\wordboundary
\TeX
}
208
%unexpanded\def\XeTeX {X\lower.5\exheight\hbox{\kern-.15\emwidth\mirror{E}}\kern-.1667\emwidth\TeX}
209 210
% Adapted from a patch by Mojca:
211 212
\def
\syst_logos_xetex_e
213
{
\setbox
\scratchbox
\hbox
{
E
}
%
214
\raise\dimexpr\ht
\scratchbox
+
\dp
\scratchbox
\relax\hbox
{
\rotate
[
\c!rotation
=
1
8
0
]
{
\box
\scratchbox
}}}
215 216
\unexpanded
\def
\XeTeX
217
{
X
\lower
.
5
\exheight
218
\hbox
219
{
\kern
-
.
1
5
\emwidth
220
\iffontchar
\font
"
0
1
8
E
\relax
221
\char
"
0
1
8
E
%
222
\else
223
\ifx
\fontalternative
\s!bf
\mirror
{
E
}
\else
224
\ifx
\fontalternative
\s!it
\syst_logos_xetex_e
\else
225
\ifx
\fontalternative
\s!sl
\syst_logos_xetex_e
\else
226
\ifx
\fontalternative
\s!bi
\syst_logos_xetex_e
\else
227
\ifx
\fontalternative
\s!bs
\syst_logos_xetex_e
\else
228
\mirror
{
E
}
\fi\fi\fi\fi\fi
229
\fi
}
%
230
\kern
-
.
1
6
6
7
\emwidth
\TeX
}
231 232
\let
\ETEX
\eTeX
233
\let
\PDFTEX
\pdfTeX
234
\let
\PDFETEX
\pdfeTeX
235
\let
\LUATEX
\luaTeX
236
\let
\LUAJITTEX
\luajitTeX
237
\let
\LuaTeX
\luaTeX
238
\let
\LuaMetaTeX\luametaTeX
239
\let
\LUAMETATEX\luametaTeX
240
\let
\XETEX
\XeTeX
241 242
\unexpanded
\def
\LuaTeX
243
{
\dontleavehmode
244
\begingroup
245
Lua
%
246
% hope for kerning, try aT
247
\setbox
0
\hbox
{
aT
}
%
248
\setbox
2
\hbox
{
a
\kern
\zeropoint
T
}
%
249
\ifdim
\wd
0
=
\wd
2
% kerns can go two ways
250
% no aT kerning, try oT as a is not symmetrical
251
\setbox
0
\hbox
{
oT
}
%
252
\setbox
2
\hbox
{
o
\kern
\zeropoint
T
}
%
253
\ifdim
\wd
0
=
\wd
2
% kerns can go two ways
254
% no aT and oT kerning, try To
255
\setbox
0
\hbox
{
To
}
%
256
\setbox
2
\hbox
{
T
\kern
\zeropoint
o
}
%
257
% maybe we need to compensate for the angle (sl/it/bs/bi)
258
\fi
259
\ifdim
\wd
0
=
\wd
2
\else
260
\kern\dimexpr\wd
0
-
\wd
2
\relax
261
\fi
262
\fi
263
\TeX
264
\endgroup
}
265 266
\unexpanded
\def
\LuajitTeX
267
{
\dontleavehmode
268
\begingroup
269
% at this moment there is no real need for kerning tT
270
Luajit
\kern
\zeropoint
\TeX
271
\endgroup
}
272 273
\let
\luaTeX
\LuaTeX
274
\let
\luajitTeX\LuajitTeX
275
\let
\LUATEX
\LuaTeX
276
\let
\LUAJITTEX\LuajitTeX
277 278
\unexpanded
\def
\MKII
{
MkII
}
% MarkTwo
279
\unexpanded
\def
\MKIV
{
MkIV
}
% MarkFour : MKIV
280
\unexpanded
\def
\MKVI
{
MkVI
}
% MarkSix : MKIV
281
\unexpanded
\def
\MKXL
{
MkXL
}
% MarkFourty : LMTX
282
\unexpanded
\def
\MKLX
{
MkLX
}
% MarkSixty : LMTX
283
\unexpanded
\def
\MKIX
{
MkIX
}
% : MKIV / LMTX
284
\unexpanded
\def
\MKXI
{
MkXI
}
% : MKIV / LMTX
285 286
\unexpanded
\def
\MPII
{
MpII
}
% MarkTwo
287
\unexpanded
\def
\MPIV
{
MpIV
}
% MarkFour : MetaFun
288
\unexpanded
\def
\MPVI
{
MpVI
}
% MarkSix : MetaFun
289
\unexpanded
\def
\MPXL
{
MpXL
}
% MarkFourty : LuaMetaFun
290
\unexpanded
\def
\MPLX
{
MpLX
}
% MarkSixty : LuaMetaFun
291 292
\unexpanded
\def
\LMTX
{
lmtx
}
% for LuaMetaTeX
293 294
\appendtoks
295
\def
\ConTeXt
{
ConTeXt
}
%
296
\def
\MetaPost
{
MetaPost
}
%
297
\def
\MetaFont
{
MetaFont
}
%
298
\def
\MetaFun
{
MetaFun
}
%
299
\def
\TeX
{
TeX
}
%
300
\def
\TeXsuffix
{
TeX
}
%
301
\def
\TeXprefix
{
TeX
}
%
302
\def
\LuaTeX
{
LuaTeX
}
%
303
\def
\LuajitTeX
{
LuajitTeX
}
%
304
\def
\LuaMetaTeX
{
LuaMetaTeX
}
%
305
\let\wordboundary
\empty
306
\to
\everysimplifycommands
307 308
\protect
\endinput
309