Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I set up a permanent compile loop that keeps trying even when there are errors? I'm using latexmk with a remote compile setup as discussed here and here. However, if I save a document with a bug (either a legitimate bug, or I save it before closing a tag), then latexmk halts. Any suggests how I can have it pause, try again, and keep trying again, for ever and ever?

share|improve this question
1  
Use the -halt-on-error option in your latex command. So in bash I would write something like while true; do latex -halt-on-error filename.tex; sleep 5; done –  Willie Wong Nov 19 '10 at 19:23
add comment

1 Answer

up vote 7 down vote accepted

There's \batchmode, which will disable terminal output and pretend you just pressed enter on every error message, but it won't save you from infinite loops. (There's also \nonstopmode, which I believe does the same with terminal output.)

There are usually corresponding command line switches, --interaction=batchmode or --batchmode

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.