summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/oberdiek/atbegshi.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/oberdiek/atbegshi.dtx')
-rw-r--r--macros/latex/contrib/oberdiek/atbegshi.dtx292
1 files changed, 1 insertions, 291 deletions
diff --git a/macros/latex/contrib/oberdiek/atbegshi.dtx b/macros/latex/contrib/oberdiek/atbegshi.dtx
index 3c8c5aa20a..7827606797 100644
--- a/macros/latex/contrib/oberdiek/atbegshi.dtx
+++ b/macros/latex/contrib/oberdiek/atbegshi.dtx
@@ -69,9 +69,6 @@
% TDS:doc/latex/oberdiek/atbegshi.pdf
% TDS:doc/latex/oberdiek/atbegshi-example1.tex
% TDS:doc/latex/oberdiek/atbegshi-example2.tex
-% TDS:doc/latex/oberdiek/test/atbegshi-test1.tex
-% TDS:doc/latex/oberdiek/test/atbegshi-test2.tex
-% TDS:doc/latex/oberdiek/test/atbegshi-test3.tex
% TDS:source/latex/oberdiek/atbegshi.dtx
%
%<*ignore>
@@ -148,10 +145,6 @@ and the derived files
% \file{atbegshi-test1.tex}{\from{atbegshi.dtx}{test1}}%
% \file{atbegshi-test2.tex}{\from{atbegshi.dtx}{test2}}%
% \file{atbegshi-test3.tex}{\from{atbegshi.dtx}{test3}}%
- \nopreamble
- \nopostamble
-% \usedir{source/latex/oberdiek/catalogue}%
-% \file{atbegshi.xml}{\from{atbegshi.dtx}{catalogue}}%
}
\catcode32=13\relax% active space
@@ -188,21 +181,6 @@ and the derived files
% \fi
%
%
-% \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{atbegshi.drv}
%
@@ -1866,272 +1844,7 @@ X \endgroup
\AtBegShi@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
-}
-\def\RangeCatcodeCheck#1#2#3{%
- \count@=#1\relax
- \loop
- \ifnum#3=\catcode\count@
- \else
- \errmessage{%
- Character \the\count@\space
- with wrong catcode \the\catcode\count@\space
- instead of \number#3%
- }%
- \fi
- \ifnum\count@<#2\relax
- \advance\count@ 1 %
- \repeat
-}
-\def\space{ }
-\expandafter\ifx\csname LoadCommand\endcsname\relax
- \def\LoadCommand{\input atbegshi.sty\relax}%
-\fi
-\def\Test{%
- \RangeCatcodeInvalid{0}{47}%
- \RangeCatcodeInvalid{58}{64}%
- \RangeCatcodeInvalid{91}{96}%
- \RangeCatcodeInvalid{123}{255}%
- \catcode`\@=12 %
- \catcode`\\=0 %
- \catcode`\%=14 %
- \LoadCommand
- \RangeCatcodeCheck{0}{36}{15}%
- \RangeCatcodeCheck{37}{37}{14}%
- \RangeCatcodeCheck{38}{47}{15}%
- \RangeCatcodeCheck{48}{57}{12}%
- \RangeCatcodeCheck{58}{63}{15}%
- \RangeCatcodeCheck{64}{64}{12}%
- \RangeCatcodeCheck{65}{90}{11}%
- \RangeCatcodeCheck{91}{91}{15}%
- \RangeCatcodeCheck{92}{92}{0}%
- \RangeCatcodeCheck{93}{96}{15}%
- \RangeCatcodeCheck{97}{122}{11}%
- \RangeCatcodeCheck{123}{255}{15}%
- \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-test2.tex 2016/06/09 v1.18 Test file for plain-TeX}
-\def\testmsg#1#2{%
- \msg{}%
- \msg{*** Test with box (#1), expected page output [#2]}% hash-ok
-}
-
-\newbox\voidbox
-\def\void{\box\voidbox}
-\begingroup
- \setbox\voidbox=\void
-\endgroup
-
-\count0=0\relax
-\AtBeginShipout{%
- \global\advance\count0 by 1\relax
- \msg{* Inside \string\AtBeginShipout: [\the\count0]}%
-}
-
-\AtBeginShipoutFirst{%
- \msg{* Inside \string\AtBeginShipoutFirst}%
- Hello World%
-}
-
-\testmsg{\string\null}{1}
-\shipout\null
-
-\AtBeginShipoutFirst{%
- This is too late%
-}
-
-\testmsg{void}{}
-\shipout\void
-
-\testmsg{\string\copy255 (not void)}{2}
-\setbox255\hbox{\vrule height 10bp width 10bp}
-\shipout\copy255 %
-
-\testmsg{\string\copy255 (again)}{3}
-\shipout\copy255 %
-
-\testmsg{\string\box255}{4}
-\shipout\box255 %
-
-\testmsg{\string\box255 (again)}{}
-\shipout\box255 %
-
-\testmsg{\string\hbox}{5}
-\shipout\hbox{\vrule height 5bp width 20bp}
-
-\testmsg{\string\vbox}{6}
-\shipout\vbox{\hrule height 20bp width 5bp}
-
-\testmsg{\string\null, voided by hook}{}
-\def\VoidBox{%
- \begingroup
- \setbox\AtBeginShipoutBox=\box\AtBeginShipoutBox
- \endgroup
-}
-\AtBeginShipout{\VoidBox}
-\shipout\null
-\def\VoidBox{}
-
-\msg{*** \string\begingroup}
-\begingroup
- \testmsg{void}{}%
- \shipout\void
-\msg{*** \string\endgroup}
-\endgroup
-
-\msg{*** \string\begingroup}
-\begingroup
- \testmsg{void}{}%
- \shipout\void
- \testmsg{\string\null}{8}%
- \shipout\null
-\msg{*** \string\endgroup}
-\endgroup
-
-\testmsg{output routine}{9}
-Hello World
-\vfill
-\eject
-
-\testmsg{\string\null\space(discarded)}{}
-\AtBeginShipout{%
- \msg{* Inside \string\AtBeginShipout: DISCARD}%
- \AtBeginShipoutDiscard
-}
-\shipout\null
-
-\end
-%</test2>
-% \end{macrocode}
-%
-% \begin{macrocode}
-%<*test3>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{atbegshi-test3.tex}[2016/06/09 v1.18 Test file for LaTeX]
-\RequirePackage{color}
-\pagecolor{yellow}
-\documentclass[a5paper,showtrims]{memoir}
-\usepackage{atbegshi}
-\AtBeginShipout{%
- \setbox\AtBeginShipoutBox=\vbox{%
- \vbox to 0pt{%
- \kern-1.5in %
- \hbox to 0pt{%
- \kern-1.5in %
- \color{blue}%
- \rule{1in}{1in}%
- \hss
- }%
- \vss
- }%
- \hrule
- \hbox{\vrule\box\AtBeginShipoutBox\vrule}%
- \hrule
- }%
-}
-\usepackage{eso-pic}
-\makeatletter
-\@ifundefined{@EveryShipout@Init}{%
- \typeout{Test skipped}%
- \@@end
-}{}
-\@EveryShipout@Init
-\let\@EveryShipout@Init\relax
-\makeatother
-\AddToShipoutPicture{%
- \hspace{.52\paperwidth}%
- \colorbox{cyan}{%
- \rule{0mm}{\paperheight}%
- \hspace{.48\paperwidth}%
- }%
-}
-% \end{macrocode}
-% Newer versions of class \xclass{memoir} emulate package
-% \xpackage{crop} and prevents its loading. This is undone
-% in next line for this test file.
-% \begin{macrocode}
-\expandafter\let\csname ver@crop.sty\endcsname\relax
-\usepackage[color=red,cross,a4,center]{crop}
-\begin{document}
-\shipout\null
-\shipout\box\csname voidb@x\endcsname
-\section{Hello World}
-\end{document}
-%</test3>
-% \end{macrocode}
-%
-% \section{Installation}
+%% \section{Installation}
%
% \subsection{Download}
%
@@ -2182,9 +1895,6 @@ Hello World
% atbegshi.pdf & doc/latex/oberdiek/atbegshi.pdf\\
% atbegshi-example1.tex & doc/latex/oberdiek/atbegshi-example1.tex\\
% atbegshi-example2.tex & doc/latex/oberdiek/atbegshi-example2.tex\\
-% test/atbegshi-test1.tex & doc/latex/oberdiek/test/atbegshi-test1.tex\\
-% test/atbegshi-test2.tex & doc/latex/oberdiek/test/atbegshi-test2.tex\\
-% test/atbegshi-test3.tex & doc/latex/oberdiek/test/atbegshi-test3.tex\\
% atbegshi.dtx & source/latex/oberdiek/atbegshi.dtx\\
% \end{tabular}^^A
% }^^A