1

I have a serious problem with my latex file. I was working on my article, when suddenly all the work I made disappeared after running the document. I have to submit the article in one week. In the error line, only one error appeared:

File ended while scanning use of \textbf, but it didn't show in which line the problem is located.

Does someone know what to do and where can I find my work?

Thank you.

1
  • Do please tell us more about your computing setup. E.g., which operating system, which TeX distribution, and which editor do you employ?
    – Mico
    Jul 25, 2023 at 12:10

1 Answer 1

4

TeX never edits or changes your source file in any way, so any changes in your source (and any backups) are a feature of your editor (that you have not named).

The error means you have a missing }.

You should be able to detect the error from the log. There is no line number as the error is detected as the file ended, but for example

\documentclass{article}

\begin{document}
000

\clearpage

111
\clearpage

aaa

\textbf{bbb

ccc

\end{document}

Produces

] [2])
Runaway argument?
{bbb \par ccc \par \end {document} 
! File ended while scanning use of \textbf .
<inserted text> 
                \par 
<*> dd937
         
? 

so here the [2] tells you it had just shipped out page 2 and then an argument starting bbb was never closed. From which you should be able to find \textbf{bbb fairly easily.

1
  • Thank you very much for your help!
    – Alezigl
    Jul 25, 2023 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .