summaryrefslogtreecommitdiff
path: root/macros/luatex/optex/logos.opm
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-15 03:01:24 +0000
committerNorbert Preining <norbert@preining.info>2020-03-15 03:01:24 +0000
commit87cddce361c3b477029d13b27bdaa57190b2d74b (patch)
tree0b8f15ef416645c1438cdc4228a1ddb44691b17c /macros/luatex/optex/logos.opm
parent942e56ba7d147d18d379305e76f064cec0aade7d (diff)
CTAN sync 202003150301
Diffstat (limited to 'macros/luatex/optex/logos.opm')
-rw-r--r--macros/luatex/optex/logos.opm37
1 files changed, 21 insertions, 16 deletions
diff --git a/macros/luatex/optex/logos.opm b/macros/luatex/optex/logos.opm
index f691aa0b61..4465d56e9b 100644
--- a/macros/luatex/optex/logos.opm
+++ b/macros/luatex/optex/logos.opm
@@ -2,20 +2,31 @@
\_codedecl \TeX {Logos TeX, LuaTeX, etc. <2019-05-21>}
+ \_doc ----------------------------
+ Despite plain \TeX/ each macro for logos ends by `\ignoreslash`.
+ This macro ignores next slash if it is present.
+ You can `use \TeX/ like this` for protecting the space following the logo.
+ This is visually more comfortable.
+ \_cod ----------------------------
+
\_protected\_def \_TeX {T\_kern-.1667em\_lower.5ex\_hbox{E}\_kern-.125emX\_ignoreslash}
\_protected\_def \_OpTeX {Op\kern-.1em\_TeX}
\_protected\_def \_LuaTeX {Lua\_TeX}
\_protected\_def \_XeTeX {X\_kern-.125em\_phantom E%
\_pdfsave\_rlap{\_pdfscale{-1}{1}\_lower.5ex\_hbox{E}}\_pdfrestore \_kern-.1667em \_TeX}
-\_def\_LaTeX{\_tmpdim=.42ex L\_kern-.36em \_kern \_slantcorr % slant correction
+
+ \_doc------------------------------
+ The `\_slantcorr` macro expands to slant-correction of current font. It is
+ used to shifting A if `\LaTeX` is in itallic.
+ \_cod -----------------------------
+
+\_protected\_def \_LaTeX{\_tmpdim=.42ex L\_kern-.36em \_kern \_slantcorr % slant correction
\_raise \_tmpdim \_hbox{\_thefontscale[710]A}%
\_kern-.15em \_kern-\_slantcorr \_TeX}
-\_def\_slantcorr{\_ea\_ignorept \_the\_fontdimen1\_the\_font\_tmpdim}
+\_def\_slantcorr{\_ea\_ignorept \_the\_fontdimen1\_font\_tmpdim}
\_def\_ignoreslash {\_futurelet\_next \_ignoreslashA}
\_def\_ignoreslashA {\_ifx\_next/\_ea\_ignoreit\_fi}
-\_def\_ignoreit#1{}
-{\_lccode`\?=`\p \_lccode`\!=`\t \_lowercase{\_gdef\_ignorept#1?!{#1}}}
\_def\_OPmac{\_leavevmode
\_lower.2ex\_hbox{\_thefontscale[1400]O}\_kern-.86em P{\_em mac}\_ignoreslash}
@@ -23,26 +34,20 @@
\_def\_csplain{\_CS plain\_ignoreslash}
\_def\_ignslash#1{\_ifx/#1\_else #1\_fi}
-\_toksapp \_pdfstringout {% conversion for PDF outlines
+ \_doc ----------------------------
+ The expandable versions of logos used in Outlines needs the expandablle
+ `\_ingnslash` (instead of `\_ignoreslash`).
+ \_cod \_fin ----------------------
+
+\_regmacro {}{}{% conversion for PDF outlines
\_def\TeX{TeX\_ignslash}\_def\OpTeX{OpTeX\_ignslash}%
\_def\LuaTeX{LuaTeX\_ignslash}\_def\XeTeX{XeTeX\_ignslash}%
\_def\LaTeX{LaTeX\_ignslash}\_def\OPmac{OPmac\_ignslash}%
\_def\CS{CS}\_def\csplain{csplain\_ignslash}%
}
-
\_public
\TeX \OpTeX \LuaTeX \XeTeX \LaTeX \OPmac \CS \csplain
\ignoreslash \ignoreit \ignorept ;
\_endcode
-We define common logos used in \TeX. Despite plain \TeX/ each such macro
-ends by `\ignoreslash`. This macro ignores next slash if it is present.
-You can `use \TeX/ like this` for protecting the space following the logo.
-
-The `\ignoreit` macro ignores next token. The \ignorept macro used ike this:
-\begtt
-\ea\ignorept \the\dimen...
-\endtt
-consumes the "pt" phrase appended to dimen value by `\the`.
-