Debian Codegraph @

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

raw
1
2 % file `eso-ex5.tex'; background grid example
3
4 \listfiles\setcounter{errorcontextlines}{100}
5 \documentclass[a4paper,twoside]{article}
6 % a4paper = 210mm x 297mm = 596bp x 842bp = 8.27in x 11.69in
7 % letterpaper = 215.9mm x 279.4mm = 612bp x 792bp = 8.5in x 11in
8
9 %\usepackage[a3,center]{crop}
10
11 \usepackage[dvips]{geometry}
12 % `dvips', `pdfTeX' and `VTeX' should know the papersize.
13
14 \usepackage[colorgrid,gridBG=true,gridunit=mm,texcoord]{eso-pic}
15 %\usepackage[colorgrid,gridunit=in,subgridcolor=blue,texcoord]{eso-pic}
16 %\usepackage[grid,gridunit=bp,subgridstyle=dotted]{eso-pic}
17
18 \newcommand*\cmd[1]{\texttt{\symbol{`\\}#1}}
19
20 \AddToShipoutPictureBG{%
21 \thicklines\normalfont\ttfamily\Large%
22 \color{blue}\setlength\unitlength{1mm}%
23 \AtTextCenter{\circle*{6}%
24 \put(-2,0){\makebox(0,0)[lb]{\cmd{AtTextCenter}}}}%
25 \AtTextUpperLeft{\circle*{6}%
26 \put(-2,5){\makebox(0,0)[lt]{\cmd{AtTextUpperLeft}}}}%
27 \AtTextLowerLeft{\circle*{6}%
28 \put(-2,-5){\makebox(0,0)[lb]{\cmd{AtTextLowerLeft}}}}%
29 \color{red}%
30 \AtPageCenter{\circle*{6}%
31 \put(-2,0){\makebox(0,0)[lt]{\cmd{AtPageCenter}}}}%
32 \AtPageUpperLeft{\circle*{6}%
33 \put(-2,-5){\makebox(0,0)[lb]{\cmd{AtPageUpperLeft}}}}%
34 \AtPageLowerLeft{\circle*{6}%
35 \put(-2,5){\makebox(0,0)[lt]{\cmd{AtPageLowerLeft}}}}%
36 }
37
38 \setlength\parindent{0pt}
39
40 \begin{document} \Huge \bfseries
41
42 \hrulefill First Page\hrulefill \vfill X \hfill X \newpage
43 \hrulefill Second Page\hrulefill \vfill X \hfill X
44
45 \end{document}