Rules / Build

File ended while scanning use of \textbf — Unclosed command argument

The argument of a command is never closed, so TeX read to the end of the paragraph or file.

Fix

Add the missing } after the argument.

Example

Reproduced on TeX Live 2026 by CI · pdflatex · corpus/unclosed-brace

Unclosed brace in a command argument

Fails: main.tex
\documentclass{article}
\begin{document}
This result is \textbf{statistically significant at the 5\% level.

The next paragraph continues the discussion.
\end{document}
Fixed
\documentclass{article}
\begin{document}
This result is \textbf{statistically significant} at the 5\% level.

The next paragraph continues the discussion.
\end{document}
What TeX prints in main.log
! File ended while scanning use of \textbf .
<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.

! Emergency stop.
<*> main.tex
…