Monday, October 12, 2009

Latex: file ended while scanning use of @writefile

This error is typically seen a lot while compiling latex on windows.
This can be eliminated by deleting all .aux files and recompiling
the latex code. Recompilation should begin by running "Latex" before
any other tool, this helps re-generation of the .aux files.

Ensure that after deleting the .aux file, you also remove the
error that was causing a compilation failure before re-compiling
using latex. Errors could be as simple as missing $$ signs for math
operators.

This also works for the following error:
Runaway argument?
! File ended while scanning use of \HyPL@Entry.

                \par
l.38 \begin{document}

67 comments:

Anonymous said...

Thank you so much! This has been driving me crazy and deleting the aux file got rid of the problem. BTW, I'm using a Mac.

Anonymous said...

This has been driving me nuts too, and deleting the aux file allowed it to recompile. Thank you!!!

Anonymous said...

Thank you very much this post. I have wasted much time in finding my mistake. But solution is very effective.

Anonymous said...

Same here searched an hour for this error >.< thanks alot

Anonymous said...

thx here too!

Anonymous said...

whew, same. using a mac.

Anonymous said...

same here (texshop, mac). thanks!

Anonymous said...

like others here im using a mac but i deleted the aux file and the error remains =/

misfit said...

Did you try running latex after restarting the editor? It has worked for ppl using mac too. What is the exact error?

ikalfanis said...

i get this error and it's driving me crazy
! File ended while scanning use of \ttl@format@ii.

i did what you wrote in ur blog but it didn't work

Anonymous said...

Check you don't have a wrong \end{document}

I was doing \include{texfile} in my main file and at the end of textfile.tex there was a wrong \end{document}. I removed and all was ok.

A tip to find what is causing a problem, try commenting sections of the source until the problem disappears.

Anonymous said...

I could fix my problem within in a second! sweet. thanks!

Christian Glacet said...

Thanks, same problem on ubuntu, rm *.aux works :)

Anonymous said...

Thanks..Really saved a lot of time

Anonymous said...

thank you very much.

Anonymous said...

many thanks!

Sergey said...

great thanks!

Anonymous said...

Thanks :D It worked for me too

Anonymous said...

well holy smokes...it works...

Anonymous said...

wonderfulllll :)
thanks a lot

leigh-anne said...

Thanks so much! I couldn't figure out why copying exactly the same text into a new file and recompiling solved my problem and I'm glad there's a faster way to deal with it.

Had this problem running latex on .tex files edited in gedit on Arch Linux.

Anonymous said...

Thanks... You helped me so much!! ;)

Anonymous said...

Thanks! deleting .aux file helped immediately!

Anonymous said...

You are my sunshine!!

Anonymous said...

Thanks a lot!! =D =D =D

Anonymous said...

Thank u very very much

Anonymous said...

Ok good!! Thanks!

Wiebke said...

Can also happen, if you run pdflatex (or sth like that) twice in parallel

Anonymous said...

This worked for me (on MAC)!!!!

otara paul said...

perfect it solved my problem big ups

Anonymous said...

thanks alot!! worked for me too! (and it was a mac)

Anonymous said...

Merci bien ca m'a aidé!! :D

Anonymous said...

Thanks a ton

Anonymous said...

Merciiiiiii ouuuufff

Anonymous said...

thank you for the help!

Anonymous said...

THaNK YOU!!!

Iv said...

Thank you very much! I've wasted close to an hour on this thing until I read your helpful message!

Anonymous said...

For five or so minutes I was freaking out at the thought that I had somehow broken my thesis. What a strange error.

(Linux, by the way, for the statistics.)

أيمن العوادي said...

Thanks a lot... ^__^

Anonymous said...

It is very very helpful. Thanks.

Anonymous said...

Excellent, works perfectly fine on Ubuntu 11.10 and TexWorks Editor

Mohammad Akram Rafi said...

File ended while scanning use of \\HAR@dcite. I m unable to resolve this

rohit said...

THANKS!!! :)

Mari said...

Oh thanks! I was getting crazy!!!

Anonymous said...

Thanks! very helpful :)

Anonymous said...

Thank you so much.

Anonymous said...
This comment has been removed by a blog administrator.
Wen Zong said...

Great, it works. latex is really complex for new user

Anonymous said...

Thank you!

Anonymous said...

awesome man...thnx alot

Anonymous said...

Thanks a lot man!

sricheta ruj said...

Thank you soo much!!! This error had been driving me crazy until I accidentally bumped in to your page.
:)

Yapi said...

Thank you for your help. I was so frustrated, but now the error is fixed :)

misfit said...
This comment has been removed by the author.
Taufik MetaNaratif said...

THANK YOU!!!!!!!!!!

Anonymous said...

Thank you for this useful hint!

Ashkan Kalantari said...

Thank you a lot!

misfit said...

If you find our posts informative, support us by checking out the advertisements posted by our sponsors. Thanks.

Anonymous said...

Been using Latex for over 10 years and this the first time I'd run into this (that I recall). This fixed the issue. Thanks.

west said...

Ouch...thak you very, very much :)

Anonymous said...

Doesn't work for me. It also tells me weird stuff like missing } inserted \end{document} even though I haven't touched this file lately...

1010ling said...

Deleting the .aux file works. Thanks a lot.

MLG Mondo said...

that's a simple solution! thank you!

Anonymous said...

I deleted the "\location" part of the document and wrote simply as
sample\\
sample2\\
and it worked well for me

Anonymous said...

Thank you very much for this information, such a time saver!

Anonymous said...

gracias, gracias, gracias, ya me había vuelto loca con este error. me salvaste...

Anonymous said...

Thank you very much!! Really helps a lot!

Post a Comment