Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make tables in LaTeX. However, each time I make a mistake the compiler crashes even by removing the mistake with the following message:

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

Then, I have to delete all files except the .tex file and compile the program again. Would somebody please help me to solve it?

share|improve this question
Welcome to TeX.SE. Without more information not sure how someone is going to be able to help you. Perhaps the OS, Editor, version that you are using woudl be helpful. Furthermore, we'd probbaly need to see a complete documenent in the form of a Minimum Working Eexample including \documentclass and the appropriate packages that serves as a test case that can reproduce your problem. –  Peter Grill Dec 7 '12 at 8:40
Perhaps you could try just deleting all the temporary files that were created during the first run as they are might have been left in a corrupt state due to the error. Depending on the editor you are using there is usually a pull down menu of the form Trash aux files), or Remove aux files. –  Peter Grill Dec 7 '12 at 8:44
add comment

2 Answers

up vote 1 down vote accepted

My crystal ball says: your error concerns mismatched curly braces in the \caption or \label of the table, or some other part that is written to external files because it influences cross-references or the ToC or the List of Tables.

share|improve this answer
Thank you. It worked. –  Saeed RamezanJamaat Dec 11 '12 at 2:13
add comment

It is failing to write to the list of figures, so most likely you have a fragile command in a figure \caption that should be preceded by \protect. But you will need to delete the lof and aux files initially as if a bad file is written on the previous run it is still input at the start of the next run.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.