summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/eso-pic/eso-ex2.tex
blob: 2874ca477d0d874742b7f47b6fbedfd6f4cfda12 (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

% file `eso-ex2.tex'; an example for background pictures
% Rolf Niepraschk, 2005-12-25, Rolf.Niepraschk@ptb.de
\listfiles
\documentclass{article}

\usepackage{eso-pic}
\usepackage{graphicx}
\usepackage[dvips]{geometry}
% Tells `dvips' and `pdfTeX' the papersize.

% `rose.eps' from CTAN: macros/generic/boxedeps/
\newcommand\BackgroundPicture{%
   \put(0,0){%
     \parbox[b][\paperheight]{\paperwidth}{%
       \vfill
       \centering
       \includegraphics[width=\paperwidth,height=\paperheight,%
                        keepaspectratio]{rose}%
       \vfill
     }}}  
% The picture is centered on the page background

\AddToShipoutPicture{\BackgroundPicture}

\begin{document}

\section{\TeX}

\newpage

\ClearShipoutPicture
\section{Empty}

\newpage

\AddToShipoutPicture{\BackgroundPicture}
\section{\LaTeX}

\end{document}