Extra }, or forgotten $.
A closing brace } has no matching {. Count the braces on the reported line, or look for a $ that closes maths inside a {…} group.
Help centre › LaTeX errors › Braces and environments · Error: the build stops or the output is wrong
What the log says
! Too many }'s.
l.3 This is \textbf{very} important}
.Also printed as: Too many }'s.; Extra }, or forgotten \endgroup.
What it means
TeX found a } that does not close any {. The three messages say where it happened: Extra }, or forgotten $ inside maths, Extra }, or forgotten \endgroup inside some environments and boxes, and Too many }'s in ordinary text or the preamble, where no group is open. TeX ignores the extra brace, so the output is often fine, but an earlier { may be missing and something may be bold or italic for longer than you meant.
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. One closing brace too many
Count the braces on the line the log shows: each { needs exactly one }. Editors that highlight the matching brace make this quick. If the extra } is a stray, delete it; if it was meant to close something, the matching { is missing.
\documentclass{article}
\begin{document}
This is \textbf{very} important}.
\end{document}\documentclass{article}
\begin{document}
This is \textbf{very important}.
\end{document}2. A brace too many inside maths
In a formula such as x^{2}} or \frac{a}{b}} the stray brace triggers the forgotten $ variant. Remove it, or add the missing { where a group was meant to start.
\documentclass{article}
\begin{document}
$x^{2}}$ is positive.
\end{document}\documentclass{article}
\begin{document}
$x^{2}$ is positive.
\end{document}3. An extra brace in a preamble definition
A \newcommand with one } too many leaves a stray brace in the preamble, where no group is open, and TeX says Too many }'s. Check the definition on the reported line.
\documentclass{article}
\usepackage{amssymb}
\newcommand{\R}{\mathbb{R}}}
\begin{document}
Let $x \in \R$.
\end{document}\documentclass{article}
\usepackage{amssymb}
\newcommand{\R}{\mathbb{R}}
\begin{document}
Let $x \in \R$.
\end{document}4. A $ inside a braced argument closes maths too early
Inline maths must open and close inside the same group: \fbox{$x}$ closes the box while maths is still open. Put both $ signs inside the braces: \fbox{$x$}.
\documentclass{article}
\begin{document}
\fbox{$x}$
\end{document}\documentclass{article}
\begin{document}
\fbox{$x$}
\end{document}Finding the line when the line number does not help
- The
l.<n>line breaks right after the extra}. - If the line looks balanced, the missing
{is earlier: an argument that was never opened, or a\verbor%that hid one of the braces.
In Manulyx
The editor shows the error beside the line with an explanation, and the compile log is parsed into a list of problems.
Write in Manulyx for free · Journal templates
More in braces and environments
- 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.
- LaTeX Error: \begin{<a>} on input line <n> ended by \end{<b>}An environment is closed by the wrong \end: a misspelled \end, environments closed in the wrong order, or a missing \end{…} further up.
Every example on this page was compiled with pdfLaTeX to check that it fails and is fixed as described. All LaTeX errors