Thursday, August 20, 2009

Solution to: File ended while scanning use of \@writefile

Recently came across this error in latex. This shows up every
time I try to compile the code after I first saw this error and
restarting my system or the latex editor did not help-

> Runaway argument?
> ! File ended while scanning use of \@writefile.
> \par
> l.110 \begin{document}

This error is seen typically because of an incomplete
entry in the aux file and can be removed by
deleting the file with .aux extension in the latex source.
To re-generate these aux files "latex" needs to be run.
Note - you have to run latex and not texify or any
other tool.

Good luck.


Anonymous said...

Thank you very much. This helps

Anonymous said...

Good advice, this helped me so much. I have been having the same problem. so decided to check out for solutions to that. Thank god I came accross the question and answer. Thanks to both of you.

Matthew Bożyk said...

Thank you very much. That helped. LaTeX compiler is not perfect in reporting bugs.

ricardomayerb said...

thank you so much!!! this helped a lot. By the way, running Pdflatex instead of latex after deleting the .aux file also works (this is what I just did)

Anonymous said...

Thank u, this helped me a lot!

Anonymous said...

THX for help :)

khalid said...

thanks from my side as well I was facing the same problem

Pgallert said...

Thanks a lot for this hint, it got me on the right track.

One addition: If the document is spread over several source files it might be necessary to delete the .aux of the master document as well.

Anonymous said...

Thank you very much. I deleted aux, bbl, blg, log and out files, and then recompiled latex. That worked.

Snehal said...

I was struggling for an hour. Thank you very much!!

Anonymous said...

Very useful :)!

Anonymous said...

I copied, recopied the tex file - with no solution. This was my last resort and it helped. Thanks a lot!

Anonymous said...

Thnx a lot ....saved a lot of trouble

Anonymous said...

Thankyou :)

Anonymous said...

Thank you! I thought I was going to have to copy-paste my thesis into a new file with a different name.
However, every time I have a new error, after I fix it, I get the same \@writefile error again. Is there a way to "permanently" fix it? Thanks!

Post a Comment