LaTeX warning "Overfull \hbox (263.664pt too wide) in paragraph at lines 3--6": cause and fix

Warning Overfull \hbox (263.664pt too wide) in paragraph at lines 3--6

A line is wider than the text block and sticks out into the right margin by the stated amount. TeX found no place to break the line without stretching or squeezing the spaces more than it may. It is a warning; the PDF is still written. With the class option draft, LaTeX marks each such line with a black bar.

Why it happens

How to fix it

A document that produces the message

\documentclass{article}
\begin{document}
The data set and all scripts are available for download at
\texttt{https://www.example.org/projects/thesis/data/measurements-2024.html}
and may be reused.
\end{document}

Open in the editor

The corrected document

\documentclass{article}
\usepackage{url}
\begin{document}
The data set and all scripts are available for download at
\url{https://www.example.org/projects/thesis/data/measurements-2024.html}
and may be reused.
\end{document}

Open in the editor

Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.

Finding the line in the editor

The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.

Related pages