Make latexmk ignore errors and finish compiling

A simpler solution is

latexmk -pvc -pdf -xelatex -interaction=nonstopmode foo.tex

You can use this:

latexmk -pvc -pdf -e "$pdflatex='xelatex %O -interaction=nonstopmode %S'" foo.tex

This is for Windows, for Linux, the following might work, but I don’t use Linux, so I don’t know if it actually works:

latexmk -pvc -pdf -e '$pdflatex=q/xelatex %O -interaction=nonstopmode %S/' foo.tex

With -e you can specify what to run as "pdflatex", and the argument you need is -interaction=nonstopmode, i.e. compile all the way no matter what.

Looking at the latexmk documentation, I thought the latexmk option -f would do exactly that, but at least on my system, it doesn’t.


Update: As promised in his comment, John Collins clarified the use of -f in the documentation:

Note: "Further processing" means the running of other programs or the rerunning of latex (etc) that would be done if no errors had occurred. If instead, or additionally, you want the latex (etc) program not to pause for user input after an error, you should arrange this by an option that is passed to the program, e.g., by latexmk’s option -interaction=nonstopmode.


Another simpler solution is:

latexmk -pvc -pdf foo.tex < /dev/null

Tags:

Latexmk

Errors