Debian Codegraph @

texmf-dist/doc/latex/atbegshi/atbegshi-example1.tex

raw
1 %%
2 %% This is file `atbegshi-example1.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% atbegshi.dtx (with options: `example1')
8 %%
9 %% This is a generated file.
10 %%
11 %% Project: atbegshi
12 %% Version: 2019/12/05 v1.19
13 %%
14 %% Copyright (C)
15 %% 2007-2011 Heiko Oberdiek
16 %% 2016-2019 Oberdiek Package Support Group
17 %%
18 %% This work may be distributed and/or modified under the
19 %% conditions of the LaTeX Project Public License, either
20 %% version 1.3c of this license or (at your option) any later
21 %% version. This version of this license is in
22 %% https://www.latex-project.org/lppl/lppl-1-3c.txt
23 %% and the latest version of this license is in
24 %% https://www.latex-project.org/lppl.txt
25 %% and version 1.3 or later is part of all distributions of
26 %% LaTeX version 2005/12/01 or later.
27 %%
28 %% This work has the LPPL maintenance status "maintained".
29 %%
30 %% The Current Maintainers of this work are
31 %% Heiko Oberdiek and the Oberdiek Package Support Group
32 %% https://github.com/ho-tex/atbegshi/issues
33 %%
34 %%
35 %% The Base Interpreter refers to any `TeX-Format',
36 %% because some files are installed in TDS:tex/generic//.
37 %%
38 %% This work consists of the main source file atbegshi.dtx
39 %% and the derived files
40 %% atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv,
41 %% atbegshi-example1.tex, atbegshi-example2.tex,
42 %% atbegshi-test1.tex, atbegshi-test2.tex, atbegshi-test3.tex.
43 %%
44 \documentclass[a4paper]{article}
45 \usepackage{color}
46 \usepackage{atbegshi}
47 \usepackage{picture}
48 \AtBeginShipout{%
49 \AtBeginShipoutUpperLeft{%
50 \put(0.5\paperwidth,-0.5\paperheight){\circle{10}}%
51 }%
52 }
53 \begin{document}
54 \section{Hello World}
55 \newpage
56 \AtBeginShipoutNext{%
57 \AtBeginShipoutUpperLeft{%
58 \color{red}%
59 \put(0,-0.5\paperheight){\line(1,0){\paperwidth}}%
60 \put(0.5\paperwidth, 0){\line(0,-1){\paperheight}}%
61 }%
62 }
63 Only on this page we add a red cross.
64 \newpage
65 This page has the circle only.
66 \par
67 \vspace{\fill}
68 The next page will be discarded.
69 \newpage
70 \AtBeginShipoutNext{%
71 \AtBeginShipoutDiscard
72 }
73 This page is discarded.
74 \newpage
75 The last page.
76 \end{document}
77 %% \section{Installation}
78 \endinput
79 %%
80 %% End of file `atbegshi-example1.tex'.