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.

Fails
\documentclass{article}
\begin{document}
This is \textbf{very} important}.
\end{document}
Fixed
\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.

Fails
\documentclass{article}
\begin{document}
$x^{2}}$ is positive.
\end{document}
Fixed
\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.

Fails
\documentclass{article}
\usepackage{amssymb}
\newcommand{\R}{\mathbb{R}}}
\begin{document}
Let $x \in \R$.
\end{document}
Fixed
\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$}.

Fails
\documentclass{article}
\begin{document}
\fbox{$x}$
\end{document}
Fixed
\documentclass{article}
\begin{document}
\fbox{$x$}
\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, and the compile log is parsed into a list of problems.

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