I have been attempting to use \AtBeginShipout
and tikz
to draw header and footer art as suggested in solution for creating newsletter art by user Gonzalo Medina.
One problem that has been encounter is that an extra page containing only the artwork is always produced at the end of the document. In the example below I expect two pages of output, but there are three. Why is this? What is the best way to prevent it?
Example using \AtBeginShipout
with \tikzpicture
produces an extra page:
\documentclass{article}
\usepackage{tikz}
\usepackage{atbegshi}
\usepackage{lipsum}
\newcommand\DrawSquare{
\begin{tikzpicture}[overlay]
\draw[fill=pink]
(0,0) rectangle (10,-10);
\end{tikzpicture}
}
\AtBeginShipout{\DrawSquare}
\begin{document}
\lipsum[1-9]
\end{document}
Thumbnail of Output: