summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty78
1 files changed, 76 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty b/Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty
index e127443a137..a8cb607840b 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/atbegshi.sty
@@ -25,7 +25,8 @@
%% This work consists of the main source file atbegshi.dtx
%% and the derived files
%% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv,
-%% atbegshi-test1.tex, atbegshi-test2.tex.
+%% atbegshi-example.tex, atbegshi-test1.tex,
+%% atbegshi-test2.tex.
%%
\begingroup
\catcode44 12 % ,
@@ -56,9 +57,12 @@
\fi
\endgroup
\begingroup
+ \catcode40 12 % (
+ \catcode41 12 % )
\catcode44 12 % ,
\catcode45 12 % -
\catcode46 12 % .
+ \catcode47 12 % /
\catcode58 12 % :
\catcode64 11 % @
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
@@ -76,7 +80,7 @@
\fi
\expandafter\x\csname ver@atbegshi.sty\endcsname
\ProvidesPackage{atbegshi}%
- [2007/04/27 v1.4 At begin shipout hook (HO)]
+ [2007/06/06 v1.5 At begin shipout hook (HO)]
\expandafter\edef\csname AtBegShi@End\endcsname{%
\catcode40 \the\catcode40\relax % (
\catcode41 \the\catcode41\relax % )
@@ -275,6 +279,76 @@ X \endgroup
\else
\AtBeginDocument{\AtBeginShipoutInit}%
\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ifpdf.sty\relax
+\else
+ \RequirePackage{ifpdf}\relax
+\fi
+\ifpdf
+ \def\AtBegShi@horigin{\pdfhorigin}%
+ \def\AtBegShi@vorigin{\pdfvorigin}%
+\else
+ \def\AtBegShi@horigin{72.27pt}%
+ \def\AtBegShi@vorigin{72.27pt}%
+\fi
+\begingroup
+\ifcase
+ \expandafter\ifx\csname picture\endcsname\relax
+ 1%
+ \else
+ \expandafter\ifx\csname endpicture\endcsname\relax
+ 1%
+ \else
+ 0%
+ \fi
+ \fi
+ \endgroup
+ \def\AtBegShi@BeginPicture{%
+ \begingroup
+ \picture(0,0)\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname unitlength\endcsname\relax
+ \else
+ \unitlength=1pt\relax
+ \fi
+ \ignorespaces
+ }%
+ \def\AtBegShi@EndPicture{%
+ \endpicture
+ \endgroup
+ }%
+\else
+ \endgroup
+ \def\AtBegShi@BeginPicture{%
+ \setbox0=\hbox\bgroup
+ \begingroup
+ \ignorespaces
+ }%
+ \def\AtBegShi@EndPicture{%
+ \endgroup
+ \egroup
+ \ht0=0pt\relax
+ \dp0=0pt\relax
+ \copy0 %
+ }%
+\fi
+\def\AtBeginShipoutUpperLeft#1{%
+ \global\setbox\AtBeginShipoutBox=\hbox{%
+ \rlap{%
+ \kern-\AtBegShi@horigin\relax
+ \vbox to 0pt{%
+ \kern-\AtBegShi@vorigin\relax
+ \kern-\ht\AtBeginShipoutBox
+ \AtBegShi@BeginPicture
+ #1%
+ \AtBegShi@EndPicture
+ \vss
+ }%
+ }%
+ \box\AtBeginShipoutBox
+ }%
+}
\def\AtBegShi@AbortIfUndefined#1{%
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname#1\endcsname\relax