Debian Codegraph @

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

raw
1
2 % file `eso-ex1.tex'; a framed background example
3
4 \documentclass[a4paper]{article}
5 \usepackage{eso-pic}
6 \listfiles
7
8 \newdimen\myLenA
9 \newdimen\myLenB
10 \newdimen\myLenC
11
12 \AddToShipoutPictureBG{%
13 \begingroup
14 \setlength\myLenA{15mm}%
15 \setlength\myLenB{\dimexpr\paperwidth-2\myLenA}%
16 \setlength\myLenC{\dimexpr\paperheight-2\myLenA}%
17 \thicklines%
18 \put(\myLenA,\myLenA){\framebox(\myLenB,\myLenC){}}%
19 \endgroup
20 }
21
22 \begin{document}
23
24 \section*{First page}
25
26 This page and all the following have a frame with 15~mm
27 distance from the paper edges.
28
29 \newpage
30
31 \section*{Second page}
32
33 \AddToShipoutPictureBG*{\put(100,100){\circle{40}}}
34
35 Only this page has a circle on the lower left side.
36
37 \newpage
38
39 \section*{Last page}
40
41 \end{document}