# [Tex/LaTex] Errors in tables then runaway argument at \begin{document}

compilingerrorstables

I am new to LaTeX and keep having this re-occurring problem. I create a table and notice a mistake (incorrectly specifying the number of columns or something) because the pdf won't compile (I am using 'pdfLaTeX'). I stop the compilation and fix the table. When I try to re-run the pdf I get the error message:

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


Once this happens no matter what I do the pdf won't run and the .synctex.gz file is 'busy'. I have to copy and paste all my (corrected) code into a new TeX works file and then it re-runs fine! I suspect it has something to do with the fact that LaTeX is still thinking about the erroneous table. How can I completely break the compilation process and stop this from happening?

1. As Ulrike points out, you should stop the compilation by typing x into the command line at the very bottom.
2. Delete .toc and .aux files after an incomplete compilation (There's a button File->Delete Temporary Files in TeXworks, as Torbjørn points out.
3. Type q into the command line in TeXworks whenever this error at \begin{document} appears. The compilation will continue in a strange mode, but the next compilation should be ok.