Graphics, Figures & TablesFigure causes "Overfull \hbox"

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Figure causes "Overfull \hbox"

Post by Singularity »

Hi. I am including three figures which are not very wide in my document. The code works - that is, it includes the pics, more or less where I want them to be - but I keep getting the following "bad box" warnings:
) <../Lectures/FPU/Code/fpuN=16beta=4.png, id=1, 422.32782pt x 316.18124pt>
File: ../Lectures/FPU/Code/fpuN=16beta=4.png Graphic file (type png)

<use ../Lectures/FPU/Code/fpuN=16beta=4.png>
Package pdftex.def Info: ../Lectures/FPU/Code/fpuN=16beta=4.png used on input l
ine 8.
(pdftex.def) Requested size: 422.32678pt x 316.18047pt.

Overfull \hbox (32.32678pt too wide) in paragraph at lines 8--9
[][]
[]
Here's my MWE:

Code: Select all

\documentclass[12pt,fleqn,reqno]{article}
%fleqn: left align equations
%reqno: equation numbers on right
\usepackage{amsmath,amssymb,amsthm}
\usepackage{amsfonts,graphics,epsfig,cite}
\begin{document}
\begin{figure}[hbt]
	\includegraphics{../Lectures/FPU/Code/fpuN=16beta=4}
	\caption{The FPU recurrence with $\beta=4$.}
	\label{fig:fpuN=16}
\end{figure}
\end{document}
Why am I getting a "too wide" box? How do I fix it?
I've also attached one of the images.
TIA.
Attachments
MWE.log
The whole log file
(8.69 KiB) Downloaded 260 times
The image
The image
fpuN=16beta=4.png (7.92 KiB) Viewed 21709 times
Last edited by Singularity on Fri Oct 28, 2011 9:24 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figure causes "Overfull \hbox"

Post by localghost »

Singularity wrote:[…] Why am I getting a "too wide" box? How do I fix it? […]
The included image is just too wide for your text body. I see two possible remedies.
  • scale the figure down (recommended to three quarter of its original size).
  • set up another type area with reduced margins thus increased text width.


Thorsten
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Figure causes "Overfull \hbox"

Post by Singularity »

localghost wrote:
Singularity wrote:[…] Why am I getting a "too wide" box? How do I fix it? […]
The included image is just too wide for your text body. I see two possible remedies.
  • scale the figure down (recommended to three quarter of its original size).
  • set up another type area with reduced margins thus increased text width.
Thorsten
Really? It doesn't look too wide. I could shrink it a bit without loss of information.

I don't know how to setup a type area. If I do that, would it affect the hardcopy printout? This is for my thesis and my school has strict guidelines regarding who it should print.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Figure causes "Overfull \hbox"

Post by localghost »

Singularity wrote:[…] Really? It doesn't look too wide. I could shrink it a bit without loss of information. […]
I can tell you for sure without testing your example. But you could check that by setting the »draft« option temporarily for the document class. There should appear a black rule in the margin wherever there is an overfull horizontal box. Three quarters are recommended because of the relation between postscript point (big point) and pixel. Your picture then would appear in the document like you would see on the screen in a picture viewer.
Singularity wrote:[…] I don't know how to setup a type area. If I do that, would it affect the hardcopy printout? This is for my thesis and my school has strict guidelines regarding who it should print.
If you are bounded to certain demands then changing the type area is out of the race. The type area in standard classes is usually set up by the geometry package. Other classes like those from KOMA Script or the memoir class have built-in mechanisms.
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Figure causes "Overfull \hbox"

Post by Singularity »

localghost wrote:I can tell you for sure without testing your example. But you could check that by setting the »draft« option temporarily for the document class. There should appear a black rule in the margin wherever there is an overfull horizontal box. Three quarters are recommended because of the relation between postscript point (big point) and pixel. Your picture then would appear in the document like you would see on the screen in a picture viewer.
Draft mode did as you said, but didn't tell me anything new (that you guys hadn't already told me). I will resize them.
Thanks for the useful replies.
Singularity
Posts: 156
Joined: Sat Jan 22, 2011 9:55 pm

Re: Figure causes "Overfull \hbox"

Post by Singularity »

Is there anything in the log file which might indicate how much I have to shrink the images? In order to save me having to do trial and error to get the size right.
Thanks.
Post Reply