| 1 |
%% |
| 2 |
%% To make a cover page, put an image covering the whole page |
| 3 |
%% |
| 4 |
\newdimen\cover@voff |
| 5 |
\newdimen\cover@hoff |
| 6 |
|
| 7 |
\def\putoncover#1{% |
| 8 |
\newpage\thispagestyle{empty}% |
| 9 |
\sbox{\z@}{#1}% |
| 10 |
% Compute the top left position of the page from current location |
| 11 |
\setlength{\cover@voff}{-\voffset-\headheight-\headsep-\topmargin-\topskip-1in}% |
| 12 |
\setlength{\cover@hoff}{\hoffset+1in}% |
| 13 |
\ifodd\c@page% |
| 14 |
\advance\cover@hoff\oddsidemargin% |
| 15 |
\else% |
| 16 |
\advance\cover@hoff\evensidemargin% |
| 17 |
\fi% |
| 18 |
\setlength{\unitlength}{1pt}% In the case it has been changed |
| 19 |
\noindent\begin{picture}(0,0)(\strip@pt\cover@hoff,\strip@pt\cover@voff) |
| 20 |
\put(0,-\strip@pt\paperheight){% |
| 21 |
\makebox(\strip@pt\paperwidth,\strip@pt\paperheight){\usebox{\z@}}} |
| 22 |
\end{picture}% |
| 23 |
} |
| 24 |
|
| 25 |
\def\putcovergraphic#1{% |
| 26 |
\putoncover{\includegraphics[width=\paperwidth, |
| 27 |
height=\paperheight, |
| 28 |
keepaspectratio=true]{#1}}% |
| 29 |
} |
| 30 |
|