Overfull \hbox (<n>pt too wide) in paragraph at lines <a>--<b>
A line sticks out into the margin because TeX found no acceptable place to break it: a long URL or word, or an image or equation wider than the column.
Help centre › LaTeX errors › Floats and layout · Warning: the document still compiles
What the log says
Overfull \hbox (32.4787pt too wide) in paragraph at lines 5--7
[]\OT1/cmr/m/n/10 The data are avail-able at \OT1/cmtt/m/n/10 https://data.ex
ample.org/archive/2026/measurements/full-set|
[]Also printed as: Overfull \hbox (<n>pt too wide) detected at line <n>
What it means
TeX could not break the paragraph so that every line fits the text width, and one line runs into the right margin by the amount shown. The document still compiles. A few points is barely visible, but anything larger shows as text in the margin or in the gutter between columns, which journal production will flag. Draft mode (\documentclass[draft]{article}) marks each overfull line with a black bar.
Causes and fixes
Most common first. Each example is a complete document; the first fails with this message, the second is the same document fixed.
1. A URL, file name or code word that has no break points
TeX hyphenates ordinary words but not URLs or long identifiers. Typeset URLs with \url{…}; with \usepackage{xurl} they may break after any character. For other long words, allow breaks with \- or \allowbreak.
\documentclass{article}
\begin{document}
The data and analysis scripts are available at \texttt{https://data.example.org/archive/2026/measurements/full-set}, together with a description.
\end{document}\documentclass{article}
\usepackage{xurl}
\begin{document}
The data and analysis scripts are available at \url{https://data.example.org/archive/2026/measurements/full-set}, together with a description.
\end{document}2. An image or box wider than the text column
Size figures relative to the column, \includegraphics[width=\linewidth]{…}, rather than in fixed units or with scale=. In two-column layouts \linewidth is the column, not the page.
\documentclass{article}
\begin{document}
\begin{figure}[h]
\centering
\rule{1.15\textwidth}{3cm}% stands in for \includegraphics[width=1.15\textwidth]{plot}
\caption{Results}
\end{figure}
\end{document}\documentclass{article}
\begin{document}
\begin{figure}[h]
\centering
\rule{\linewidth}{3cm}% stands in for \includegraphics[width=\linewidth]{plot}
\caption{Results}
\end{figure}
\end{document}3. A displayed equation wider than the column
TeX does not break displayed equations. Split it over lines with multline, or align / split from amsmath, breaking before a + or = sign. The log then says "detected at line" instead of "in paragraph".
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 + a_5 x^5 + a_6 x^6 + a_7 x^7 + a_8 x^8 + a_9 x^9 + a_{10} x^{10} + a_{11} x^{11} + a_{12} x^{12}
\end{equation}
\end{document}\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}
f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 + a_5 x^5 + a_6 x^6 \\
+ a_7 x^7 + a_8 x^8 + a_9 x^9 + a_{10} x^{10} + a_{11} x^{11} + a_{12} x^{12}
\end{multline}
\end{document}4. A table wider than the column
Let long text wrap in p{…} columns or a tabularx table set to \linewidth, reduce the column padding with \setlength{\tabcolsep}{4pt}, or use a smaller font inside the table.
5. Words that pdfTeX will not hyphenate in a narrow column
pdfTeX does not hyphenate a word that already contains a hyphen, and needs to know the language of the text. Load babel with the right language, add \hyphenation{elec-tro-en-ceph-a-lo-gram} for problem words, or load \usepackage{microtype}, which gives the line breaker more room.
Finding the line when the line number does not help
- The log names the input lines ("at lines 5--7") and prints the start of the offending line; the text just before the | is what overflows.
In Manulyx
The editor lists overfull boxes as warnings beside the lines they come from, so they do not stop the PDF but stay visible before submission.
Write in Manulyx for free · Journal templates
More in floats and layout
- LaTeX Error: There's no line here to endA line break (\\ or \newline) comes where no line has started, typically after a blank line. Use \vspace or \medskip for vertical space.
- LaTeX Error: Not in outer par modeA figure, table or \marginpar is inside a box, minipage, table cell or another float. Floats must be in the main text; put the box inside the float.
- LaTeX Error: Too many unprocessed floatsFigures and tables are queued faster than LaTeX can place them, often behind one that cannot be placed. Relax placements, shrink it, or add \clearpage.
- LaTeX Error: Float(s) lostA figure or table sits inside a footnote, a framed box or a similar construct LaTeX cannot place floats from, and it disappears. Move it into the text.
- Dimension too large.A length went past TeX's limit of about 16383pt (5.75 m). Usually a TikZ plot with large coordinates or a scale factor gone wrong.
- LaTeX Error: \caption outside float.\caption is used outside a figure or table environment. Wrap the content in figure or table, or use \captionof from the caption package.
Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors