[Tex/LaTex] Make overleaf force compile

errors

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?

Best Answer

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!