How to cancel LaTeX compiling in Terminal?

When I compile a LaTeX document in the terminal like so:

latex document.tex

How do I then abort the process? Ctrl-C doesn't work.


Solution 1:

Ctrl-D will do the trick.

However, use -file-line-error -halt-on-error on the command line. Or learn how to edit LaTeX from the compiler if you wanted to be hard core.

Solution 2:

Ctrl-C should work while latex is "running".

If an error occurs, and latex presents you its prompt, Ctrl-D, which signifies "end-of-input" can be used to get on.