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 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?
{\contentsline {subsection}{\numberline {6.3}General comments o 
! 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?

share|improve this question
5  
Delete your temporary files and compile once more. Which Editor and TeX distribution do you use? –  Kurt Aug 6 '12 at 3:43
    
Thank you Kurt! I am using TeX works Version 0.2.3 (r.466), on a mac. What extensions are the temporary files? –  Ruth Aug 6 '12 at 3:48
    
.toc and .aux should be the important one for you. On the other side delete all of them without your .tex file(s). –  Kurt Aug 6 '12 at 3:51
1  
also, please post the concerned lines from the .tex file. –  Vineet Menon Aug 6 '12 at 4:49
3  
I made some tests with TeXworks on miktex 2.9. Imho it is not advisable to use the large button "stop prozess" (or however it is called in the english version). It simply kills the process and quite a lot files are not correctly closed. E.g. I don't get a log-file. When you get an error type "x" (the cursor should already be in the line at the bottom) and then hit "enter". This should close the files correctly. –  Ulrike Fischer Aug 6 '12 at 8:26
show 1 more comment

1 Answer

You have 3 options:

  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.

share|improve this answer
add comment

Your Answer

 
discard

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.