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.

I want to create a LaTeX editor.

Behind the scene, the editor will call pdflatex.exe.

I need a method to prevent pdflatex.exe to stop working because of an invalid input file.

Is there anybody here knows the protocols, rules, conventions used by pdflatex.exe ?

Note: I created the question in StackOverflow as well.

Edit

Using suggestions from @Martin and @arx (a SO member), my actual problem is solved. THANK you!

share|improve this question
4  
Normally you call (pdf)latex with -interaction=nonstopmode (or what the MikTeX equivalent is). Then it will not stop on errors. Your editor can detect compile errors by watching the return value of the pdflatex subprocess and by locking on the "console" or log output. –  Martin Scharrer Mar 6 '11 at 14:42
1  
Another way would be to look if pdflatex wants to read from standard input, i.e. waits for user input. –  Martin Scharrer Mar 6 '11 at 14:43
2  
To complete Martin's comment, there is also the -halt-on-error option in pdfTeX, LuaTeX and XeTeX. –  Andrey Vihrov Mar 6 '11 at 14:47
1  
It would be good if we resolve this question here somehow so that it doesn't stay "unanswered" forever. I added my comments as answer. Maybe you should post your solution here as well. One of them should then be accepted. I don't mind either way. –  Martin Scharrer Mar 6 '11 at 15:47
    
@Martin: I changed the title. Thank you. –  LaTeX Mar 6 '11 at 16:28
add comment

1 Answer

up vote 5 down vote accepted

Normally you call (pdf)latex with -interaction=nonstopmode (or what the MikTeX equivalent is). Then it will not stop on errors. Your editor can detect compile errors by watching the return value of the pdflatex subprocess and by locking on the "console" or log output.

Another way would be to look if pdflatex wants to read from standard input, i.e. waits for user input.

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.