If my tex-files contain an error (such as an undefined control sequence), latexmk will present a prompt and ask for manual input before continuing. Now, of course it is possible to force further processing, e.g. as described here Don't make me manually abort a LaTeX compile when there's an error or here Make latexmk ignore errors and finish compiling.
However, in case of an error I would like Latexmk to stop processing completely and to return to the command line. Is there any way to accomplish this?
.latexmkrc
:$pdflatex = "pdflatex -synctex=1 -halt-on-error %O %S";
In my case I tend to use-pvc
all the time, so here it just stops the compilation if there is an error and go back to waiting for change. You can also use the-interaction=...
option. If I'm not mistaken you can also pass these on to pdflatex vialatexmk
CLI options.