What it means
TeX could not break a paragraph into lines without letting one of them stick out past the right margin. An hbox is a horizontal box, in this case one line of text. Overfull means its contents are wider than the space allowed, by the amount given in points (72.27 pt make one inch). It is a warning: the PDF is produced, with that line running into the margin. An overshoot of a fraction of a point cannot be seen. Larger ones should be fixed before you submit.
The log line
This small file triggers the warning:
\documentclass{article}
\begin{document}
The replication files are available from the project repository at
\texttt{https://example.org/research/replication-archive/2026/final-dataset-v2.tar.gz}
for anyone who wants to rerun the analysis.
\end{document}
Compiled with pdfLaTeX (TeX Live 2026), it writes this to the .log file:
Overfull \hbox (345.63582pt too wide) in paragraph at lines 3--6
[]\OT1/cmr/m/n/10 The repli-ca-tion files are avail-able from the project repos-i-tory at \OT1/cmtt/m/n/10 https://example.org/research/replication-archive/2026/final-dataset-v2.tar.gz
[]
345.63582pt too wide is how far the line sticks out, here almost five inches, because TeX will not break the monospaced URL anywhere. in paragraph at lines 3--6 gives the source lines of the whole paragraph, not of the bad line alone. The next line prints the content of the offending line, with font names such as \OT1/cmr/m/n/10 and the possible hyphenation points marked by hyphens. Whatever is at the end of that text is what went into the margin.
To try a fix without touching your project, save the example as a .tex file and compile it online with the LaTeX to PDF tool.
Why it happens
The causes below are in order of likelihood. Each has a before and an after you can compare with your own source.
1. A long URL or path
Text in \texttt is never hyphenated. Put addresses in \url{...}, which allows breaks at slashes and dots. In the example above that still left the line 8pt too wide. Loading xurl, which lets a URL break after any character, removed the warning.
Before
\texttt{https://example.org/research/replication-archive/2026/final-dataset-v2.tar.gz}
After
\usepackage{xurl} % in the preamble
\url{https://example.org/research/replication-archive/2026/final-dataset-v2.tar.gz}
2. A table wider than the text block
l, c and r columns never wrap, so long cells push the table past the margin. Give the long columns a fixed width with p{...}, or use tabularx with X columns.
Before
\begin{tabular}{lll}
Baseline & Wikipedia and newswire articles collected before 2020 & Reported by the original authors on the public test split \\
After
\begin{tabular}{lp{4.5cm}p{5cm}}
Baseline & Wikipedia and newswire articles collected before 2020 & Reported by the original authors on the public test split \\
3. A figure wider than the text block
\includegraphics uses the natural size of the image unless told otherwise. Scale it to the line width.
Before
\includegraphics{wide-chart.pdf}
After
\includegraphics[width=\linewidth]{wide-chart.pdf}
4. A word TeX cannot hyphenate
Code identifiers, words in \texttt and anything inside \mbox cannot be split. If such a word lands at the end of a line, TeX has to choose between a very loose line and an overfull one, and by default it picks overfull. Setting \emergencystretch lets it choose the loose line. Rewording the sentence so the word falls elsewhere works too.
Before
We split the sample by firm and pass each fold to the function
\texttt{StratifiedGroupKFoldCrossValidator} before fitting the model.
After
\emergencystretch=3em % in the preamble
\texttt{StratifiedGroupKFoldCrossValidator} before fitting the model.
How to find the line
There is no l. marker and no ? prompt for a warning. The log gives the line range of the paragraph and prints the text of the bad line. To see it on the page, add the draft class option, as in \documentclass[draft]{article}. LaTeX then prints a black bar in the margin next to every overfull line. With graphicx loaded, the same option replaces figures by empty frames, so remove it again afterwards.
Because this is a warning, TeX does not stop for it even in a terminal run. The message scrolls past and the only record is the .log file, so search that file for a word from the message, such as Overfull or undefined.
What each editor shows:
- ModernTex: the Build Results panel lists warnings and notes as well as errors, in plain language, and Raw Log shows the full LaTeX log. See ModernTex.
- Overleaf: the logs panel, opened with the button next to Recompile, lists each error and warning with its file and line, and the editor marks the line in the gutter. The unprocessed log is at the bottom of that panel.
- TeXShop: the build does not stop for a warning. Scroll the console window, or open the
.logfile next to your source, and search for a word from the message, such asOverfullorundefined.
Related errors
- Extra alignment tab has been changed to \cr: when the table does not compile at all.
- Missing $ inserted: underscores in the same file names and identifiers that cause overfull lines.
- Citation `x' undefined: the other warning worth clearing before submission.