# Tikzpicture on every page

How can I include a tikzpicture on every page?

I would like to create a complicated document template (page should be framed, and have a table to hold document information both in the header and footer).

I was thinking of using something like:

\begin{tikzpicture}[remember picture,overlay]
% complicated layout should be here, simple example is given below:
% \node [xshift=1cm,yshift=1cm] at (current page.south west)
% {This is an absolutely positioned text in the page};
\end{tikzpicture}


Do you have any other suggestions on how to create such a template?

-

What I usually do in LaTeX is setting up a header and place the TikZ code which should appear on every page in the header. If you do not want to display a header, you can anyway use this pattern and leave all other header fields empty. And if you are already using a header you can place this code to an arbitrary cell since it is using the overlay option.

-

everyshi is an alternative to everypage. I suppose the bophook package and your TikZ overlay snippet will also work.

To save some compile time you should probably save your tikzpicture to a \savebox (reference) and do a \usebox on every page, though.

-

I assume, from the \begin...\end you use in your example, that you are using LaTeX. ConTeXt has it's own builtin way of handling this.

You can use something like you give in your example together with the everypage package, which would take care of placing the material on each page.

If your "page template" is more complicated, I suggest you take a look at the flowfram package. You can achieve fairly complicated things with that.

-

I would look into the TikZ cousin pgffor commands, they allow a better looping construct than LaTeX typically employs. That said I don't know if looping over pages is something it can do. In that case maybe Rupert is correct and putting this in the header is good for you.

-
Looping over pages is not something it can do, because TeX's processing system "ships out" each page and forgets about it. –  Matthew Leingang Nov 5 '10 at 18:25