Purplelink
← All LaTeX errors

Runaway argument

TeX was reading the argument of a command and ran out of file or paragraph before it found the closing brace.

What it means

TeX was collecting the argument of a command, the part between { and }, and reached a place where the argument could not continue: the end of the file, or a blank line for commands that do not accept paragraphs. Runaway argument? is the first of a pair of lines. The second, which begins with !, says what stopped it. In nearly every case a closing brace is missing.

The log line

This small file triggers the error:

\documentclass{article}
\begin{document}
\section{Related work

Prior studies report mixed results.
\end{document}

Compiled with pdfLaTeX (TeX Live 2026), it writes this to the .log file:

Runaway argument?
{Related work \par Prior studies report mixed results. \end {document\ETC.
! File ended while scanning use of \@xdblarg.
<inserted text>
                \par
<*> main.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

The line under Runaway argument? shows what TeX had swallowed so far, starting at the opening brace: {Related work and then the rest of the file. That first brace is the one that was never closed. \ETC. means the display was cut short. The ! line names the macro that was reading. \@xdblarg is an internal helper behind \section, so the name does not always match what you typed. There is no l. line, because TeX reached the end of the file before it noticed anything wrong.

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 missing closing brace

The argument of \section, \footnote, \caption or a similar command was opened and never closed. TeX reads on to the end of the file.

Before

Wages rose\footnote{See Appendix B for the sample.
The effect persists.

After

Wages rose\footnote{See Appendix B for the sample.}
The effect persists.

2. A blank line inside a short argument

Commands such as \date, \label and \cite stop at the first blank line. The second log line then reads Paragraph ended before \date was complete, which has its own page.

Before

\date{October 2026

\maketitle

After

\date{October 2026}

\maketitle

3. A % comment hides the closing brace

Everything after % on a line is ignored, including a brace. A note added at the end of a line can remove the brace that closed the argument.

Before

The effect is \textbf{significant % check this}
in all samples.

After

The effect is \textbf{significant} % check this
in all samples.

4. A truncated .aux, .toc or .bbl file

When a build is interrupted, the auxiliary files can end in the middle of a line. On the next run TeX reads the broken file first and reports a runaway argument whose text you never typed, such as {{1}{1}. Delete the auxiliary files and compile twice.

Before

% main.aux ends in the middle of an entry:
\newlabel{sec:data}{{1}{1}

After (in a terminal)

rm main.aux main.toc main.out
pdflatex main.tex

5. An optional argument that is never closed

Square brackets are delimiters too. An \item[ without its ] makes TeX read on in search of the closing bracket.

Before

\begin{description}
\item[Sample size The number of firms.

After

\begin{description}
\item[Sample size] The number of firms.

How to find the line

Read the swallowed text, not the line number. Its first few words show where the argument began, so search the source for them. When the second line is File ended while scanning use of ..., there is no line number at all. When it is Paragraph ended before ... was complete, the l. line points at the blank line where TeX gave up, and the unclosed brace is above it.

When you run pdflatex in a terminal without -interaction=nonstopmode, TeX stops at the error and prints a ? prompt. Press Return to carry on past the error, type x to quit, or type h for TeX's own help text, which is the paragraph you see after the l. line in the log. Editors run TeX in non-stop mode, so you get the log and never see the prompt.

What each editor shows:

Related errors

Frequently asked questions

What does \ETC. mean in a Runaway argument message?
TeX prints only the start of the text it had collected as the argument and ends it with \ETC. to show that it was cut off. The words before \ETC. come from your file, so search for them to find where the argument started.
Why does the error name a command I never typed, like \@xdblarg?
Commands such as \section pass their argument to internal helper macros. The error names the helper that was reading when the file or the paragraph ended. Use the text printed under Runaway argument? to find the place.
The Runaway argument text comes from my .aux or .toc file. How do I fix it?
An earlier build stopped part of the way through and left a truncated auxiliary file. Delete the .aux, .toc, .lof, .lot and .out files next to your main file and compile twice. They are rebuilt from your source.