Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
2  
Please post your code/design here. –  Ahmed Musa Jun 16 '12 at 5:18
1  
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
1  
Perhaps the answers to this question can be also of interest for you. –  Thorsten Donig Jun 16 '12 at 12:06
add comment

2 Answers

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}
share|improve this answer
    
Thanks a lot :) –  tikzlearner Jun 16 '12 at 13:12
add comment

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.

share|improve this answer
    
Thanks a lot :) –  tikzlearner Jun 16 '12 at 13:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.