diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-16 00:07:34 +0000 |
commit | d85f248e3b38ea0ecda38c5340e3cadd08d65346 (patch) | |
tree | 52e17f32b395006895b3917bc7729c7ac1514ae3 /Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx | |
parent | 2389552f283181e0d8c610037712ade989112da3 (diff) |
oberdiek update (14sep07)
git-svn-id: svn://tug.org/texlive/trunk@4947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx | 133 |
1 files changed, 96 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx index aff5a5fb9bf..8709755cd7f 100644 --- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx @@ -18,7 +18,7 @@ % and the derived files % atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, % atbegshi-example.tex, atbegshi-test1.tex, -% atbegshi-test2.tex. +% atbegshi-test2.tex, atbegshi-test3.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/atbegshi.dtx @@ -56,6 +56,7 @@ % TDS:doc/latex/oberdiek/atbegshi-example.tex % TDS:doc/latex/oberdiek/atbegshi-test1.tex % TDS:doc/latex/oberdiek/atbegshi-test2.tex +% TDS:doc/latex/oberdiek/atbegshi-test3.tex % TDS:source/latex/oberdiek/atbegshi.dtx % %<*ignore> @@ -71,7 +72,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: atbegshi 2007/06/06 v1.5 At begin shipout hook (HO)} +\Msg{* Package: atbegshi 2007/09/09 v1.6 At begin shipout hook (HO)} \Msg{************************************************************************} \keepsilent @@ -99,7 +100,7 @@ This work consists of the main source file atbegshi.dtx and the derived files atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, atbegshi-example.tex, atbegshi-test1.tex, - atbegshi-test2.tex. + atbegshi-test2.tex, atbegshi-test3.tex. \endpreamble @@ -112,6 +113,7 @@ and the derived files \file{atbegshi-example.tex}{\from{atbegshi.dtx}{example}}% \file{atbegshi-test1.tex}{\from{atbegshi.dtx}{test1}}% \file{atbegshi-test2.tex}{\from{atbegshi.dtx}{test2}}% + \file{atbegshi-test3.tex}{\from{atbegshi.dtx}{test3}}% } \obeyspaces @@ -137,7 +139,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atbegshi.drv}% - [2007/06/06 v1.5 At begin shipout hook (HO)]% + [2007/09/09 v1.6 At begin shipout hook (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -146,7 +148,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1239} +% \CheckSum{1283} % % \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 @@ -167,7 +169,7 @@ and the derived files % \GetFileInfo{atbegshi.drv} % % \title{The \xpackage{atbegshi} package} -% \date{2007/06/06 v1.5} +% \date{2007/09/09 v1.6} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -787,35 +789,33 @@ The last page. \fi \expandafter\x\csname ver@atbegshi.sty\endcsname \ProvidesPackage{atbegshi}% - [2007/06/06 v1.5 At begin shipout hook (HO)] + [2007/09/09 v1.6 At begin shipout hook (HO)] % \end{macrocode} % % \subsection{Catcodes} % % \begin{macrocode} -\expandafter\edef\csname AtBegShi@End\endcsname{% - \catcode40 \the\catcode40\relax % ( - \catcode41 \the\catcode41\relax % ) - \catcode44 \the\catcode44\relax % , - \catcode45 \the\catcode45\relax % - - \catcode46 \the\catcode46\relax % . - \catcode58 \the\catcode58\relax % : - \catcode61 \the\catcode61\relax % = - \catcode64 \the\catcode64\relax % @ - \catcode94 \the\catcode94\relax % ^ - \catcode96 \the\catcode96\relax % ` - \noexpand\endinput +\expandafter\edef\csname AtBegShi@AtEnd\endcsname{% + \catcode64 \the\catcode64\relax } -\catcode40 12 % ( -\catcode41 12 % ) -\catcode44 12 % , -\catcode45 12 % - -\catcode46 12 % . -\catcode58 12 % : -\catcode61 12 % = \catcode64 11 % @ -\catcode94 7 % ^ -\catcode96 12 % ` +\def\TMP@EnsureCode#1#2{% + \edef\AtBegShi@AtEnd{% + \AtBegShi@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{94}{7}% ^(superscript) +\TMP@EnsureCode{96}{12}% ` % \end{macrocode} % % \subsection{Preparations} @@ -825,7 +825,7 @@ The last page. \expandafter\ifx\csname RequirePackage\endcsname\relax \input infwarerr.sty\relax \else - \RequirePackage{infwarerr}% + \RequirePackage{infwarerr}[2007/09/09]% \fi % \end{macrocode} % @@ -1180,7 +1180,8 @@ X \endgroup \def\AtBegShi@AbortIfUndefined#1{% \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname#1\endcsname\relax - \expandafter\AtBegShi@End + \AtBegShi@AtEnd + \expandafter\endinput \fi } \AtBegShi@AbortIfUndefined{currentgrouplevel} @@ -1461,20 +1462,72 @@ X \endgroup % \end{macrocode} % % \begin{macrocode} -\AtBegShi@End +\AtBegShi@AtEnd %</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 atbegshi.sty\relax + \RestoreCatcodes +} +\Test +\csname @@end\endcsname +\end +% \end{macrocode} +% \begin{macrocode} +%</test1> +% \end{macrocode} +% +% \begin{macrocode} +%<*test2> \input atbegshi.sty\relax \def\msg#{\immediate\write16} -\msg{File: atbegshi-test1.tex 2007/06/06 v1.5 Test file for plain-TeX} +\msg{File: atbegshi-test2.tex 2007/09/09 v1.6 Test file for plain-TeX} \def\testmsg#1#2{% \msg{}% - \msg{*** Test with box (#1), expected page output [#2]}% + \msg{*** Test with box (#1), expected page output [#2]}% hash-ok } \newbox\voidbox @@ -1562,13 +1615,13 @@ Hello World \shipout\null \end -%</test1> +%</test2> % \end{macrocode} % % \begin{macrocode} -%<*test2> +%<*test3> \NeedsTeXFormat{LaTeX2e} -\ProvidesFile{atbegshi-test2.tex}[2007/06/06 v1.5 Test file for LaTeX] +\ProvidesFile{atbegshi-test3.tex}[2007/09/09 v1.6 Test file for LaTeX] \RequirePackage{color} \pagecolor{yellow} \documentclass[a5paper,showtrims]{memoir} @@ -1614,8 +1667,9 @@ Hello World \shipout\box\csname voidb@x\endcsname \section{Hello World} \end{document} -%</test2> +%</test3> % \end{macrocode} +% % \section{Installation} % % \subsection{Download} @@ -1680,6 +1734,7 @@ Hello World % atbegshi-example.tex & doc/latex/oberdiek/atbegshi-example.tex\\ % atbegshi-test1.tex & doc/latex/oberdiek/atbegshi-test1.tex\\ % atbegshi-test2.tex & doc/latex/oberdiek/atbegshi-test2.tex\\ +% atbegshi-test3.tex & doc/latex/oberdiek/atbegshi-test3.tex\\ % atbegshi.dtx & source/latex/oberdiek/atbegshi.dtx\\ % \end{tabular}^^A % }^^A @@ -1838,6 +1893,10 @@ Hello World % \item % Fix in second test file for newer version of \xclass{memoir}. % \end{Version} +% \begin{Version}{2007/09/09 v1.6} +% \item +% Catcode section rewritten. +% \end{Version} % \end{History} % % \PrintIndex |