Debian Codegraph @

texmf-dist/doc/latex/eso-pic/eso-ex4.tex

raw
1
2 % file `eso-ex4.tex'; a framed text area example
3
4 \listfiles\setcounter{errorcontextlines}{100}
5 \documentclass[a4paper,twoside]{article}
6 \usepackage{graphicx,pict2e}
7 \usepackage{eso-pic}
8
9 \AddToShipoutPictureBG{%
10 \AtTextLowerLeft{\framebox(\textwidth,\textheight){}}}
11
12 \setlength\parindent{0pt}
13
14 \begin{document}
15
16 \section*{First page}
17
18 \AddToShipoutPictureBG*{% on the background, only this page
19 \AtTextUpperLeft{%
20 \put(30mm,-25mm){\color{lightgray}\circle*{50}}
21 }
22 }
23 \AddToShipoutPictureFG*{% on the foreground, only this page
24 \AtTextUpperLeft{%
25 \put(60mm,-25mm){\color{lightgray}\circle*{50}}
26 }
27 }
28
29 This page and all the following have a frame around the
30 text area. \par
31 This page and all the following have a frame around the
32 text area. \par
33 This page and all the following have a frame around the
34 text area. \par
35 This page and all the following have a frame around the
36 text area. \par
37 This page and all the following have a frame around the
38 text area. \par
39 This page and all the following have a frame around the
40 text area. \par
41 This page and all the following have a frame around the
42 text area. \par
43 This page and all the following have a frame around the
44 text area. \par
45
46 \vfill
47 X \hfill X\newpage
48
49 \section*{Second page}
50
51 \AddToShipoutPictureBG*{%
52 \AtTextCenter{%
53 \makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
54 \rotatebox{45}{\textsf{\textbf{\color{lightgray}DRAFT}}}}}
55 }
56 }
57
58 Only this page has rotated text in the center of the text area.
59
60 \vfill
61 X \hfill X\newpage
62
63 \section*{Last page}
64
65 \vfill
66 X \hfill X
67
68 \end{document}