# Make overleaf force compile

It would be nice if Overleaf could compile files that had a few errors in them. This is already possible to do in Texworks: you press control+T, it hints at errors and you say compile anyway. You hold the enter key long enough and you get through all the errors.

Overleaf's tolerance for errors is very low. Is there something that I can do to override errors in overleaf?

• It is not working in Overleaf. I just tried it. I took out one of the end braces and it compiled in texworks with the next line after turned into rubbish. But it didn't compile at all in overleaf. – Hari Rau-Murthy Nov 23 '16 at 20:16
• In texworks, if something is wrong at some line, then you get gobledygook for a line and after that it is fine. This is useful when I am livetexing notes. I unfortunately can't use overleaf for livetexing my notes because the moment I make an error I have to spend a minute and find it. By the time that finishes, I fall behind. – Hari Rau-Murthy Nov 23 '16 at 20:17
• Where I am supposed to put scrollmode? I just made it my first line. It compiles fine when there are no errors. But when I took out the \$ sign, it stopped compiling in overleaf. – Hari Rau-Murthy Nov 23 '16 at 20:28
• If I understand correctly, all scrollmode does is that I don't have to press enter to confirm that I want to move on after an error. Overleaf is not even giving me the option to continue on compiling. – Hari Rau-Murthy Nov 23 '16 at 20:33
• I 'm surprised overleaf registers the error at all with \scrollmode (assuming it makes any output) but then I've not used overleaf so i'll leave someone else to answer:-) – David Carlisle Nov 23 '16 at 21:03

I don't know exactly what OverLeaf does. I can confirm that

\scrollmode
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\textbf{abc}

\textba{def}

\textsf{ghi}

\textit{jkl}
\end{document}


fails to compile with an error. Initially, I thought that this must be because OverLeaf used the --halt-on-error option because pdflatex --halt-on-error fails to compile with an error on the command line, too.

However, changing

\scrollmode


to

\batchmode


causes compilation to merely pause before continuing when compiling locally, even with --halt-on-error. However, on OverLeaf, compilation still fails with an error.

The log file begins with this:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/Debian) (preloaded format=pdflatex 2016.11.17)  24 NOV 2016 02:33
entering extended mode
\write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.


In contrast, compiling locally:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.11.20)  24 NOV 2016 02:27
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.


The file:line:error style messages enabled. is just because OverLeaf must pass --file-line-error to pdflatex. This doesn't stop \batchmode continuing compilation - at least, it doesn't do that locally. Nor does adding --shell-escape which explains the absence of restricted in OverLeaf's log. (Presumably, they are restricting things globally regardless.) None of this is surprising - it would be odd if these options made a difference. I'm just recording the fact that I double-checked just to be safe.

I'm guessing that some other process is interrupting compilation in case of error, although it is always possible, I guess, that the installation has been modified to do this no matter what. But I'd guess an independent process, since they are using such a process to interrupt compilation in other cases e.g. if compilation takes too long, it will be terminated. So I'm guessing that their monitoring process also stops compilation in the case of error and regardless of anything the user does.

This is only a guess, but, if it is right, then there is nothing you can do unless you can persuade OverLeaf to change the way that process works.

I should say that I'm not at all sure about any of this and mainly post this so that the more knowledgeable may see what OverLeaf is doing and provide interpretation and explanation!