Possible Duplicate:
How can I avoid compiling twice?

I am shading first page using following code.

\begin{tikzpicture}[remember picture,overlay]
(current page.south) rectangle (current page.north east);
\end{tikzpicture}


But I found sometime shading is there on whole page and sometime it is partial (just one strip). I don't know what is reason behind it.How can I fix my problem?

## marked as duplicate by Tom Bombadil, percusse, Marco Daniel, clemens, lockstepSep 2 '12 at 12:50

• There is no problem. You need to compile twice when you use remember picture,overlay. The partial result arrives only on the first complation. – Alain Matthes Jul 3 '12 at 7:33
• Impossible, two compilations are necessary with the options remember picture,overlay. – Alain Matthes Jul 3 '12 at 7:38
• @manish: Just wait... This is where the fun begins. :-) There are cases where more than two compiles are required. You can use a make type program like latexmk so you don't have to think about it. – Peter Grill Jul 3 '12 at 7:42