diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/hologo.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hologo.dtx | 1262 |
1 files changed, 1262 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx new file mode 100644 index 00000000000..e73b149cf5f --- /dev/null +++ b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx @@ -0,0 +1,1262 @@ +% \iffalse meta-comment +% +% Copyright (C) 2010 by +% Heiko Oberdiek <heiko.oberdiek at googlemail.com> +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any later +% version. This version of this license is in +% http://www.latex-project.org/lppl/lppl-1-3c.txt +% and the latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status "maintained". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% The Base Interpreter refers to any `TeX-Format', +% because some files are installed in TDS:tex/generic//. +% +% This work consists of the main source file hologo.dtx +% and the derived files +% hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex. +% +% Distribution: +% CTAN:macros/latex/contrib/oberdiek/hologo.dtx +% CTAN:macros/latex/contrib/oberdiek/hologo.pdf +% +% Unpacking: +% (a) If hologo.ins is present: +% tex hologo.ins +% (b) Without hologo.ins: +% tex hologo.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{hologo.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If hologo.drv is present: +% latex hologo.drv +% (b) Without hologo.drv: +% latex hologo.dtx; ... +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (example): +% pdflatex hologo.dtx +% makeindex -s gind.ist hologo.idx +% pdflatex hologo.dtx +% makeindex -s gind.ist hologo.idx +% pdflatex hologo.dtx +% +% Installation: +% TDS:tex/generic/oberdiek/hologo.sty +% TDS:tex/generic/oberdiek/hologo-test1.tex +% TDS:doc/latex/oberdiek/hologo.pdf +% TDS:source/latex/oberdiek/hologo.dtx +% +%<*ignore> +\begingroup + \catcode123=1 % + \catcode125=2 % + \def\x{LaTeX2e}% +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +%</ignore> +%<*install> +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: hologo 2010/04/08 v1.0 Logo collection (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\let\MetaPrefix\relax +\preamble + +This is a generated file. + +Copyright (C) 2010 by + Heiko Oberdiek <heiko.oberdiek at googlemail.com> + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any later +version. This version of this license is in + http://www.latex-project.org/lppl/lppl-1-3c.txt +and the latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +This Current Maintainer of this work is Heiko Oberdiek. + +The Base Interpreter refers to any `TeX-Format', +because some files are installed in TDS:tex/generic//. + +This work consists of the main source file hologo.dtx +and the derived files + hologo.sty, hologo.pdf, hologo.ins, hologo.drv, hologo-test1.tex. + +\endpreamble +\let\MetaPrefix\DoubleperCent + +\generate{% + \file{hologo.ins}{\from{hologo.dtx}{install}}% + \file{hologo.drv}{\from{hologo.dtx}{driver}}% + \usedir{tex/generic/oberdiek}% + \file{hologo.sty}{\from{hologo.dtx}{package}}% + \file{hologo-test1.tex}{\from{hologo.dtx}{test1}}% +} + +\catcode32=13\relax% active space +\let =\space% +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* files into a directory searched by TeX:} +\Msg{*} +\Msg{* hologo.sty, hologo-test1.tex} +\Msg{*} +\Msg{* And install the following script file:} +\Msg{*} +\Msg{* } +\Msg{*} +\Msg{* To produce the documentation run the file `hologo.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +%</install> +%<*ignore> +\fi +%</ignore> +%<*driver> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{hologo.drv}% + [2010/04/08 v1.0 Logo collection (HO)]% +\documentclass{ltxdoc} +\usepackage{holtxdoc}[2008/08/11] +\usepackage{hologo}[2010/04/08] +\usepackage{longtable} +\usepackage{array} +\begin{document} + \DocInput{hologo.dtx}% +\end{document} +%</driver> +% \fi +% +% \CheckSum{810} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \GetFileInfo{hologo.drv} +% +% \title{The \xpackage{hologo} package} +% \date{2010/04/08 v1.0} +% \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} +% +% \maketitle +% +% \begin{abstract} +% This package starts a collection of logos with support for bookmarks +% strings. +% \end{abstract} +% +% \tableofcontents +% +% \section{Documentation} +% +% \begin{declcs}{hologo} \M{name} +% \end{declcs} +% Macro \cs{hologo} sets the logo with name \meta{name}. +% The following table shows the supported names. +% +% \tracingmacros=1 +% \newcommand*{\entry}{} +% \def\entry#1[#2]{#1&\hologo{#1}\tabularnewline} +% \begin{longtable}{>{\ttfamily}lll} +% \rmfamily\bfseries{name} & \bfseries logo & \bfseries since\\ +% \hline +% \endhead +% \entry{eTeX}[2010/04/08] +% \entry{LaTeX}[2010/04/08] +% \entry{LaTeX2e}[2010/04/08] +% \entry{LaTeXe}[2010/04/08] +% \entry{LuaLaTeX}[2010/04/08] +% \entry{LuaTeX}[2010/04/08] +% \entry{pdfTeX}[2010/04/08] +% \entry{pdfLaTeX}[2010/04/08] +% \entry{plainTeX}[2010/04/08] +% \entry{TeX}[2010/04/08] +% \entry{XeLaTeX}[2010/04/08] +% \entry{XeTeX}[2010/04/08] +% \end{longtable} +% +% \StopEventually{ +% } +% +% \section{Implementation} +% \begin{macrocode} +%<*package> +% \end{macrocode} +% Reload check, especially if the package is not used with \LaTeX. +% \begin{macrocode} +\begingroup + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ + \catcode123 1 % { + \catcode125 2 % } + \expandafter\let\expandafter\x\csname ver@hologo.sty\endcsname + \ifx\x\relax % plain-TeX, first loading + \else + \def\empty{}% + \ifx\x\empty % LaTeX, first loading, + % variable is initialized, but \ProvidesPackage not yet seen + \else + \catcode35 6 % # + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{hologo}{The package is already loaded}% + \aftergroup\endinput + \fi + \fi +\endgroup +% \end{macrocode} +% Package identification: +% \begin{macrocode} +\begingroup + \catcode35 6 % # + \catcode40 12 % ( + \catcode41 12 % ) + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode47 12 % / + \catcode58 12 % : + \catcode64 11 % @ + \catcode91 12 % [ + \catcode93 12 % ] + \catcode123 1 % { + \catcode125 2 % } + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \immediate\write-1{Package: #3 #4}% + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[{#3}]% + \ifx#1\@undefined + \xdef#1{#3}% + \fi + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@hologo.sty\endcsname +\ProvidesPackage{hologo}% + [2010/04/08 v1.0 Logo collection (HO)] +% \end{macrocode} +% +% \begin{macrocode} +\begingroup + \catcode123 1 % { + \catcode125 2 % } + \def\x{\endgroup + \expandafter\edef\csname HOLOGO@AtEnd\endcsname{% + \catcode35 \the\catcode35\relax + \catcode64 \the\catcode64\relax + \catcode123 \the\catcode123\relax + \catcode125 \the\catcode125\relax + }% + }% +\x +\catcode35 6 % # +\catcode64 11 % @ +\catcode123 1 % { +\catcode125 2 % } +\def\TMP@EnsureCode#1#2{% + \edef\HOLOGO@AtEnd{% + \HOLOGO@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{10}{12}% ^^J +\TMP@EnsureCode{33}{12}% ! +\TMP@EnsureCode{36}{3}% $ +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{42}{12}% * +\TMP@EnsureCode{43}{12}% + +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{59}{12}% ; +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{63}{12}% ? +\TMP@EnsureCode{91}{12}% [ +\TMP@EnsureCode{93}{12}% ] +\TMP@EnsureCode{94}{7}% ^ (superscript) +\TMP@EnsureCode{95}{8}% _ (subscript) +\TMP@EnsureCode{96}{12}% ` +\TMP@EnsureCode{124}{12}% | +\edef\HOLOGO@AtEnd{% + \HOLOGO@AtEnd + \escapechar\the\escapechar\relax + \noexpand\endinput +} +\escapechar=92 % +% \end{macrocode} +% +% \subsection{Load resources} +% +% \begin{macrocode} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax + \input ltxcmds.sty\relax + \input infwarerr.sty\relax + \input kvsetkeys.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{infwarerr}[2010/04/08]% + \RequirePackage{kvsetkeys}[2010/03/01]% + \RequirePackage{pdftexcmds}[2010/04/01]% + \RequirePackage{ifpdf}[2010/01/28]% + \RequirePackage{ifluatex}[2010/03/01]% + \RequirePackage{ifxetex}[2009/01/23]% + \RequirePackage{ifvtex}[2010/03/01]% +\fi +% \end{macrocode} +% +% \begin{macro}{\HOLOGO@IfDefined} +% \begin{macrocode} +\def\HOLOGO@IfExists#1{% + \ifx\@undefined#1% + \expandafter\ltx@secondoftwo + \else + \ifx\relax#1% + \expandafter\ltx@secondoftwo + \else + \expandafter\expandafter\expandafter\ltx@firstoftwo + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% +% \subsection{\cs{hologo}} +% +% \begin{macrocode} +\HOLOGO@IfExists\hologo{% + \@PackageError{hologo}{% + \string\hologo\ltx@space is already defined.\MessageBreak + Package loading is aborted% + }\@ehc + \HOLOGO@AtEnd +} +\HOLOGO@IfExists\hologorobust{% + \@PackageError{hologo}{% + \string\hologorobust\ltx@space is already defined.\MessageBreak + Package loading is aborted% + }\@ehc + \HOLOGO@AtEnd +} +% \end{macrocode} +% +% \begin{macro}{\hologorobust} +% \begin{macrocode} +\ltx@IfUndefined{protected}{% + \ltx@IfUndefined{DeclareRobustCommand}{% + \def\hologorobust#1% + }{% + \DeclareRobustCommand*\hologorobust[1]% + }% +}{% + \protected\def\hologorobust#1% +}% +{% + \ltx@ifundefined{HoLogo@#1}{% + \@PackageError{hologo}{% + Unknown logo `#1'% + }\@ehc + ?#1?% + }{% + \csname HoLogo@#1\endcsname + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\hologo} +% \begin{macrocode} +\def\hologo#1{% + \HOLOGO@IfExists\texorpdfstring\texorpdfstring\ltx@firstoftwo + {% + \hologorobust{#1}% + }{% + \ltx@ifundefined{HoLogoBkm@#1}{% + \ltx@ifundefined{HoLogo@#1}{?#1?}{#1}% + }{% + \csname HoLogoBkm@#1\endcsname + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Helpers} +% +% \begin{macro}{\HOLOGO@PdfdocUnicode} +% \begin{macrocode} +\def\HOLOGO@PdfdocUnicode{% + \ifx\ifHy@unicode\iftrue + \expandafter\ltx@secondoftwo + \else + \expandafter\ltx@firstoftwo + \fi +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HOLOGO@Math} +% \begin{macrocode} +\def\HOLOGO@MathSetup{% + \mathsurround0pt\relax + \HOLOGO@IfExists\f@series{% + \if b\expandafter\ltx@car\f@series x\@nil + \csname boldmath\endcsname + \fi + }{}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HOLOGO@TempDimen} +% \begin{macrocode} +\dimendef\HOLOGO@TempDimen=\ltx@zero +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@NegativeKerning} +% \begin{macrocode} +\def\HOLOGO@NegativeKerning#1{% + \begingroup + \HOLOGO@TempDimen=0pt\relax + \comma@parse@normalized{#1}{% + \ifdim\HOLOGO@TempDimen=0pt % + \expandafter\HOLOGO@@NegativeKerning\comma@entry + \fi + \ltx@gobble + }% + \ifdim\HOLOGO@TempDimen<0pt % + \kern\HOLOGO@TempDimen + \fi + \endgroup +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@@NegativeKerning} +% \begin{macrocode} +\def\HOLOGO@@NegativeKerning#1#2{% + \setbox\ltx@zero\hbox{#1#2}% + \HOLOGO@TempDimen=\wd\ltx@zero + \setbox\ltx@zero\hbox{#1\kern0pt#2}% + \advance\HOLOGO@TempDimen by -\wd\ltx@zero +} +% \end{macrocode} +% \end{macro} +% +% +% \subsection{\hologo{TeX} and friends} +% +% \subsubsection{\hologo{TeX}} +% +% \begin{macro}{\HoLogo@TeX} +% Source: \hologo{LaTeX} kernel. +% \begin{macrocode} +\def\HoLogo@TeX{% + T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000 % +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{plainTeX}} +% +% \begin{macro}{\HoLogo@plainTeX} +% Source: ``The \hologo{TeX}book'' +% \begin{macrocode} +\def\HoLogo@plainTeX{% + plain \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HoLogoBkm@plainTeX} +% \begin{macrocode} +\def\HoLogoBkm@plainTeX{% + plain \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{LaTeX}} +% +% \begin{macro}{\HoLogo@LaTeX} +% Source: \hologo{LaTeX} kernel. +% \begin{macrocode} +\def\HoLogo@LaTeX{% + L% + \kern-.36em% + \begingroup + \setbox\ltx@zero\hbox{T}% + \vbox to\ht\ltx@zero{% + \hbox{% + \ltx@ifundefined{check@mathfonts}{% + \csname sevenrm\endcsname + }{% + \check@mathfonts + \fontsize\sf@size\z@ + \math@fontsfalse\selectfont + }% + A% + }% + \vss + }% + \endgroup + \kern-.15em% + \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{LaTeXe}} +% +% \begin{macro}{\HoLogo@LaTeXe} +% Source: \hologo{LaTeX} kernel +% \begin{macrocode} +\def\HoLogo@LaTeXe{% + \hologo{LaTeX}% + \kern.15em% + \hbox{% + \HOLOGO@MathSetup + 2% + $_{\textstyle\varepsilon}$% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogoBkm@LaTeXe} +% \begin{macrocode} +\def\HoLogoBkm@LaTeXe{% + \hologo{LaTeX}% + 2% + \HOLOGO@PdfdocUnicode{e}{\textepsilon}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogo@LaTeX2e} +% \begin{macrocode} +\expandafter\let\csname HoLogo@LaTeX2e\endcsname\HoLogo@LaTeXe +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HoLogoBkm@LaTeX2e} +% \begin{macrocode} +\expandafter\let\csname HoLogoBkm@LaTeX2e\endcsname\HoLogoBkm@LaTeXe +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{eTeX}} +% +% \begin{macro}{\HoLogo@eTeX} +% Source: package \xpackage{etex} +% \begin{macrocode} +\def\HoLogo@eTeX{% + \leavevmode + \hbox{% + \HOLOGO@MathSetup + $\varepsilon$% + -% + \HOLOGO@NegativeKerning{-T,T-,To}% + \hologo{TeX}% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HoLogoBkm@eTeX} +% \begin{macrocode} +\def\HoLogoBkm@eTeX{% + \HOLOGO@PdfdocUnicode{e}{\textepsilon}% + -% + \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{LuaTeX}} +% +% \begin{macro}{\HoLogo@LuaTeX} +% The kerning is an idea of Hans Hagen, see mailing list +% `luatex at tug dot org' in March 2010. +% \begin{macrocode} +\def\HoLogo@LuaTeX{% + Lua% + \HOLOGO@NegativeKerning{aT,oT,To}% + \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{LuaLaTeX}} +% +% \begin{macro}{\HoLogo@LuaLaTeX} +% \begin{macrocode} +\def\HoLogo@LuaLaTeX{% + Lua% + \hologo{LaTeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{XeTeX}, \hologo{XeLaTeX}} +% +% \begin{macro}{\HoLogo@Xe} +% Source: package \xpackage{dtklogos} +% \begin{macrocode} +\def\HoLogo@Xe{% + X% + \kern-.1em\relax + \ltx@IfUndefined{HOLOGO@ReflectBox}\ltx@firstoftwo{% + \ltx@IfUndefined{HOLOGO@ReflectBox@\hologodriver}% + \ltx@firstoftwo\ltx@secondoftwo + }% + {e}{% + \lower.5ex\hbox{% + \HOLOGO@ReflectBox{E}% + }% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogo@XeTeX} +% \begin{macrocode} +\def\HoLogo@XeTeX{% + \hologo{Xe}% + \kern-.15em\relax + \hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogoBkm@XeTeX} +% \begin{macrocode} +\def\HoLogoBkm@XeTeX{XeTeX} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogo@XeLaTeX} +% \begin{macrocode} +\def\HoLogo@XeLaTeX{% + \hologo{Xe}% + \hologo{LaTeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsubsection{\hologo{pdfTeX}, \hologo{pdfLaTeX}} +% +% \begin{macro}{\HoLogo@pdfTeX} +% \begin{macrocode} +\def\HoLogo@pdfTeX{% + pdf\hologo{TeX}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HoLogo@pdfLaTeX} +% \begin{macrocode} +\def\HoLogo@pdfLaTeX{% + pdf\hologo{LaTeX}% +} +% \end{macrocode} +% \end{macro} +% +% \subsection{Driver detection} +% +% \begin{macrocode} +\HOLOGO@IfExists\InputIfFileExists{% + \InputIfFileExists{hologo.cfg}{}{}% +}{% + \ltx@IfUndefined{pdf@filesize}{% + \chardef\HOLOGO@temp=15 % + \def\HOLOGO@CheckRead{% + \ifeof\HOLOGO@temp + \else + \ifcase\HOLOGO@temp + \csname newread\endcsname\HOLOGO@temp + \else + \begingroup + \count\ltx@cclv=\HOLOGO@temp + \advance\ltx@cclv by -1 % + \edef\x{\endgroup + \chardef\noexpand\HOLOGO@temp=\the\count\ltx@cclv\relax + }% + \x + \expandafter\expandafter\expandafter\HOLOGO@CheckRead + \fi + \fi + }% + \ifeof\HOLOGO@temp + \@PackageWarningNoLine{hologo}{% + Configuration file ignored, because\MessageBreak + a free read register could not be found% + }% + \else + \openin\HOLOGO@temp=hologo.cfg\relax + \ifeof\HOLOGO@temp + \closein\HOLOGO@temp + \else + \closein\HOLOGO@temp + \input hologo.cfg\relax + \fi + \fi + }{% + \edef\HOLOGO@temp{\pdf@filesize{hologo.cfg}}% + \ifx\HOLOGO@temp\ltx@empty + \else + \input hologo.cfg\relax + \fi + }% +} +% \end{macrocode} +% +% \begin{macrocode} +\ltx@IfUndefined{DeclareOption}{% + \ltx@gobble +}{% + \ltx@IfUndefined{ProcessOptions}\ltx@gobble\ltx@firstofone +}% +{% + \def\HOLOGO@temp#1#2{% + \DeclareOption{#1}{\edef\hologodriver{#2}}% + }% + \kv@parse@normalized{% + pdftex,% + luatex=pdftex,% + dvipdfm,% + dvipdfmx=dvipdfm,% + dvips,% + dvipsone=dvips,% + xdvi=dvips,% + xetex,% + vtex,% + }{% + \ifx\kv@value\relax + \expandafter\HOLOGO@temp\expandafter{\kv@key}\kv@key + \else + \expandafter\HOLOGO@temp\expandafter{\kv@key}\kv@value + \fi + \ltx@gobbletwo + }% + \ProcessOptions*% +} +% \end{macrocode} +% +% \begin{macro}{\hologodriver} +% \begin{macrocode} +\ifpdf + \def\hologodriver{pdftex}% + \let\HOLOGO@pdfliteral\pdfliteral + \ifluatex + \ltx@IfUndefined{HOLOGO@pdfliteral}{% + \ifnum\luatexversion<36 % + \else + \begingroup + \let\HOLOGO@temp\endgroup + \ifcase0% + \directlua{% + if tex.enableprimitives then % + tex.enableprimitives('HOLOGO@', {'pdfliteral'})% + else % + tex.print('1')% + end% + }% + \ifx\HOLOGO@pdfliteral\@undefined 1\fi% + \relax% + \endgroup + \let\HOLOGO@temp\relax + \global\let\HOLOGO@pdfliteral\HOLOGO@pdfliteral + \fi% + \HOLOGO@temp + \fi + }{}% + \fi + \ltx@IfUndefined{HOLOGO@pdfliteral}{% + \@PackageWarningNoLine{hologo}{% + Cannot find \string\pdfliteral + }% + }{}% +\else + \ifxetex + \def\hologodriver{xetex}% + \else + \ifvtex + \def\hologodriver{vtex}% + \fi + \fi +\fi +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@ReflectBox} +% \begin{macrocode} +\ltx@IfUndefined{reflectbox}{}{% + \def\HOLOGO@ReflectBox{% + \reflectbox + }% + \HOLOGO@AtEnd +} +\ltx@ifundefined{hologodriver}{% + \def\hologodriver{dvips}% + \@PackageInfoNoLine{hologo}{Using default driver `\hologodriver'}% +}{% + \@PackageInfoNoLine{hologo}{Using driver `\hologodriver'}% +} +\def\HOLOGO@ReflectBox#1{% + \ltx@IfUndefined{HOLOGO@ReflectBox@\hologodriver}{% + \@PackageWarning{hologo}{% + Driver `\hologodriver' misses support for \string\reflectbox + }% + #1% + }{% + \begingroup + \setbox\ltx@zero\hbox{\begingroup#1\endgroup}% + \setbox\ltx@two\hbox{% + \kern\wd\ltx@zero + \csname HOLOGO@ReflectBox@\hologodriver\endcsname{% + \hbox to 0pt{\copy\z@\hss}% + }% + }% + \wd\ltx@two=\wd\ltx@zero + \box\ltx@two + \endgroup + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +\def\HOLOGO@temp#1{% + \begingroup + \def\x{#1}% + \expandafter\endgroup + \ifx\x\hologodriver + \expandafter\ltx@firstofone + \else + \expandafter\ltx@gobble + \fi +} +% \end{macrocode} +% \begin{macro}{\HOLOGO@ReflectBox@pdftex} +% \begin{macrocode} +\HOLOGO@temp{pdftex}{% + \def\HOLOGO@ReflectBox@pdftex#1{% + \HOLOGO@pdfliteral{% + q -1 0 0 1 0 0 cm% + }% + #1% + \HOLOGO@pdfliteral{% + Q% + }% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@ReflectBox@dvips} +% \begin{macrocode} +\HOLOGO@temp{dvips}{% + \def\HOLOGO@ReflectBox@dvips#1{% + \special{ps:% + gsave % + currentpoint % + currentpoint translate % + -1 1 scale % + neg exch neg exch translate% + }% + #1% + \special{ps:% + currentpoint % + grestore % + moveto% + }% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@ReflectBox@dvipdfm} +% \begin{macrocode} +\HOLOGO@temp{dvipdfm}{% + \let\HOLOGO@ReflectBox@dvipdfm\HOLOGO@ReflectBox@dvips +} +% \end{macrocode} +% \end{macro} +% Since \hologo{XeTeX} v0.6. +% \begin{macro}{\HOLOGO@ReflectBox@xetex} +% \begin{macrocode} +\HOLOGO@temp{xetex}{% + \def\HOLOGO@ReflectBox@xetex#1{% + \special{x:gsave}% + \special{x:scale -1 1}% + #1% + \special{x:grestore}% + }% +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\HOLOGO@ReflectBox@vtex} +% \begin{macrocode} +\HOLOGO@temp{vtex}{% + \def\HOLOGO@ReflectBox@vtex#1{% + \special{r(-1,0,0,1,0,0}% + #1% + \special{r)}% + }% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\HOLOGO@AtEnd +%</package> +% \end{macrocode} +% +% \section{Test} +% +% \subsection{Catcode checks for loading} +% +% \begin{macrocode} +%<*test1> +% \end{macrocode} +% \begin{macrocode} +\catcode`\{=1 % +\catcode`\}=2 % +\catcode`\#=6 % +\catcode`\@=11 % +\expandafter\ifx\csname count@\endcsname\relax + \countdef\count@=255 % +\fi +\expandafter\ifx\csname @gobble\endcsname\relax + \long\def\@gobble#1{}% +\fi +\expandafter\ifx\csname @firstofone\endcsname\relax + \long\def\@firstofone#1{#1}% +\fi +\expandafter\ifx\csname loop\endcsname\relax + \expandafter\@firstofone +\else + \expandafter\@gobble +\fi +{% + \def\loop#1\repeat{% + \def\body{#1}% + \iterate + }% + \def\iterate{% + \body + \let\next\iterate + \else + \let\next\relax + \fi + \next + }% + \let\repeat=\fi +}% +\def\RestoreCatcodes{} +\count@=0 % +\loop + \edef\RestoreCatcodes{% + \RestoreCatcodes + \catcode\the\count@=\the\catcode\count@\relax + }% +\ifnum\count@<255 % + \advance\count@ 1 % +\repeat + +\def\RangeCatcodeInvalid#1#2{% + \count@=#1\relax + \loop + \catcode\count@=15 % + \ifnum\count@<#2\relax + \advance\count@ 1 % + \repeat +} +\expandafter\ifx\csname LoadCommand\endcsname\relax + \def\LoadCommand{\input hologo.sty\relax}% +\fi +\def\Test{% + \RangeCatcodeInvalid{0}{47}% + \RangeCatcodeInvalid{58}{64}% + \RangeCatcodeInvalid{91}{96}% + \RangeCatcodeInvalid{123}{255}% + \catcode`\@=12 % + \catcode`\\=0 % + \catcode`\{=1 % + \catcode`\}=2 % + \catcode`\#=6 % + \catcode`\[=12 % + \catcode`\]=12 % + \catcode`\%=14 % + \catcode`\ =10 % + \catcode13=5 % + \LoadCommand + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% +% +% \section{Installation} +% +% \subsection{Download} +% +% \paragraph{Package.} This package is available on +% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}: +% \begin{description} +% \item[\CTAN{macros/latex/contrib/oberdiek/hologo.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/oberdiek/hologo.pdf}] Documentation. +% \end{description} +% +% +% \paragraph{Bundle.} All the packages of the bundle `oberdiek' +% are also available in a TDS compliant ZIP archive. There +% the packages are already unpacked and the documentation files +% are generated. The files and directories obey the TDS standard. +% \begin{description} +% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}] +% \end{description} +% \emph{TDS} refers to the standard ``A Directory Structure +% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories +% with \xfile{texmf} in their name are usually organized this way. +% +% \subsection{Bundle installation} +% +% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the +% TDS tree (also known as \xfile{texmf} tree) of your choice. +% Example (linux): +% \begin{quote} +% |unzip oberdiek.tds.zip -d ~/texmf| +% \end{quote} +% +% \paragraph{Script installation.} +% Check the directory \xfile{TDS:scripts/oberdiek/} for +% scripts that need further installation steps. +% Package \xpackage{attachfile2} comes with the Perl script +% \xfile{pdfatfi.pl} that should be installed in such a way +% that it can be called as \texttt{pdfatfi}. +% Example (linux): +% \begin{quote} +% |chmod +x scripts/oberdiek/pdfatfi.pl|\\ +% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/| +% \end{quote} +% +% \subsection{Package installation} +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex hologo.dtx| +% \end{quote} +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \def\t{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} +% hologo.sty & tex/generic/oberdiek/hologo.sty\\ +% hologo-test1.tex & tex/generic/oberdiek/hologo-test1.tex\\ +% hologo.pdf & doc/latex/oberdiek/hologo.pdf\\ +% hologo.dtx & source/latex/oberdiek/hologo.dtx\\ +% \end{tabular}^^A +% }^^A +% \sbox0{\t}^^A +% \ifdim\wd0>\linewidth +% \begingroup +% \advance\linewidth by\leftmargin +% \advance\linewidth by\rightmargin +% \edef\x{\endgroup +% \def\noexpand\lw{\the\linewidth}^^A +% }\x +% \def\lwbox{^^A +% \leavevmode +% \hbox to \linewidth{^^A +% \kern-\leftmargin\relax +% \hss +% \usebox0 +% \hss +% \kern-\rightmargin\relax +% }^^A +% }^^A +% \ifdim\wd0>\lw +% \sbox0{\small\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\footnotesize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\scriptsize\t}^^A +% \ifdim\wd0>\linewidth +% \ifdim\wd0>\lw +% \sbox0{\tiny\t}^^A +% \ifdim\wd0>\linewidth +% \lwbox +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \else +% \lwbox +% \fi +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \subsection{Refresh file name databases} +% +% If your \TeX~distribution +% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh +% these. For example, \teTeX\ users run \verb|texhash| or +% \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Attached source.} +% +% The PDF documentation on CTAN also includes the +% \xfile{.dtx} source file. It can be extracted by +% AcrobatReader 6 or higher. Another option is \textsf{pdftk}, +% e.g. unpack the file into the current directory: +% \begin{quote} +% \verb|pdftk hologo.pdf unpack_files output .| +% \end{quote} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intention: +% \begin{quote} +% \verb|latex \let\install=y\input{hologo.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put this +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% An example follows how to generate the +% documentation with pdf\LaTeX: +% \begin{quote} +%\begin{verbatim} +%pdflatex hologo.dtx +%makeindex -s gind.ist hologo.idx +%pdflatex hologo.dtx +%makeindex -s gind.ist hologo.idx +%pdflatex hologo.dtx +%\end{verbatim} +% \end{quote} +% +% \begin{History} +% \begin{Version}{2010/04/08 v1.0} +% \item +% The first version. +% \end{Version} +% \end{History} +% +% \PrintIndex +% +% \Finale +\endinput |