Paragraph ended before \<name> was complete.

A blank line (paragraph break) appeared inside an argument or maths environment that cannot contain one, often because a } or \end{…} is missing.

Help centre › LaTeX errors › Braces and environments · Error: the build stops or the output is wrong

What the log says

Runaway argument?
{sec:intro
! Paragraph ended before \label was complete.
<to be read again>
                   \par
l.4 

What it means

The command named in the message reads an argument that may not contain a paragraph break (a blank line or \par), and it met one before the argument ended. Either the closing } is missing, so the argument ran on into the next paragraph, or there really is a blank line inside something that does not allow it, such as an align or split environment.

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 closing brace is missing in a short argument

\label, \ref, \cite, \url and similar commands take one-line arguments. Add the missing }; the text after Runaway argument? shows where the argument started.

Fails
\documentclass{article}
\begin{document}
\section{Introduction}\label{sec:intro

Our first result.
\end{document}
Fixed
\documentclass{article}
\begin{document}
\section{Introduction}\label{sec:intro}

Our first result.
\end{document}

2. A blank line inside align, split, gather or multline

These amsmath environments read their whole body as one argument, and a blank line ends it early: the message names \align, \split, \gather or \multline. Remove the empty line, or put % on it.

Fails
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
a &= b + c \\

d &= e
\end{align}
\end{document}
Fixed
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
a &= b + c \\
d &= e
\end{align}
\end{document}

3. An environment opened inside the equation is never closed

If \begin{split} (or aligned, cases) has no \end{split}, its body runs on: to the next blank line, which gives this message, or to \end{equation}, which gives \begin{split} … ended by \end{equation}. Add the missing \end{…} before the end of the equation.

4. A section title with a blank line in it

A heading whose } comes after a blank line (a title closed too late, or one missing its } with a later stray }) runs into the next paragraph; the message then names an internal command such as \@sect. Close the title on the same line. If no } follows at all, TeX reads on to the end of the file and reports File ended while scanning use of … instead.

Fails
\documentclass{article}
\begin{document}
\section{Introduction

Our first result.}
\end{document}
Fixed
\documentclass{article}
\begin{document}
\section{Introduction}

Our first result.
\end{document}

Finding the line when the line number does not help

In Manulyx

The editor shows the error beside the line with an explanation; when an environment inside an equation is not closed, it marks the unclosed \begin in the gutter.

Write in Manulyx for free · Journal templates

More in braces and environments

Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors