summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/eso-pic/eso-ex4.tex
blob: 46a66c5774c5dc1b07e00e33a4565ebaa1b0f779 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68

% file `eso-ex4.tex'; a framed text area example

\listfiles\setcounter{errorcontextlines}{100}
\documentclass[a4paper,twoside]{article}
\usepackage{graphicx,pict2e}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
  \AtTextLowerLeft{\framebox(\textwidth,\textheight){}}}

\setlength\parindent{0pt}

\begin{document}

  \section*{First page}
  
  \AddToShipoutPictureBG*{% on the background, only this page
    \AtTextUpperLeft{%
      \put(30mm,-25mm){\color{lightgray}\circle*{50}}
    }
  }
  \AddToShipoutPictureFG*{% on the foreground, only this page
    \AtTextUpperLeft{%
      \put(60mm,-25mm){\color{lightgray}\circle*{50}}
    }
  }

  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par
  This page and all the following have a frame around the
  text area. \par

  \vfill
  X \hfill X\newpage

  \section*{Second page}

  \AddToShipoutPictureBG*{%
    \AtTextCenter{%
      \makebox(0,0)[c]{\resizebox{\textwidth}{!}{%
        \rotatebox{45}{\textsf{\textbf{\color{lightgray}DRAFT}}}}}
    }
  }

  Only this page has rotated text in the center of the text area.

  \vfill
  X \hfill X\newpage

  \section*{Last page}

  \vfill
  X \hfill X

\end{document}