diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/catchfile.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/catchfile.dtx | 125 |
1 files changed, 96 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx index 58dfe9abef8..ca87b190bad 100644 --- a/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/catchfile.dtx @@ -17,7 +17,8 @@ % This work consists of the main source file catchfile.dtx % and the derived files % catchfile.sty, catchfile.pdf, catchfile.ins, catchfile.drv, -% catchfile-test1.tex, catchfile-test2.tex. +% catchfile-test1.tex, catchfile-test2.tex, +% catchfile-test3.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/catchfile.dtx @@ -54,6 +55,7 @@ % TDS:doc/latex/oberdiek/catchfile.pdf % TDS:doc/latex/oberdiek/catchfile-test1.tex % TDS:doc/latex/oberdiek/catchfile-test2.tex +% TDS:doc/latex/oberdiek/catchfile-test3.tex % TDS:source/latex/oberdiek/catchfile.dtx % %<*ignore> @@ -69,7 +71,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: catchfile 2007/05/30 v1.0 Catches the contents of a file (HO)} +\Msg{* Package: catchfile 2007/09/09 v1.1 Catches the contents of a file (HO)} \Msg{************************************************************************} \keepsilent @@ -96,7 +98,8 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file catchfile.dtx and the derived files catchfile.sty, catchfile.pdf, catchfile.ins, catchfile.drv, - catchfile-test1.tex, catchfile-test2.tex. + catchfile-test1.tex, catchfile-test2.tex, + catchfile-test3.tex. \endpreamble @@ -108,6 +111,7 @@ and the derived files \usedir{doc/latex/oberdiek}% \file{catchfile-test1.tex}{\from{catchfile.dtx}{test1}}% \file{catchfile-test2.tex}{\from{catchfile.dtx}{test2}}% + \file{catchfile-test3.tex}{\from{catchfile.dtx}{test3}}% } \obeyspaces @@ -133,7 +137,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{catchfile.drv}% - [2007/05/30 v1.0 Catches the contents of a file (HO)]% + [2007/09/09 v1.1 Catches the contents of a file (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -142,7 +146,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{419} +% \CheckSum{481} % % \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 @@ -163,7 +167,7 @@ and the derived files % \GetFileInfo{catchfile.drv} % % \title{The \xpackage{catchfile} package} -% \date{2007/05/30 v1.0} +% \date{2007/09/09 v1.1} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -258,27 +262,30 @@ and the derived files \fi \expandafter\x\csname ver@catchfile.sty\endcsname \ProvidesPackage{catchfile}% - [2007/05/30 v1.0 Catches the contents of a file (HO)] + [2007/09/09 v1.1 Catches the contents of a file (HO)] % \end{macrocode} % % \subsection{Catcodes} % % \begin{macrocode} -\expandafter\edef\csname CatchFile@End\endcsname{% - \catcode44 \the\catcode44\relax % , - \catcode45 \the\catcode45\relax % - - \catcode46 \the\catcode46\relax % . - \catcode61 \the\catcode61\relax % = - \catcode64 \the\catcode64\relax % @ - \catcode96 \the\catcode96\relax % ` - \noexpand\endinput +\expandafter\edef\csname CatchFile@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax } -\catcode44 12 % , -\catcode45 12 % - -\catcode46 12 % . -\catcode61 12 % = \catcode64 11 % @ -\catcode96 12 % ` +\def\TMP@EnsureCode#1#2{% + \edef\CatchFile@AtEnd{% + \CatchFile@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{96}{12}% ` % \end{macrocode} % % \subsection{Preparations} @@ -288,7 +295,7 @@ and the derived files \expandafter\ifx\csname RequirePackage\endcsname\relax \input infwarerr.sty\relax \else - \RequirePackage{infwarerr}% + \RequirePackage{infwarerr}[2007/09/09]% \fi % \end{macrocode} % @@ -305,7 +312,8 @@ and the derived files package loading is aborted% }\@ehd \endgroup - \expandafter\CatchFile@End + \CatchFile@AtEnd + \expandafter\endinput \fi \endgroup % \end{macrocode} @@ -343,7 +351,8 @@ and the derived files package loading is aborted% }\@ehd \csname endgroup\endcsname - \CatchFile@End + \CatchFile@AtEnd + \endinput \endgroup % \end{macrocode} % \end{macro} @@ -471,21 +480,73 @@ and the derived files % \end{macro} % % \begin{macrocode} -\CatchFile@End +\CatchFile@AtEnd %</package> % \end{macrocode} % % \section{Test} % -% \subsection{\LaTeX} +% \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 catchfile.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% +% \subsection{\LaTeX} +% +% \begin{macrocode} +%<*test2> \NeedsTeXFormat{LaTeX2e} \nofiles \listfiles \documentclass{minimal} -\usepackage{catchfile}[2007/05/30] +\usepackage{catchfile}[2007/09/09] \makeatletter \def\mysetup{% \let\do\@makeother @@ -504,13 +565,13 @@ and the derived files } \typeout{\contents} \end{document} -%</test1> +%</test2> % \end{macrocode} % % \subsection{\plainTeX} % % \begin{macrocode} -%<*test2> +%<*test3> \def\msg#{\immediate\write16} \newlinechar=10 % \input catchfile.sty\relax @@ -534,8 +595,9 @@ and the derived files \csname @@end\endcsname \end -%</test2> +%</test3> % \end{macrocode} +% % \section{Installation} % % \subsection{Download} @@ -599,6 +661,7 @@ and the derived files % catchfile.pdf & doc/latex/oberdiek/catchfile.pdf\\ % catchfile-test1.tex & doc/latex/oberdiek/catchfile-test1.tex\\ % catchfile-test2.tex & doc/latex/oberdiek/catchfile-test2.tex\\ +% catchfile-test3.tex & doc/latex/oberdiek/catchfile-test3.tex\\ % catchfile.dtx & source/latex/oberdiek/catchfile.dtx\\ % \end{tabular}^^A % }^^A @@ -724,6 +787,10 @@ and the derived files % \item % First version. % \end{Version} +% \begin{Version}{2007/09/09 v1.1} +% \item +% Catcode section rewritten. +% \end{Version} % \end{History} % % \PrintIndex |