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.
Asked
Active
Viewed 7,856 times
12
2 Answers
13
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}
rpapa
- 12,350
8
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.
\begin{tikzpicture}[remember picture, overlay]. – Alain Matthes Jun 16 '12 at 06:04