4

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?

ipavlic
  • 4,906
  • 10
  • 40
  • 77

1 Answers1

3

Add information to header/footer either using fancyhdr Or KOMA Script

For adding a something on every page I used this:

\usepackage{eso-pic}
\makeatletter
\AddToShipoutPicture{%
    \setlength{\@tempdimb}{.1\paperwidth}%
    \setlength{\@tempdimc}{.04\paperheight}%
    \setlength{\unitlength}{1pt}%
    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
        \makebox(0,0){ \textcolor{gray}{Rev: \svnrev{} (\svnfilerev)} }%
    }%
}
\makeatother

Here, I add the SVN revision number on the bottom right of every page. I don't remember why I did not use a tikzpicture[overlay,remember picture] in \AddToShipoutPicture, maybe because it can't remember the picture position in the state of shipping out the page.

Hope that helps.

Faheem Mitha
  • 6,096
  • 7
  • 48
  • 83
Meinersbur
  • 7,881
  • 1
  • 27
  • 29
  • I have since used tex.stackexchange.com sister-site. Sorry for not accepting your answer sooner. – ipavlic May 31 '11 at 08:41