# Writing report in Winedt: Forced to use “Erase Output Files” after each mistake

I'm writing my thesis using MiKTeX and WinEdt 9 for Windows. I write the different chapters individually, and then I have a "masterfille" with the documentclass "report" where I use the command "input" to load the individual chapters. In other words there is only a preamble in the "masterfile". I have a very general problem which is the following: No matter what kind of mistake I do whatsoever, I will first receive the correct error message, say I forgot to end a table or something (it really does not matter). If I correct this mistake and try to recompile without using the option "Erase Output Files" in Winedt, I will always and very quickly receive a new error message, often containing a mysterious "Undefined control sequence". Having to do this every time and to recompile plus run the Biber (L+B+L+L+D) is very time consuming, since the document is very large. Any ideas what the problem could be? Here is the preamble of my "masterfile" (I am probably including irrelevant information, sorry for that):

\documentclass[12]{report}
\setcounter{tocdepth}{2}
\usepackage{layout}
\setlength{\voffset}{-0.75in}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{authblk}
\usepackage [T1]{fontenc}
\usepackage[backend=biber, style=authoryear-comp]{biblatex}
\usepackage{xyling}
\usepackage[super]{nth}
\usepackage{xspace}
\usepackage{cgloss4e}
\usepackage{abstract}
\usepackage{array}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage{xr}
\usepackage{gb4e}
\noautomath
\let\eachwordone\itshape

\makeatletter
\pretocmd{\@footnotetext}{
\@noftnotefalse\setcounter{fnx}{0}%
\renewcommand{\thexnumi}{\roman{xnumi}}
}{}{}
\apptocmd{\@footnotetext}{
\@noftnotetrue
\renewcommand{\thexnumi}{\arabic{xnumi}}
}{}{}
\pretocmd{\@LTRfootnotetext}{
\@noftnotefalse\setcounter{fnx}{0}%
\renewcommand{\thexnumi}{\roman{xnumi}}
}{}{}
\apptocmd{\@LTRfootnotetext}{
\@noftnotetrue
\renewcommand{\thexnumi}{\arabic{xnumi}}
}{}{}
}
\makeatother

\title{The origins of Old Romance V2: A comparative study of Late Latin, Old French and Middle High German}
\author{XXX}
\date{\today}

\begin{document}

\tableofcontents

\chapter{Old French}
\input{chapters/OldFrench2}

\printbibliography

\end{document}

• When you get an error how to you stop the compilation? – Ulrike Fischer Mar 13 '18 at 9:55
• @UlrikeFischer, when I get the first, REAL error, I just close the compilation console at the bottom of my Winedt Screen by clicking on the little "x". If I then rerun LaTeX (Ctrl+Shift+L) I almost instantly receive a new error message, which often, includes some reference to an "undefined control sequence" or sometimes to "File ended while scanning use of \@writefile". – EspenJK Mar 13 '18 at 10:24
• That's not the right way to stop the compilation. You will end with broken auxiliary files and incomplete log-file. Type instead x on your keyboard and hit enter. – Ulrike Fischer Mar 13 '18 at 10:27
• Thanks a lot, I had no idea! I did as you said, and now it works like a charm! Case closed, it seems. – EspenJK Mar 13 '18 at 10:29
• It still can happen that you will have to erase the output file, but much less often. – Ulrike Fischer Mar 13 '18 at 10:30

This will happen if you kill the compilation by clicking on some x icon, e.g. the red one here or the one in the top right:
Instead of doing this type x on your keyboard and hit enter. This gives the engine a chance to clean up and finish open tasks.