# How to use complete width of page in tikz?

I have drawn an figure which almost takes 80% of width of the page. So I want it to give full width. If I try it manually, I get warning as overfull \hbox.

-
Please post your code/design here. –  Ahmed Musa Jun 16 '12 at 5:18
The problem is a tex' problem. You want to put a big box (picture) inside a smaller box (text). Tikz can help you with \begin{tikzpicture}[remember picture, overlay] . –  Alain Matthes Jun 16 '12 at 6:04
Perhaps the answers to this question can be also of interest for you. –  Thorsten Donig Jun 16 '12 at 12:06

try this

\documentclass{article}
\usepackage{tikz}
\begin{document}
\thispagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]

\draw[fill=green] (current page.north west) rectangle (current page.south east);
\end{tikzpicture}
\end{document}

-
Thanks a lot :) –  tikzlearner Jun 16 '12 at 13:12

Assuming that you have a figure drawn using tikz, you may use the full width by \resizebox provided by graphicx.

\documentclass[11pt]{article}

\usepackage{graphicx}

\begin{document}
%=========================
\begin{figure}[htb]
\centering{
\resizebox{\textwidth}{!}{\input{figurefile.tex}}} %% assuming figurefile is a tikz code
\caption{caption goes here} \label{fig:myfigure}
\end{figure}
%===========================
\end{document}


This can also be done using adjustbox package by Martin Scharrer. Actually adjustbox offers more functionalities for things like these.

-
Thanks a lot :) –  tikzlearner Jun 16 '12 at 13:12