[Tex/LaTex] What reasons (if any) are there for compiling in interactive mode

compilingtex-core

I'm a command-line junkie and often compile with a simple pdflatex filename.tex from a terminal, and I forget (or am too lazy) to type -interaction=nonstopmode or interaction=batchmode. Hence, when I encounter errors, I've given the interactive prompt, which I find confusing and unintuitive, and usually get out of it as quick as possible with 'q'.

Does anyone make use of the interactive prompts, and find them useful or advantageous as opposed to simply parsing the .log file, fixing the problem and recompiling from the beginning? Is it worth learning the interactive system?

If I had to guess, I'd suppose the interactive mode hasn't changed much since the early days of TeX, when it took much longer to compile a document, and you might not want to start from scratch when you made one tiny mistake. But now that compilation takes seconds at most, is there a compelling reason ever to use interactive mode?

I ask partly because I'm on the verge of putting alias pdflatex='pdflatex -interaction=batchmode' in my .bashrc, but I wonder whether anyone thinks I'd be losing anything by doing so. If so, is there any free documentation out there about how to use the interactive system? (Or am I overthinking/overcomplicating it?)

Best Answer

I, too, think that the interactive mode was important when the edit-compile-test cycle was very long and one couldn't afford to start over for each mistake.

However, today we are more accustomed to the Unix style of error reporting, where an utility would print the error and exit immediately. Luckily, there is a command line switch combination that does precisely that:

pdflatex -interaction=nonstopmode -halt-on-error

With this command line, only the first error is printed on the terminal, and control is returned to the shell. The only disadvantage is that you can't type H anymore to read the error help — but if you have at least some experience with LaTeX, you will not need the error help text very often.