GeneralBad box errors

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Bad box errors

Post by Mini »

Hello,

I've been playing around with Latex and I am getting 2 bad box errors when I build the document. I've read and researched this, and although it doesn't seem to be that significant I am a perfectionist and would like to ensure no errors.

Could someone please point why I'm getting this error? I hope this isn't too basic.

My code:

Code: Select all

\documentclass[fleqn]{article}
\usepackage{polynom}
\usepackage{amsmath}
\begin{document}
This equation \\
\begin{eqnarray*}
 y &=& \frac{2}{x-2} \\
&=& \frac{2}{x-2}
\end{eqnarray*} \\
\polylongdiv{x^2+2x+1}{x-1} \\
\[
\binom{m}{n} \]
\end{document}
and log file is attached.
Attachments
LaTeX1.log
(4.97 KiB) Downloaded 345 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Bad box errors

Post by gmedina »

Hi,

if you use \\ to increase the vertical spacing between paragraphs, you will get bad boxes (some white space will be forced to stretch beyond its natural limit). Use \medskip or \bigskip instead:

Code: Select all

\documentclass[fleqn]{article}
\usepackage{polynom}
\usepackage{amsmath}

\begin{document}

This equation \bigskip
\begin{align*}
  y &= \frac{2}{x-2} \\
  &= \frac{2}{x-2}
\end{align*}
\polylongdiv{x^2+2x+1}{x-1} \bigskip
\[ \binom{m}{n} \]

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Mini
Posts: 73
Joined: Thu Aug 06, 2009 12:46 pm

Re: Bad box errors

Post by Mini »

Umm, I'm using '\\' for a new line, not for increasing vertical space between lines/paragraphs. Did I do something wrong in my code?

EDIT: I think I know what I did wrong. The '\begin{eqnarray}' ; '\polylongdiv' and '\binom' all already start on a new line. So if I insert new lines before or after it'll yield this error?
Post Reply