diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx | 74 |
1 files changed, 58 insertions, 16 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx index a2067710dcf..cdcfece9391 100644 --- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx @@ -17,8 +17,8 @@ % 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-test3.tex. +% atbegshi-example1.tex, atbegshi-example2.tex, +% atbegshi-test1.tex, atbegshi-test2.tex, atbegshi-test3.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/atbegshi.dtx @@ -53,7 +53,8 @@ % Installation: % TDS:tex/generic/oberdiek/atbegshi.sty % TDS:doc/latex/oberdiek/atbegshi.pdf -% TDS:doc/latex/oberdiek/atbegshi-example.tex +% 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 @@ -72,7 +73,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: atbegshi 2008/07/19 v1.8 At begin shipout hook (HO)} +\Msg{* Package: atbegshi 2008/07/31 v1.9 At begin shipout hook (HO)} \Msg{************************************************************************} \keepsilent @@ -100,8 +101,8 @@ This Current Maintainer of this work is Heiko Oberdiek. 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-test3.tex. + atbegshi-example1.tex, atbegshi-example2.tex, + atbegshi-test1.tex, atbegshi-test2.tex, atbegshi-test3.tex. \endpreamble \let\MetaPrefix\DoubleperCent @@ -112,7 +113,8 @@ and the derived files \usedir{tex/generic/oberdiek}% \file{atbegshi.sty}{\from{atbegshi.dtx}{package}}% \usedir{doc/latex/oberdiek}% - \file{atbegshi-example.tex}{\from{atbegshi.dtx}{example}}% + \file{atbegshi-example1.tex}{\from{atbegshi.dtx}{example1}}% + \file{atbegshi-example2.tex}{\from{atbegshi.dtx}{example2}}% \usedir{doc/latex/oberdiek/test}% \file{atbegshi-test1.tex}{\from{atbegshi.dtx}{test1}}% \file{atbegshi-test2.tex}{\from{atbegshi.dtx}{test2}}% @@ -146,7 +148,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atbegshi.drv}% - [2008/07/19 v1.8 At begin shipout hook (HO)]% + [2008/07/31 v1.9 At begin shipout hook (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2007/11/11] \begin{document} @@ -176,7 +178,7 @@ and the derived files % \GetFileInfo{atbegshi.drv} % % \title{The \xpackage{atbegshi} package} -% \date{2008/07/19 v1.8} +% \date{2008/07/31 v1.9} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -299,13 +301,15 @@ and the derived files % See \cs{AtBeginShipoutUpperLeft}. The difference is that the material % is put in the foreground. % -% \subsection{Example} +% \subsection{Examples} +% +% \subsubsection{Example: circle in background} % % In this example we put a circle in the background in the middle % of the paper. % % \begin{macrocode} -%<*example> +%<*example1> % \end{macrocode} % \begin{macrocode} \documentclass[a4paper]{article} @@ -352,9 +356,40 @@ The last page. \end{document} % \end{macrocode} % \begin{macrocode} -%</example> +%</example1> % \end{macrocode} % +% \subsubsection{Example: adding TrimBox for dvipdfmx} +% +% Now an example from ``real life'' follows. Someone from the mailing list +% for dvipdfmx wants to put a TrimBox on every page. If we use +% \cs{AtBeginShipout}, we have to put the \cs{special} inside the +% box \cs{AtBeginShipoutBox} that gets shipped out. +% \begin{macrocode} +%<*example2> +\documentclass{minimal} +\usepackage{atbegshi} +\usepackage[ + dvipdfm, + paperwidth=630bp, + paperheight=810bp +]{geometry} +\AtBeginShipout{% + \setbox\AtBeginShipoutBox=\hbox{% + \special{pdf: put @thispage <</TrimBox[9 9 621 801]>>}% + \box\AtBeginShipoutBox + }% +} +\begin{document} + First page + \newpage + Second page +\end{document} +%</example2> +% \end{macrocode} +% Remember, in \cs{AtBeginShipoutBoxFirst} the \cs{setbox} wrapper code +% is implicitly given and the \cs{special} is used directly. +% % \section{Method of \cs{shipout} overloading} % % \subsection{\cs{shipout}} @@ -812,7 +847,7 @@ The last page. \fi \expandafter\x\csname ver@atbegshi.sty\endcsname \ProvidesPackage{atbegshi}% - [2008/07/19 v1.8 At begin shipout hook (HO)] + [2008/07/31 v1.9 At begin shipout hook (HO)] % \end{macrocode} % % \subsection{Catcodes} @@ -1616,7 +1651,7 @@ X \endgroup %<*test2> \input atbegshi.sty\relax \def\msg#{\immediate\write16} -\msg{File: atbegshi-test2.tex 2008/07/19 v1.8 Test file for plain-TeX} +\msg{File: atbegshi-test2.tex 2008/07/31 v1.9 Test file for plain-TeX} \def\testmsg#1#2{% \msg{}% \msg{*** Test with box (#1), expected page output [#2]}% hash-ok @@ -1713,7 +1748,7 @@ Hello World % \begin{macrocode} %<*test3> \NeedsTeXFormat{LaTeX2e} -\ProvidesFile{atbegshi-test3.tex}[2008/07/19 v1.8 Test file for LaTeX] +\ProvidesFile{atbegshi-test3.tex}[2008/07/31 v1.9 Test file for LaTeX] \RequirePackage{color} \pagecolor{yellow} \documentclass[a5paper,showtrims]{memoir} @@ -1823,7 +1858,8 @@ Hello World % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % atbegshi.sty & tex/generic/oberdiek/atbegshi.sty\\ % atbegshi.pdf & doc/latex/oberdiek/atbegshi.pdf\\ -% atbegshi-example.tex & doc/latex/oberdiek/atbegshi-example.tex\\ +% 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\\ @@ -1997,6 +2033,12 @@ Hello World % \item % \cs{AtBeginShipoutUpperLeftForeground} added. % \end{Version} +% \begin{Version}{2008/07/31 v1.9} +% \item +% Second example (TrimBox for dvipdfmx) added. +% \item +% No changes in package code. +% \end{Version} % \end{History} % % \PrintIndex |