cont-log.mkiv /size: 9149 b    last modification: 2021-10-28 13:50
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-.1667\wd\scratchbox
28   \lower.5\exheight\hbox{E}%
29   \kern-.125\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-.55\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-.27\emwidth\lower.5\exheight\hbox{A}%
64   \kern-.18\emwidth B%
65   \kern-.1\emwidth\lower.5\exheight\hbox{L}%
66   \kern-.075\emwidth E}
67
68\unexpanded\def\PiCTeX
69  {P%
70   \kern-.12\emwidth\lower.5\exheight\hbox{I}%
71   \kern-.075\emwidth C%
72   \kern-.11\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-.1667\emwidth\lower.5\exheight\hbox{\syst_logos_ams_script M}%
83   \kern-.125\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-.25\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 -.0667\emwidth
113   \getscaledglyph{.8}\empty{%
114     O\kern-.0667\emwidth
115     N%
116     \discretionary{-}{}{\kern-.0549\emwidth}%
117     T%
118     \doifelseitalic
119       {\kern-.1\emwidth}%
120       {\kern-.1667\emwidth}%
121     \lower.5\exheight\hbox{E}%
122     \doifelseitalic
123       \empty
124       {\kern-.11em}%
125     X%
126     \kern-.055\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     10 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.33\emwidth\s!depth-.27\emwidth\s!width.33\emwidth}{}{}}
151
152\unexpanded\def\MetaFontLogo
153  {\dontleavehmode
154   \begingroup
155   \setMFPfont META\syst_logos_meta_hyphen FONT%
156   \endgroup}
157
158\unexpanded\def\MetaPostLogo
159  {\dontleavehmode
160   \begingroup
161   \setMFPfont META\syst_logos_meta_hyphen POST%
162   \endgroup}
163
164% \protected\def\MetaFunLogo
165%   {\dontleavehmode
166%    \begingroup
167%    \setMFPfont META\syst_logos_meta_hyphen FUN%
168%    \endgroup}
169
170% As decided on the ConText Meeting 2013 the logo has been simplified:
171
172\unexpanded\def\MetaFont{MetaFont}
173\unexpanded\def\MetaPost{MetaPost}
174\unexpanded\def\MetaFun {MetaFun}
175
176%D \macros
177%D  {TEX, METAFONT, METAPOST, METAFUN,
178%D   PICTEX, TABLE,
179%D   CONTEXT, PPCHTEX,
180%D   AMSTEX, LATEX, LAMSTEX}
181%D
182%D We define the funny written ones as well as the less error prone upper case names
183%D (in \CONTEXT\ we tend to write all user defined commands, like abbreviations, in
184%D uppercase.)
185
186\unexpanded\def\METAFONT {\MetaFont}
187\unexpanded\def\METAPOST {\MetaPost}
188\unexpanded\def\PPCHTEX  {\PPCHTeX}
189\unexpanded\def\CONTEXT  {\ConTeXt}
190\unexpanded\def\METAFUN  {\MetaFun}
191
192\unexpanded\def\TEX      {\TeX}
193\unexpanded\def\LATEX    {\LaTeX}
194\unexpanded\def\PICTEX   {\PiCTeX}
195\unexpanded\def\TABLE    {\TaBlE}
196\unexpanded\def\AMSTEX   {\AmSTeX}
197\unexpanded\def\LAMSTEX  {\LamSTeX}
198\unexpanded\def\INRSTEX  {inrs\TeX}
199
200%D And this is how they show up: \TeX, \MetaFont, \MetaPost, \PiCTeX, \TaBlE, \ConTeXt,
201%D \PPCHTeX, \AmSTeX, \LaTeX, \LamSTeX.
202
203%D Some placeholders:
204
205\unexpanded\def\eTeX      {\mathematics{\varepsilon}-\TeX}
206\unexpanded\def\pdfTeX    {pdf\wordboundary\TeX}
207\unexpanded\def\pdfeTeX   {pdfe-\wordboundary\TeX}
208\unexpanded\def\luaTeX    {lua\wordboundary\TeX}
209\unexpanded\def\Lua       {Lua}
210\unexpanded\def\luajitTeX {lua\wordboundary jit\wordboundary\TeX}
211\unexpanded\def\luametaTeX{lua\wordboundary meta\wordboundary\TeX}
212%unexpanded\def\XeTeX     {X\lower.5\exheight\hbox{\kern-.15\emwidth\mirror{E}}\kern-.1667\emwidth\TeX}
213
214% Adapted from a patch by Mojca:
215
216\def\syst_logos_xetex_e
217  {\setbox\scratchbox\hbox{E}%
218   \raise\dimexpr\ht\scratchbox+\dp\scratchbox\relax\hbox{\rotate[\c!rotation=180]{\box\scratchbox}}}
219
220\unexpanded\def\XeTeX
221  {X\lower.5\exheight
222   \hbox
223     {\kern-.15\emwidth
224      \iffontchar\font"018E\relax
225        \char"018E%
226      \else
227        \ifx\fontalternative\s!bf         \mirror{E}\else
228        \ifx\fontalternative\s!it\syst_logos_xetex_e\else
229        \ifx\fontalternative\s!sl\syst_logos_xetex_e\else
230        \ifx\fontalternative\s!bi\syst_logos_xetex_e\else
231        \ifx\fontalternative\s!bs\syst_logos_xetex_e\else
232                                          \mirror{E}\fi\fi\fi\fi\fi
233      \fi}%
234   \kern-.1667\emwidth\TeX}
235
236\let\ETEX      \eTeX
237\let\PDFTEX    \pdfTeX
238\let\PDFETEX   \pdfeTeX
239\let\LUATEX    \luaTeX
240\let\LUAJITTEX \luajitTeX
241\let\LuaTeX    \luaTeX
242\let\LuaMetaTeX\luametaTeX
243\let\LUAMETATEX\luametaTeX
244\let\XETEX     \XeTeX
245
246\unexpanded\def\LuaTeX
247  {\dontleavehmode
248   \begingroup
249     Lua%
250     % hope for kerning, try aT
251     \setbox0\hbox{aT}%
252     \setbox2\hbox{a\kern\zeropoint T}%
253     \ifdim\wd0=\wd2 % kerns can go two ways
254       % no aT kerning, try oT as a is not symmetrical
255       \setbox0\hbox{oT}%
256       \setbox2\hbox{o\kern\zeropoint T}%
257       \ifdim\wd0=\wd2 % kerns can go two ways
258         % no aT and oT kerning, try To
259         \setbox0\hbox{To}%
260         \setbox2\hbox{T\kern\zeropoint o}%
261         % maybe we need to compensate for the angle (sl/it/bs/bi)
262       \fi
263       \ifdim\wd0=\wd2\else
264         \kern\dimexpr\wd0-\wd2\relax
265       \fi
266     \fi
267     \TeX
268   \endgroup}
269
270\unexpanded\def\LuajitTeX
271  {\dontleavehmode
272   \begingroup
273     % at this moment there is no real need for kerning tT
274     Luajit\kern\zeropoint\TeX
275   \endgroup}
276
277\let\luaTeX   \LuaTeX
278\let\luajitTeX\LuajitTeX
279\let\LUATEX   \LuaTeX
280\let\LUAJITTEX\LuajitTeX
281
282\unexpanded\def\MKII{MkII} % MarkTwo
283\unexpanded\def\MKIV{MkIV} % MarkFour   : MKIV
284\unexpanded\def\MKVI{MkVI} % MarkSix    : MKIV
285\unexpanded\def\MKXL{MkXL} % MarkFourty : LMTX
286\unexpanded\def\MKLX{MkLX} % MarkSixty  : LMTX
287\unexpanded\def\MKIX{MkIX} %            : MKIV / LMTX
288\unexpanded\def\MKXI{MkXI} %            : MKIV / LMTX
289
290\unexpanded\def\MPII{MpII} % MarkTwo
291\unexpanded\def\MPIV{MpIV} % MarkFour   : MetaFun
292\unexpanded\def\MPVI{MpVI} % MarkSix    : MetaFun
293\unexpanded\def\MPXL{MpXL} % MarkFourty : LuaMetaFun
294\unexpanded\def\MPLX{MpLX} % MarkSixty  : LuaMetaFun
295
296\unexpanded\def\LMTX{LMTX} % for LuaMetaTeX
297
298\appendtoks
299    \def\ConTeXt   {ConTeXt}%
300    \def\MetaPost  {MetaPost}%
301    \def\MetaFont  {MetaFont}%
302    \def\MetaFun   {MetaFun}%
303    \def\TeX       {TeX}%
304    \def\TeXsuffix {TeX}%
305    \def\TeXprefix {TeX}%
306    \def\LuaTeX    {LuaTeX}%
307    \def\LuajitTeX {LuajitTeX}%
308    \def\LuaMetaTeX{LuaMetaTeX}%
309   %\let\wordboundary\empty % primitive so we need to promote it to frozen (orjust preroll)
310\to \everysimplifycommands
311
312\protect \endinput
313