diff options
author | Karl Berry <karl@freefriends.org> | 2010-04-18 18:04:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-04-18 18:04:32 +0000 |
commit | b26ee2030e017af00dee74ea37ca13189caa593c (patch) | |
tree | e0e1d27675ac1f3e51102650e015abd0367b5666 /Master/texmf-dist/tex/generic/oberdiek/hologo.sty | |
parent | 4f5df459139365b598a08e7b946698649b36efec (diff) |
oberdiek update (17apr10)
git-svn-id: svn://tug.org/texlive/trunk@17903 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/hologo.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/hologo.sty | 313 |
1 files changed, 272 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/hologo.sty b/Master/texmf-dist/tex/generic/oberdiek/hologo.sty index 847353f3596..c9b95fa5cf8 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/hologo.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/hologo.sty @@ -92,7 +92,7 @@ \fi \expandafter\x\csname ver@hologo.sty\endcsname \ProvidesPackage{hologo}% - [2010/04/08 v1.0 Logo collection (HO)] + [2010/04/16 v1.1 Logo collection (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -151,15 +151,17 @@ \input ltxcmds.sty\relax \input infwarerr.sty\relax \input kvsetkeys.sty\relax + \input kvdefinekeys.sty\relax \input pdftexcmds.sty\relax \input ifpdf.sty\relax \input ifluatex.sty\relax \input ifxetex.sty\relax \input ifvtex.sty\relax \else - \RequirePackage{ltxcmds}[2010/04/08]% + \RequirePackage{ltxcmds}[2010/04/16]% \RequirePackage{infwarerr}[2010/04/08]% \RequirePackage{kvsetkeys}[2010/03/01]% + \RequirePackage{kvdefinekeys}[2010/03/01]% \RequirePackage{pdftexcmds}[2010/04/01]% \RequirePackage{ifpdf}[2010/01/28]% \RequirePackage{ifluatex}[2010/03/01]% @@ -177,6 +179,156 @@ \fi \fi } +\def\hologoSetup{% + \let\HOLOGO@name\relax + \HOLOGO@Setup +} +\def\hologoLogoSetup#1{% + \edef\HOLOGO@name{#1}% + \ltx@IfUndefined{HoLogo@\HOLOGO@name}{% + \@PackageError{hologo}{% + Unknown logo `\HOLOGO@name'% + }\@ehc + \@gobble + }{% + \HOLOGO@Setup + }% +} +\def\HOLOGO@Setup{% + \kvsetkeys{HoLogo}% +} +\def\HOLOGO@DeclareBoolOption#1{% + \expandafter\chardef\csname HOLOGOOPT@#1\endcsname\ltx@zero + \kv@define@key{HoLogo}{#1}[true]{% + \def\HOLOGO@temp{##1}% + \ifx\HOLOGO@temp\HOLOGO@true + \ifx\HOLOGO@name\relax + \expandafter\chardef\csname HOLOGOOPT@#1\endcsname=\ltx@one + \else + \expandafter\chardef\csname + HoLogoOpt@#1@\HOLOGO@name\endcsname\ltx@one + \fi + \HOLOGO@SetBreakAll{#1}% + \else + \ifx\HOLOGO@temp\HOLOGO@false + \ifx\HOLOGO@name\relax + \expandafter\chardef\csname HOLOGOOPT@#1\endcsname=\ltx@zero + \else + \expandafter\chardef\csname + HoLogoOpt@#1@\HOLOGO@name\endcsname=\ltx@zero + \fi + \HOLOGO@SetBreakAll{#1}% + \else + \@PackageError{hologo}{% + Unknown value `##1' for boolean option `#1'.\MessageBreak + Known values are `true' and `false'% + }\@ehc + \fi + \fi + }% +} +\def\HOLOGO@SetBreakAll#1{% + \def\HOLOGO@temp{#1}% + \ifx\HOLOGO@temp\HOLOGO@break + \ifx\HOLOGO@name\relax + \chardef\HOLOGOOPT@hyphenbreak=\HOLOGOOPT@break + \chardef\HOLOGOOPT@spacebreak=\HOLOGOOPT@break + \else + \expandafter\chardef + \csname HoLogoOpt@hyphenbreak@\HOLOGO@name\endcsname=% + \csname HoLogoOpt@break@\HOLOGO@name\endcsname + \expandafter\chardef + \csname HoLogoOpt@spacebreak@\HOLOGO@name\endcsname=% + \csname HoLogoOpt@break@\HOLOGO@name\endcsname + \fi + \fi +} +\def\HOLOGO@true{true} +\def\HOLOGO@false{false} +\def\HOLOGO@break{break} +\HOLOGO@DeclareBoolOption{break} +\HOLOGO@DeclareBoolOption{hyphenbreak} +\HOLOGO@DeclareBoolOption{spacebreak} +\kv@define@key{HoLogo}{variant}{% + \ifx\HOLOGO@name\relax + \@PackageError{hologo}{% + Option `variant' is not available in \string\hologoSetup,% + \MessageBreak + Use \string\hologoLogoSetup\space instead% + }\@ehc + \else + \edef\HOLOGO@temp{#1}% + \ifx\HOLOGO@temp\ltx@empty + \expandafter + \let\csname HoLogoOpt@variant@\HOLOGO@name\endcsname\@undefined + \else + \ltx@IfUndefined{HoLogo@\HOLOGO@name @\HOLOGO@temp}{% + \@PackageError{hologo}{% + Unknown variant `\HOLOGO@temp' of logo `\HOLOGO@name'% + }\@ehc + }{% + \expandafter + \let\csname HoLogoOpt@variant@\HOLOGO@name\endcsname + \HOLOGO@temp + }% + \fi + \fi +} +\def\HOLOGO@Variant#1{% + #1% + \ltx@ifundefined{HoLogoOpt@variant@#1}{% + }{% + @\csname HoLogoOpt@variant@#1\endcsname + }% +} +\def\HOLOGO@space{% + \ltx@ifundefined{HoLogoOpt@spacebreak@\HOLOGO@name}{% + \ltx@ifundefined{HoLogoOpt@break@\HOLOGO@name}{% + \chardef\HOLOGO@temp=\HOLOGOOPT@spacebreak + }{% + \chardef\HOLOGO@temp=% + \csname HoLogoOpt@break@\HOLOGO@name\endcsname + }% + }{% + \chardef\HOLOGO@temp=% + \csname HoLogoOpt@spacebreak@\HOLOGO@name\endcsname + }% + \ifcase\HOLOGO@temp + \penalty10000 % + \fi + \ltx@space +} +\def\HOLOGO@hyphen{% + \ltx@ifundefined{HoLogoOpt@hyphenbreak@\HOLOGO@name}{% + \ltx@ifundefined{HoLogoOpt@break@\HOLOGO@name}{% + \chardef\HOLOGO@temp=\HOLOGOOPT@hyphenbreak + }{% + \chardef\HOLOGO@temp=% + \csname HoLogoOpt@break@\HOLOGO@name\endcsname + }% + }{% + \chardef\HOLOGO@temp=% + \csname HoLogoOpt@hyphenbreak@\HOLOGO@name\endcsname + }% + \ifcase\HOLOGO@temp + \ltx@mbox{-}% + \else + -% + \fi +} +\def\HOLOGO@mbox#1{% + \ltx@ifundefined{HoLogoOpt@break@\HOLOGO@name}{% + \chardef\HOLOGO@temp=\HOLOGOOPT@hyphenbreak + }{% + \chardef\HOLOGO@temp=% + \csname HoLogoOpt@break@\HOLOGO@name\endcsname + }% + \ifcase\HOLOGO@temp + \ltx@mbox{#1}% + \else + #1% + \fi +} \HOLOGO@IfExists\hologo{% \@PackageError{hologo}{% \string\hologo\ltx@space is already defined.\MessageBreak @@ -201,13 +353,14 @@ \protected\def\hologorobust#1% }% {% - \ltx@ifundefined{HoLogo@#1}{% + \edef\HOLOGO@name{#1}% + \ltx@ifundefined{HoLogo@\HOLOGO@Variant\HOLOGO@name}{% \@PackageError{hologo}{% - Unknown logo `#1'% + Unknown logo `\HOLOGO@name'% }\@ehc - ?#1?% + ?\HOLOGO@name?% }{% - \csname HoLogo@#1\endcsname + \csname HoLogo@\HOLOGO@Variant\HOLOGO@name\endcsname\ltx@firstoftwo }% } \def\hologo#1{% @@ -215,10 +368,42 @@ {% \hologorobust{#1}% }{% - \ltx@ifundefined{HoLogoBkm@#1}{% + \ltx@ifundefined{HoLogoBkm@\HOLOGO@Variant{#1}}{% + \ltx@ifundefined{HoLogo@#1}{?#1?}{#1}% + }{% + \csname HoLogoBkm@\HOLOGO@Variant{#1}\endcsname\ltx@firstoftwo + }% + }% +} +\ltx@IfUndefined{protected}{% + \ltx@IfUndefined{DeclareRobustCommand}{% + \def\Hologorobust#1% + }{% + \DeclareRobustCommand*\Hologorobust[1]% + }% +}{% + \protected\def\Hologorobust#1% +}% +{% + \edef\HOLOGO@name{#1}% + \ltx@ifundefined{HoLogo@\HOLOGO@Variant\HOLOGO@name}{% + \@PackageError{hologo}{% + Unknown logo `\HOLOGO@name'% + }\@ehc + ?\HOLOGO@name?% + }{% + \csname HoLogo@\HOLOGO@Variant\HOLOGO@name\endcsname\ltx@secondoftwo + }% +} +\def\Hologo#1{% + \HOLOGO@IfExists\texorpdfstring\texorpdfstring\ltx@firstoftwo + {% + \Hologorobust{#1}% + }{% + \ltx@ifundefined{HoLogoBkm@\HOLOGO@Variant{#1}}{% \ltx@ifundefined{HoLogo@#1}{?#1?}{#1}% }{% - \csname HoLogoBkm@#1\endcsname + \csname HoLogoBkm@\HOLOGO@Variant{#1}\endcsname\ltx@secondoftwo }% }% } @@ -258,16 +443,30 @@ \setbox\ltx@zero\hbox{#1\kern0pt#2}% \advance\HOLOGO@TempDimen by -\wd\ltx@zero } -\def\HoLogo@TeX{% +\def\HoLogo@TeX#1{% T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000 % } -\def\HoLogo@plainTeX{% - plain \hologo{TeX}% +\def\HoLogo@plainTeX@space#1{% + \HOLOGO@mbox{#1{p}{P}lain}\HOLOGO@space\hologo{TeX}% } -\def\HoLogoBkm@plainTeX{% - plain \hologo{TeX}% +\def\HoLogoBkm@plainTeX@space#1{% + #1{p}{P}lain \hologo{TeX}% } -\def\HoLogo@LaTeX{% +\def\HoLogo@plainTeX@hyphen#1{% + \HOLOGO@mbox{#1{p}{P}lain}\HOLOGO@hyphen\hologo{TeX}% +} +\def\HoLogoBkm@plainTeX@hyphen#1{% + #1{p}{P}lain-\hologo{TeX}% +} +\def\HoLogo@plainTeX@runtogether#1{% + \HOLOGO@mbox{#1{p}{P}lain\hologo{TeX}}% +} +\def\HoLogoBkm@plainTeX@runtogether#1{% + #1{p}{P}lain\hologo{TeX}% +} +\def\HoLogo@plainTeX{\HoLogo@plainTeX@space} +\def\HoLogoBkm@plainTeX{\HoLogoBkm@plainTeX@space} +\def\HoLogo@LaTeX#1{% L% \kern-.36em% \begingroup @@ -289,7 +488,7 @@ \kern-.15em% \hologo{TeX}% } -\def\HoLogo@LaTeXe{% +\def\HoLogo@LaTeXe#1{% \hologo{LaTeX}% \kern.15em% \hbox{% @@ -298,38 +497,43 @@ $_{\textstyle\varepsilon}$% }% } -\def\HoLogoBkm@LaTeXe{% +\def\HoLogoBkm@LaTeXe#1{% \hologo{LaTeX}% 2% \HOLOGO@PdfdocUnicode{e}{\textepsilon}% } \expandafter\let\csname HoLogo@LaTeX2e\endcsname\HoLogo@LaTeXe \expandafter\let\csname HoLogoBkm@LaTeX2e\endcsname\HoLogoBkm@LaTeXe -\def\HoLogo@eTeX{% - \leavevmode - \hbox{% - \HOLOGO@MathSetup - $\varepsilon$% - -% - \HOLOGO@NegativeKerning{-T,T-,To}% - \hologo{TeX}% +\def\HoLogo@eTeX#1{% + \ltx@mbox{% + \hbox{% + \HOLOGO@MathSetup + $\varepsilon$% + -% + \HOLOGO@NegativeKerning{-T,T-,To}% + \hologo{TeX}% + }% }% } -\def\HoLogoBkm@eTeX{% - \HOLOGO@PdfdocUnicode{e}{\textepsilon}% +\def\HoLogoBkm@eTeX#1{% + \HOLOGO@PdfdocUnicode{#1{e}{E}}{\textepsilon}% -% \hologo{TeX}% } -\def\HoLogo@LuaTeX{% - Lua% - \HOLOGO@NegativeKerning{aT,oT,To}% - \hologo{TeX}% +\def\HoLogo@LuaTeX#1{% + \HOLOGO@mbox{% + Lua% + \HOLOGO@NegativeKerning{aT,oT,To}% + \hologo{TeX}% + }% } -\def\HoLogo@LuaLaTeX{% - Lua% - \hologo{LaTeX}% +\def\HoLogo@LuaLaTeX#1{% + \HOLOGO@mbox{% + Lua% + \hologo{LaTeX}% + }% } -\def\HoLogo@Xe{% +\def\HoLogo@Xe#1{% X% \kern-.1em\relax \ltx@IfUndefined{HOLOGO@ReflectBox}\ltx@firstoftwo{% @@ -342,22 +546,49 @@ }% }% } -\def\HoLogo@XeTeX{% +\def\HoLogo@XeTeX#1{% \hologo{Xe}% \kern-.15em\relax \hologo{TeX}% } -\def\HoLogoBkm@XeTeX{XeTeX} -\def\HoLogo@XeLaTeX{% +\def\HoLogoBkm@XeTeX#1{XeTeX} +\def\HoLogo@XeLaTeX#1{% \hologo{Xe}% \hologo{LaTeX}% } -\def\HoLogo@pdfTeX{% - pdf\hologo{TeX}% +\def\HoLogo@pdfTeX#1{% + \HOLOGO@mbox{% + #1{p}{P}df\hologo{TeX}% + }% +} +\def\HoLogo@pdfLaTeX#1{% + \HOLOGO@mbox{% + #1{p}{P}df\hologo{LaTeX}% + }% +} +\def\HoLogo@AmS#1{% + \begingroup + \usefont{OMS}{cmsy}{m}{n}% + A% + \kern-.1667em% + \lower.5ex\hbox{M}% + \kern-.125em% + S% + \endgroup +} +\def\HoLogoBkm@AmS#1{AmS} +\def\HoLogo@AmSTeX#1{% + \hologo{AmS}% + \HOLOGO@hyphen + \hologo{TeX}% } -\def\HoLogo@pdfLaTeX{% - pdf\hologo{LaTeX}% +\def\HoLogoBkm@AmSLaTeX#1{AmS-TeX}% +\def\HoLogo@AmSLaTeX#1{% + \hologo{AmS}% + \HOLOGO@hyphen + \hologo{LaTeX}% } +\def\HoLogoBkm@AmSLaTeX#1{AmS-LaTeX}% \HOLOGO@IfExists\InputIfFileExists{% \InputIfFileExists{hologo.cfg}{}{}% }{% |