diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx | 110 |
1 files changed, 103 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx b/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx index cd1020fce89..51c1870ecb6 100644 --- a/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/ifpdf.dtx @@ -17,7 +17,8 @@ % % This work consists of the main source file ifpdf.dtx % and the derived files -% ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv. +% ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv, +% ifpdf-test1.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/ifpdf.dtx @@ -52,6 +53,7 @@ % Installation: % TDS:tex/generic/oberdiek/ifpdf.sty % TDS:doc/latex/oberdiek/ifpdf.pdf +% TDS:doc/latex/oberdiek/ifpdf-test1.tex % TDS:source/latex/oberdiek/ifpdf.dtx % %<*ignore> @@ -67,7 +69,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ifpdf 2006/02/20 v1.4 Provides the ifpdf switch (HO)} +\Msg{* Package: ifpdf 2007/09/09 v1.5 Provides the ifpdf switch (HO)} \Msg{************************************************************************} \keepsilent @@ -94,7 +96,8 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file ifpdf.dtx and the derived files - ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv. + ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv, + ifpdf-test1.tex. \endpreamble @@ -103,6 +106,8 @@ and the derived files \file{ifpdf.drv}{\from{ifpdf.dtx}{driver}}% \usedir{tex/generic/oberdiek}% \file{ifpdf.sty}{\from{ifpdf.dtx}{package}}% + \usedir{doc/latex/oberdiek}% + \file{ifpdf-test1.tex}{\from{ifpdf.dtx}{test1}}% } \obeyspaces @@ -128,7 +133,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ifpdf.drv}% - [2006/02/20 v1.4 Provides the ifpdf switch (HO)]% + [2007/09/09 v1.5 Provides the ifpdf switch (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -137,7 +142,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{169} +% \CheckSum{271} % % \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 @@ -158,7 +163,7 @@ and the derived files % \GetFileInfo{ifpdf.drv} % % \title{The \xpackage{ifpdf} package} -% \date{2006/02/20 v1.4} +% \date{2007/09/09 v1.5} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -366,7 +371,34 @@ and the derived files \fi \expandafter\x\csname ver@ifpdf.sty\endcsname \ProvidesPackage{ifpdf}% - [2006/02/20 v1.4 Provides the ifpdf switch (HO)] + [2007/09/09 v1.5 Provides the ifpdf switch (HO)] +% \end{macrocode} +% +% \subsection{Catcodes} +% +% \begin{macrocode} +\expandafter\edef\csname ifpdf@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax +} +\catcode64 11 % @ +\def\TMP@EnsureCode#1#2{% + \edef\ifpdf@AtEnd{% + \ifpdf@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{10}{12}% ^^J +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{94}{7}% ^ +\TMP@EnsureCode{96}{12}% ` % \end{macrocode} % % \subsection{Check for previously defined \cs{ifpdf}} @@ -395,6 +427,7 @@ and the derived files therefore package loading is aborted.% }% \endgroup + \ifpdf@AtEnd \expandafter\endinput \fi \endgroup @@ -445,8 +478,66 @@ and the derived files \endgroup % \end{macrocode} % \begin{macrocode} +\ifpdf@AtEnd +% \end{macrocode} +% \begin{macrocode} %</package> % \end{macrocode} +% +% \section{Test} +% +% \subsection{Catcode checks for loading} +% +% \begin{macrocode} +%<*test1> +% \end{macrocode} +% \begin{macrocode} +\catcode`\@=11 % +\def\RestoreCatcodes{} +\count@=0 % +\loop + \edef\RestoreCatcodes{% + \RestoreCatcodes + \catcode\the\count@=\the\catcode\count@\relax + }% +\ifnum\count@<255 % + \advance\count@\@ne +\repeat + +\def\RangeCatcodeInvalid#1#2{% + \count@=#1\relax + \loop + \catcode\count@=15 % + \ifnum\count@<#2\relax + \advance\count@\@ne + \repeat +} +\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 % + \input ifpdf.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% % \section{Installation} % % \subsection{Download} @@ -508,6 +599,7 @@ and the derived files % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % ifpdf.sty & tex/generic/oberdiek/ifpdf.sty\\ % ifpdf.pdf & doc/latex/oberdiek/ifpdf.pdf\\ +% ifpdf-test1.tex & doc/latex/oberdiek/ifpdf-test1.tex\\ % ifpdf.dtx & source/latex/oberdiek/ifpdf.dtx\\ % \end{tabular}^^A % }^^A @@ -664,6 +756,10 @@ and the derived files % \item % Extended documentation. % \end{Version} +% \begin{Version}{2007/09/09 v1.5} +% \item +% Catcode settings added. +% \end{Version} % \end{History} % % \PrintIndex |