Debian Codegraph @

texmf-dist/tex/optex/base/logos.opm

raw
1 %% This is part of the OpTeX project, see http://petr.olsak.net/optex
2
3 \_codedecl \TeX {Logos TeX, LuaTeX, etc. <2025-01-22>} % preloaded in format
4
5 \_doc ----------------------------
6 Despite plain \TeX/ each macro for logos ends by \`\ignoreslash`.
7 This macro ignores the next slash if it is present.
8 You can `use \TeX/ like this` for protecting the space following the logo.
9 This is visually more comfortable.
10 The macros \`\TeX`, \`\OpTeX`, \`\LuaTeX`, \`\XeTeX` are defined.
11 \_cod ----------------------------
12
13 \_protected\_def \_TeX {T\_kern-.1667em\_lower.5ex\_hbox{E}\_kern-.125emX\_ignoreslash}
14 \_protected\_def \_OpTeX {Op\_kern-.1em\_TeX}
15 \_protected\_def \_LuaTeX {Lua\_TeX}
16 \_protected\_def \_LuaHBTeX {Lua{\_setfontsize{mag.9}\_resizethefont HB}\_TeX}
17 \_protected\_def \_XeTeX {X\_kern-.125em\_phantom E%
18 \_pdfsave\_rlap{\_pdfscale{-1}{1}\_lower.5ex\_hbox{E}}\_pdfrestore \_kern-.1667em \_TeX}
19
20 \_def\_ignoreslash {\_isnextchar/\_ignoreit{}}
21
22 \_public \TeX \OpTeX \LuaTeX \LuaHBTeX \XeTeX \ignoreslash ;
23
24 \_doc ----------------------------
25 The \`\ConTeXt` logo is implemented as in the \ConTeXt/ format itself.
26 The kerning between \"Con" and \"\TeX/t" is calculated by measuring the kerning
27 between the letters \"T" and \"e".
28 \_cod ----------------------------
29
30 \_protected\_def \_ConTeXt{\_begingroup
31 Con\_setbox0=\_hbox{T\_kern\_zo e}\_setbox1=\_hbox{Te}{\_kern\_dimexpr\_wd1 -\_wd0}%
32 \_TeX t\_endgroup\_ignoreslash}
33
34 \_public \ConTeXt ;
35
36 \_doc -----------------------------
37 The \`\_slantcorr` macro expands to the slant-correction of the current font. It is
38 used to shifting A if the \`\LaTeX` logo is in italic.
39 \_cod -----------------------------
40
41 \_protected\_def \_LaTeX{\_tmpdim=.42ex L\_kern-.36em \_kern \_slantcorr % slant correction
42 \_raise \_tmpdim \_hbox{\_thefontscale[710]A}%
43 \_kern-.15em \_kern-\_slantcorr \_TeX}
44 \_def\_slantcorr{\_ea\_ignorept \_the\_fontdimen1\_font\_tmpdim}
45
46 \_public \LaTeX ;
47
48 \_doc -----------------------------
49 \`\OPmac`, \`\CS` and \`\csplain` logos.
50 \_cod -----------------------------
51
52 \_def\_OPmac{\_leavevmode
53 \_lower.2ex\_hbox{\_thefontscale[1400]O}\_kern-.86em P{\_em mac}\_ignoreslash}
54 \_def\_CS{$\_cal C$\_kern-.1667em\_lower.5ex\_hbox{$\_cal S$}\_ignoreslash}
55 \_def\_csplain{\_CS plain\_ignoreslash}
56
57 \_public \OPmac \CS \csplain ;
58
59 \_doc ----------------------------
60 The expandable versions of logos used in Outlines need the expandable
61 \`\ignslash` (instead of the \^`\ignoreslash`).
62 \_cod \_fin ----------------------
63
64 \_def\_ignslash#1{\_ifx/#1\_else #1\_fi}
65 \_regmacro {}{}{% conversion for PDF outlines
66 \_def\TeX{TeX\_ignslash}\_def\OpTeX{OpTeX\_ignslash}%
67 \_def\LuaTeX{LuaTeX\_ignslash}\_def\XeTeX{XeTeX\_ignslash}%
68 \_def\LaTeX{LaTeX\_ignslash}\_def\OPmac{OPmac\_ignslash}%
69 \_def\ConTeXt{ConTeXt\_ignslash}%
70 \_def\CS{CS}\_def\csplain{csplain\_ignslash}%
71 }
72 \_public \ignslash ;
73
74 \_endcode
75
76 2025-01-22 LuaHBTeX logo added.
77 2024-02-12 ConTeXt logo added.
78 2020-02-28 Released.