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.

When pdflatex can't compile a file, it drops me to a prompt. I've never used it and always try to get away from there as quickly as possible, usually generating a q.log file in the process.

Is there any way to avoid this behavior and let pdflatex drop back to command-line on error?

share|improve this question
3  
Perhaps the answers to this question: Ignore compile errors will help. –  Alan Munn Mar 13 '11 at 17:01
1  
@Alan: Thanks. -halt-on-error (your link) and -interaction=nonstopmode (Martin Scharrer) seems to be what I'm looking for. –  Tim N Mar 13 '11 at 17:05
1  
Yes, -halt-on-error exits on error. Exactly what I'm after. Ignoring or not printing errors is not helpful. Especially when make then thinks everything's up to date. I've never used the interactive thing. Imo shouldn't be default. –  jozxyqk Feb 15 at 11:53
add comment

3 Answers

up vote 12 down vote accepted

Use the -interaction=nonstopmode command line argument or the \nonstopmode macro to disable stopping on errors.

share|improve this answer
add comment

-interaction <mode> Starts the so-called interaction mode, which can be specified as batchmode, nonstopmode, scrollmode or errorstopmode. The meaning of these options is the same as for the TeX commands of the same name. The reason why you can also say \batchmode as first line in your document. Then you do not need to modify the prompt in a GUI, if you use one.

share|improve this answer
add comment

To drop back to the command line on the first error like gcc (or other compilers do), use:

pdflatex -halt-on-error yourfile.tex
share|improve this answer
1  
Took this information from the comments on the question. This is what simply worked for me. –  Rudy Matela Feb 17 at 17:50
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.