Common Errors
How to Fix Overfull Hbox Warnings in LaTeX
Overfull hbox warnings mean text is sticking into the margin. While often harmless, they can affect document appearance.
Understanding the Warning
What the warning means:
Overfull \hbox (15.2pt too wide) in paragraph at lines 42--45
% Text extends 15.2pt past the margin
Underfull \hbox (badness 10000) in paragraph at lines 56--58
% LaTeX couldn't fill the line properlyQuick Fixes
Common solutions:
% Allow more flexible word spacing:
\sloppy
% Or use microtype for better typography:
\usepackage{microtype}
% For specific paragraphs:
\begin{sloppypar}
Your troublesome paragraph here...
\end{sloppypar}For Long Words/URLs
Break long words or URLs:
% Allow hyphenation hint:
super\-cali\-fragilistic
% For URLs:
\usepackage[hyphens]{url}
\url{https://example.com/very-long-path}
% Or use \linebreak:
Long text here \linebreak
continues on next line💡 Tips
- •Black boxes appear in draft mode to highlight overfull lines
- •microtype package often eliminates most overfull warnings
- •A few small overfulls (< 1pt) are usually acceptable
Try This in Bibby AI
Write LaTeX faster with AI auto-complete and instant compilation.
Start Writing Free