diff options
author | Karl Berry <karl@freefriends.org> | 2007-04-28 00:47:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-04-28 00:47:40 +0000 |
commit | eb20b1a58efdf85ed1ef1c7091bcb414a7a60a32 (patch) | |
tree | 80972c25ace1916fc7b72d86dc8e3edf99f12824 /Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx | |
parent | e376078a88d46cc66692baeb43f83a235f9b52a3 (diff) |
oberdiek as always, infwarerr v1.0 new and updates
git-svn-id: svn://tug.org/texlive/trunk@4200 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 | 231 |
1 files changed, 100 insertions, 131 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx index 37869feb4c8..9a21e37af89 100644 --- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx @@ -69,7 +69,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: atbegshi 2007/04/19 v1.2 At begin shipout hook (HO)} +\Msg{* Package: atbegshi 2007/04/27 v1.4 At begin shipout hook (HO)} \Msg{************************************************************************} \keepsilent @@ -133,7 +133,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atbegshi.drv}% - [2007/04/19 v1.2 At begin shipout hook (HO)]% + [2007/04/27 v1.4 At begin shipout hook (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} @@ -142,7 +142,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1176} +% \CheckSum{1120} % % \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 +163,7 @@ and the derived files % \GetFileInfo{atbegshi.drv} % % \title{The \xpackage{atbegshi} package} -% \date{2007/04/19 v1.2} +% \date{2007/04/27 v1.4} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -315,7 +315,7 @@ and the derived files % the assignment: %\begin{quote} %\begin{verbatim} -%\shipout -> +%\shipout := % \afterassignment\@test % \setbox\mybox= %\end{verbatim} @@ -353,12 +353,12 @@ and the derived files % compares the previously stored group level with the current one: %\begin{quote} %\begin{verbatim} -%\shipout -> +%\shipout := % \edef\saved@grouplevel{\number\currentgrouplevel} % \afterassignment\@test % \setbox\mybox= % -%\@test -> +%\@test := % \ifnum\saved@grouplevel=\currentgrouplevel % % case: indirect box, the assignment is completed % \@output @@ -416,7 +416,7 @@ and the derived files % in our macros, namely \cs{@output}. %\begin{quote} %\begin{verbatim} -%\shipout -> +%\shipout := % % trick to get a void box \mybox % \begingroup % \setbox\mybox=\box\mybox @@ -424,7 +424,7 @@ and the derived files % \afterassignment\@test % \setbox\mybox= % -%\@test -> +%\@test := % \ifvoid\mybox % \aftergroup\@output % \else @@ -454,13 +454,13 @@ and the derived files % it returns 0\,pt. %\begin{quote} %\begin{verbatim} -%\shipout -> +%\shipout := % \begingroup % \setbox\mybox=\hbox\bgroup % \kern1pt % \afterassignment\shipout@test % \global\setbox\mybox= -%\@test -> +%\@test := % \ifdim\lastkern=0pt % % direct box % \aftergroup\egroup @@ -490,7 +490,7 @@ and the derived files % wants to manipulate the output box. %\begin{quote} %\begin{verbatim} -%\@output -> +%\@output := % \ifvoid\mybox % % cancel output of void box % \else @@ -537,19 +537,18 @@ and the derived files %\newbox\mybox %\let\original@shipout\shipout % -%\shipout -> +%\shipout := % \edef\saved@grouplevel{\number\currentgrouplevel} % \afterassignment\@test % \setbox\mybox= % -%\@test -> -% \ifnum\saved@grouplevel=\currentgrouplevel -% \@output -% \else -% \aftergroup\@output +%\@test := +% \ifnum\saved@grouplevel<\currentgrouplevel +% \expandafter\aftergroup % \fi +% \@output % -%\@output -> +%\@output := % \ifvoid\mybox % % cancel output of void box % \else @@ -563,7 +562,7 @@ and the derived files %\end{verbatim} %\end{quote} % -% \subsubsection{Without \eTeX} +% \subsubsection{Without \eTeX, traditional way} % % And for \TeX\ without \eTeX: %\begin{quote} @@ -574,7 +573,7 @@ and the derived files %\endgroup %\let\original@shipout\shipout % -%\shipout -> +%\shipout := % % trick to get a void box \mybox % \begingroup % \setbox\mybox=\box\mybox @@ -582,14 +581,13 @@ and the derived files % \afterassignment\@test % \setbox\mybox= % -%\@test -> +%\@test := % \ifvoid\mybox -% \aftergroup\@output -% \else -% \@output +% \expandafter\aftergroup % \fi +% \@output % -%\@output -> +%\@output := % \ifvoid\mybox % % cancel output of void box % \else @@ -611,25 +609,22 @@ and the derived files %\newbox\mybox %\let\original@shipout\shipout % -%\shipout -> +%\shipout := % \begingroup % \setbox\mybox=\hbox\bgroup % \kern1pt % \afterassignment\@test % \setbox\mybox= % -%\@test -> +%\@test := % \ifdim\lastkern=0pt -% \aftergroup\egroup -% \aftergroup\endgroup -% \aftergroup\@output -% \else -% \egroup -% \endgroup -% \@output +% \expandafter\aftergroup % \fi +% \@output % -%\@output -> +%\@output := +% \egroup +% \endgroup % \ifvoid\mybox % % cancel output of void box % \else @@ -655,38 +650,15 @@ and the derived files %<*package> % \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 -} -\catcode40 12 % ( -\catcode41 12 % ) -\catcode44 12 % , -\catcode45 12 % - -\catcode46 12 % . -\catcode58 12 % : -\catcode61 12 % = -\catcode64 11 % @ -\catcode94 7 % ^ -\catcode96 12 % ` -% \end{macrocode} -% % \subsection{Reload check and package identification} % Reload check, especially if the package is not used with \LaTeX. % \begin{macrocode} \begingroup + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ \expandafter\let\expandafter\x\csname ver@atbegshi.sty\endcsname \ifcase 0% \ifx\x\relax % plain @@ -713,6 +685,11 @@ and the derived files % Package identification: % \begin{macrocode} \begingroup + \catcode44 12 % , + \catcode45 12 % - + \catcode46 12 % . + \catcode58 12 % : + \catcode64 11 % @ \expandafter\ifx\csname ProvidesPackage\endcsname\relax \def\x#1#2#3[#4]{\endgroup \immediate\write-1{Package: #3 #4}% @@ -728,59 +705,46 @@ and the derived files \fi \expandafter\x\csname ver@atbegshi.sty\endcsname \ProvidesPackage{atbegshi}% - [2007/04/19 v1.2 At begin shipout hook (HO)] + [2007/04/27 v1.4 At begin shipout hook (HO)] % \end{macrocode} % -% \subsection{Preparations} +% \subsection{Catcodes} % -% \begin{macro}{\AtBegShi@Warning} % \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname PackageWarning\endcsname\relax - \def\AtBegShi@Warning#1{% - \begingroup - \newlinechar=10 % - \def\@spaces{\space\space\space\space}% - \def\MessageBreak{% - ^^J(atbegshi)\@spaces\@spaces\@spaces\@spaces - }% - \immediate\write16{% - ^^JPackage atbegshi Warning: #1 % - on input line \the\inputlineno.^^J% - }% - \endgroup - }% -\else - \def\AtBegShi@Warning{% - \PackageWarning{atbegshi}% - }% -\fi +\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 +} +\catcode40 12 % ( +\catcode41 12 % ) +\catcode44 12 % , +\catcode45 12 % - +\catcode46 12 % . +\catcode58 12 % : +\catcode61 12 % = +\catcode64 11 % @ +\catcode94 7 % ^ +\catcode96 12 % ` % \end{macrocode} -% \end{macro} % -% \begin{macro}{\AtBegShi@Info} +% \subsection{Preparations} +% +% \begin{macro}{\AtBegShi@Warning} % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname PackageInfo\endcsname\relax - \def\AtBegShi@Info#1{% - \begingroup - \newlinechar=10 % - \def\@spaces{\space\space\space\space}% - \def\MessageBreak{% - ^^J(atbegshi) \@spaces\@spaces\@spaces - }% - \immediate\write-1{% - ^^JPackage atbegshi Info: #1.^^J% - }% - \endgroup - }% +\expandafter\ifx\csname RequirePackage\endcsname\relax + \input infwarerr.sty\relax \else - \def\AtBegShi@Info#1{% - \begingroup - \def\on@line{}% - \PackageInfo{atbegshi}{#1}% - \endgroup - }% + \RequirePackage{infwarerr}% \fi % \end{macrocode} % \end{macro} @@ -856,31 +820,21 @@ X \global % \begin{macrocode} \def\AtBegShi@Test{% X \ifdim\lastkern=\z@ -X \aftergroup\egroup -X \aftergroup\endgroup -X \expandafter\aftergroup -X \else -X \egroup -X \endgroup -E \ifnum\AtBegShi@GroupLevel=\currentgrouplevel -E \else -E \expandafter\aftergroup +E \ifnum\AtBegShi@GroupLevel<\currentgrouplevel + \expandafter\aftergroup \fi \AtBegShi@Output } % \end{macrocode} % \end{macro} % -% \begin{macrocode} -\catcode`\X=11 % -\catcode`\E=11 % -% \end{macrocode} -% % \begin{macro}{\AtBegShi@Output} % \begin{macrocode} \def\AtBegShi@Output{% +X \egroup +X \endgroup \ifvoid\AtBeginShipoutBox - \AtBegShi@Warning{Ignoring void shipout box}% + \@PackageWarning{atbegshi}{Ignoring void shipout box}% \else \let\AtBegShi@OrgProtect\protect \csname set@typeset@protect\endcsname @@ -889,7 +843,7 @@ E \expandafter\aftergroup \AtBegShi@HookNext \gdef\AtBegShi@HookNext{}% \ifAtBegShi@Discarded - \AtBegShi@Info{Shipout page discarded}% + \@PackageInfoNoLine{atbegshi}{Shipout page discarded}% \global\AtBegShi@Discardedfalse \begingroup \setbox\AtBeginShipoutBox\box\AtBeginShipoutBox @@ -905,6 +859,11 @@ E \expandafter\aftergroup % \end{macrocode} % \end{macro} % +% \begin{macrocode} +\catcode`\X=11 % +\catcode`\E=11 % +% \end{macrocode} +% % \begin{macro}{\AtBegShi@First} % \begin{macrocode} \def\AtBegShi@First{% @@ -977,7 +936,7 @@ E \expandafter\aftergroup % \begin{macro}{\AtBegShi@FirstDisabled} % \begin{macrocode} \long\def\AtBegShi@FirstDisabled#1{% - \AtBegShi@Warning{% + \@PackageWarning{atbegshi}{% First page is already shipped out, ignoring\MessageBreak \string\AtBeginShipoutFirst }% @@ -1016,7 +975,7 @@ E \expandafter\aftergroup \else #1% \ifvoid\AtBeginShipoutBox - \AtBegShi@Warning{% + \@PackageWarning{atbegshi}{% Shipout box was voided by hook,\MessageBreak ignoring shipout box% }% @@ -1144,7 +1103,7 @@ E \expandafter\aftergroup \expandafter\AtBeginShipoutBox \fi }% - \AtBegShi@Info{Package `crop' patched}% + \@PackageInfoNoLine{atbegshi}{Package `crop' patched}% \begingroup \fi \fi @@ -1221,7 +1180,7 @@ E \expandafter\aftergroup \expandafter\@EveryShipout@Output \fi }% - \AtBegShi@Info{Package `everyshi' patched}% + \@PackageInfoNoLine{atbegshi}{Package `everyshi' patched}% \begingroup \fi \fi @@ -1322,7 +1281,7 @@ E \expandafter\aftergroup \expandafter\AtBeginShipoutBox \fi }% - \AtBegShi@Info{Class `memoir' patched}% + \@PackageInfoNoLine{atbegshi}{Class `memoir' patched}% \begingroup \fi \fi @@ -1348,7 +1307,7 @@ E \expandafter\aftergroup %<*test1> \input atbegshi.sty\relax \def\msg#{\immediate\write16} -\msg{File: atbegshi-test1.tex 2007/04/19 v1.2 Test file for plain-TeX} +\msg{File: atbegshi-test1.tex 2007/04/27 v1.4 Test file for plain-TeX} \def\testmsg#1#2{% \msg{}% \msg{*** Test with box (#1), expected page output [#2]}% @@ -1445,7 +1404,7 @@ Hello World % \begin{macrocode} %<*test2> \NeedsTeXFormat{LaTeX2e} -\ProvidesFile{atbegshi-test2.tex}[2007/04/19 v1.2 Test file for LaTeX] +\ProvidesFile{atbegshi-test2.tex}[2007/04/27 v1.4 Test file for LaTeX] \RequirePackage{color} \pagecolor{yellow} \documentclass[a5paper,showtrims]{memoir} @@ -1636,6 +1595,16 @@ Hello World % Patches for packages \xpackage{crop} and \xpackage{everyshi} % and class \xclass{memoir} added. % \end{Version} +% \begin{Version}{2007/04/26 v1.3} +% \item +% Use of package \xpackage{infwarerr}. +% \item +% Catcode section after generic header. +% \end{Version} +% \begin{Version}{2007/04/27 v1.4} +% \item +% Small optimizations. +% \end{Version} % \end{History} % % \PrintIndex |