3

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!

4
  • 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
5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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